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
hilaryhacksel
10 months agoHelpful | Level 6
1Password suggestion to fix file downloads
It has come to 1Password's attention that file downloads don't work in Dropbox when the 1Password extension is installed in Safari. I did a technical deep dive into the issue and found the following Dropbox code that causes this issue. As we can see in the minified code below, the W function removes an iframe from the page:
c_downloads-vflIml6Dh.js
When a user initiates a download, an iframe is created to handle the request and calls the destructive W 100 milliseconds after the "load" event (see last line):
When 1Password is present, the load event will occur before the download occurs and Dropbox does not wait long enough. I believe this is because of how Safari works under the hood, where the time it takes for it to switch between JavaScript contexts (in this case 1Password and Dropbox) is slow. Here is a screen capture of me sharing the findings with my team internally:
You can see that although there is almost no time taken by 1Password between START_LISTENERS and END_LISTENERS (they have the same 1700750410578 timestamp because precision isn't high enough) as well as START_INJECTION and END_INJECTION, our mere existence causes a delay of 501 ms (1701750410598 - 1701750410097). I believe this is the root of the issue: 100 ms is too short a timeout.
This issue would not only affect 1Password / Dropbox users, but all Dropbox users that use any extension that injects code at document_start.
There are many ways to fix this, here is a list I came up with when investigating this issue. They all have different tradeoffs, and some may be impossible depending on Dropbox's internal requirements, but I wanted to share them for completeness:
- Use the download property of an anchor tag instead of dynamically creating/destroying iframes
- Increase the destructive timeout from 100ms to 1 second
- Rely on the iframe redirect event (ie "unload" event and not the "load" event + timeout)
- Create the iframe before the user needs to download their file and update it on user initiation.
Thanks BenDBX I've tested the drop box fix with the 1Password workaround removed and can see both the download working and the 1Password code running in the same iframe!
I see the developers decided to bump the timeout to 10 seconds (`1e4`) which is ample time on my apple M1 to switch between JS contexts. Hopefully slower computers don't have issues with this!
- MeganDropbox Staff
Hey guys!
Thanks for bringing this to our attention, and for all the efforts you put looking into this.
Your feedback regarding this has been quite helpful, and I will do everything I can to ensure that your voice is heard.
I'll forward your feedback to the appropriate areas so we can continue to improve.
Thank you!
- hilaryhackselHelpful | Level 6
Thanks for forwarding the suggestion along Megan ! Can you share updates here on whether or not the development team has confirmed the issue and whether or not they will be making a change to the download behaviour that works better with extensions?
- MeganDropbox Staff
Hey hilaryhacksel, at the moment we don't have any concrete updates.
However, I'll make sure to update the thread if we have any additional comments, or changes on our end.
Thank you!
- hilaryhackselHelpful | Level 6
Hi Megan ! Just thought I'd follow up again to keep this issue active. Have any developers at Dropbox had time to take a look at this problem?
- BenDBXCommunity Manager
Hi hilaryhacksel,
Thanks for your patience here! Our Engineers implemented a fix last week to resolve downloads failing on Safari with 1password. Please give it a shot and let us know if everything is working for you.
Thanks,
Ben
- delfuegoExplorer | Level 4
Dropbox staff, PLEASE engage with this issue! As you can see from this 1Password forum post:
this is a pretty major hardship for all Mac Safari users who have 1Password installed.
- Rich27182Explorer | Level 4
Dropbox staff,
Please implement a fix for this issue, whether it is one of the ones mentioned above or a different one.
thank you
About Integrations
Find solutions to issues with third-party integrations from the Dropbox Community. Share advice and help members with their integration questions.
Need more support
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!