You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

ben__fisher's avatar
ben__fisher
New member | Level 2
2 years ago

Chooser dropins.js Uncaught TypeError: JSON.parse is not a function

I have a feeling dropins.js conflicts with mootools because I'm getting a Javascript error when trying to use Chooser.

 

The button is inserted using

 

document.getElementById("DBContainer").appendChild(button);

 

After I click the button the items are loaded, I can select them but clicking cancel or choose does nothing.

 

If I close the dropbox pop up window the cancel function still runs.

 

Uncaught TypeError: JSON.parse is not a function

 

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff

    From the error message, it seems that the issue is that JSON.parse is not set to a function. The Dropbox Chooser functionality does use JSON.parse, and that should be available built-in to the web browser as that's a standard function included in web browsers.

     

    I can't offer support for mootools or any other particular third party library in particular, as it's not made by Dropbox. If there's something that's removing or replacing JSON.parse though, I suggest refer to the documentation for it to see how you can avoid that, or otherwise not use whatever is doing so.

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

5,910 PostsLatest Activity: 3 days ago
333 Following

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!