Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
ben__fisher
3 years agoNew member | Level 2
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
h https://www.dropbox.com/static/api/2/dropins.js:2
r https://www.dropbox.com/static/api/2/dropins.js:2
addListener https://www.dropbox.com/static/api/2/dropins.js:2
t https://www.dropbox.com/static/api/2/dropins.js:2
p https://www.dropbox.com/static/api/2/dropins.js:2
createChooseButton https://www.dropbox.com/static/api/2/dropins.js:2
addListener https://www.dropbox.com/static/api/2/dropins.js:2
createChooseButton https://www.dropbox.com/static/api/2/dropins.js:2
How can I resolve this?
1 Reply
- Greg-DB3 years ago
Dropbox Community Moderator
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
Find help with the Dropbox API from other developers.
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
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, Facebook or Instagram.
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!