Your workflow is unique 👨‍💻 -  tell us how you use Dropbox here.

Forum Discussion

marty9397's avatar
marty9397
New member | Level 2
6 years ago

Dropbox sign in page shown in SFSafariViewController is hanging

Hi - I am using the Dropbox HTTP API v2 with SFSafariViewController on iOS to show the Dropbox Sign In page to authorize the user and obtain a token. This is working on most iOS devices. However, on one iPad Pro running v12.1.4 of iOS, after credentials are entered on the sign in page and the sign-in button is tapped, the page hangs with the dial endlessly spinning. What could cause this?

Thanks, Martin

5 Replies

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Thanks for the report! A JavaScript error could potentially cause this page and operation to fail. To try to track this down, can you try and see if the same issue occurs on the same page in Safari.app itself on that device?

    If so, please enable and use the Web Inspector to connect to Safari on the device. You can use that to get any error(s) from the Console for the page on the device.

  • marty9397's avatar
    marty9397
    New member | Level 2
    6 years ago

    HI Greg - thanks alot for the response. When the customer of our app tried connecting to Dropbox in Safari.app and in the Dropbox.app, the connection was successful on this one iPad. The sign-in Dropbox page only hangs when shown from SFSafariViewController on this iPad (his other iPads connect successfully to Dropbox in the SFSafariViewController).

    Thanks, Martin

     

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Thanks! Unfortunately it looks like the Web Inspector doesn't work in SFSafariViewController, only Safari.app itself, so we don't have a good way to troubleshoot this.

    Please let us know if you start seeing more of this (or if it does start happening in Safari.app as well), but for now I think using Safari.app as a workaround is the best option. Since this only happens in SFSafariViewController, whatever the issue is might be out of our control anyway.

  • marty9397's avatar
    marty9397
    New member | Level 2
    6 years ago

    Unfortunately, our app needs to connect to the Dropbox web service in order to receive back a token in the redirect uri so our app can retrieve resources stored in the user's Dropbox so connecting via Safari.app doesn't help. Would setting up a proxy between our app and the Dropbox server (in the customer's network) to capture the traffic help to illuminate for you what might be going on?

    Thanks, Martin

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    6 years ago

    Apologies, I thought you meant switching to Safari.app, e.g., using the Safari button in the bottom right of SFSafariViewController, during the flow did allow the user to connect your app (not just log in to Dropbox).

    Anyway, at this point it's unclear what exactly the issue is, so I can't say for sure if inspecting the network traffic would help. For instance, if it's failing in JavaScript code, the network traffic may not reveal anything useful. 

    That said, any information, or ideally a way to reproduce this, that you can share would be useful.

About Dropbox API Support and Feedback

Node avatar for Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.

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!