cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Integrations

Find solutions to issues with third-party integrations from the Dropbox Community. Share advice and help members with their integration questions.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

1Password suggestion to fix file downloads

1Password suggestion to fix file downloads

hilaryhacksel
Helpful | Level 6

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

Screenshot 2024-03-22 at 3.15.18 PM.png

 

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):

Screenshot 2024-03-22 at 3.21.07 PM.png

 

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:

dropbox-investigation.png

 

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. 
6 Replies 6

delfuego
Explorer | Level 4

Dropbox staff, PLEASE engage with this issue! As you can see from this 1Password forum post:

 

https://1password.community/discussion/142097/1password-for-safari-extension-blocking-downloads-on-d...

 

this is a pretty major hardship for all Mac Safari users who have 1Password installed.

Rich27182
Explorer | 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

Megan
Dropbox 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! 


Megan
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

hilaryhacksel
Helpful | 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?

Megan
Dropbox 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!


Megan
Community Moderator @ Dropbox
dropbox.com/support


Heart Did this post help you? If so, give it a Like below to let us know.
:arrows_counterclockwise: Need help with something else? Ask me a question!
:pushpin: Find Tips & Tricks Discover more ways to use Dropbox here!
:arrows_counterclockwise: Interested in Community Groups? Click here to join!

hilaryhacksel
Helpful | 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?

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    hilaryhacksel Helpful | Level 6
  • User avatar
    Megan Dropbox Staff
  • User avatar
    Rich27182 Explorer | Level 4
What do Dropbox user levels mean?