Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show blank page when login. #182

Open
ghost opened this issue Oct 12, 2017 · 16 comments
Open

Show blank page when login. #182

ghost opened this issue Oct 12, 2017 · 16 comments

Comments

@ghost
Copy link

ghost commented Oct 12, 2017

the console log is "-canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"and "-canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)""

@dropbox dropbox deleted a comment Oct 12, 2017
@greg-db
Copy link
Contributor

greg-db commented Oct 12, 2017

The canOpenURL 10814 errors themselves are expected if the official Dropbox app isn't installed, so they're safe to ignore. (The SDK checks if the official app is installed, and would use that for the authorization flow if it is. If it isn't though, it will fall back to an in-app flow.)

It sounds like you're getting a blank page when calling authorizeFromController though. That would be unrelated to the canOpenURL errors. This can occur when the controller passed to authorizeFromController isn't the topmost view controller. So, you instead just need to make sure you're passing in the top most view controller. This may depend on the exact view set up for your app, but for example it may look like this:

[DBClientsManager authorizeFromController:[UIApplication sharedApplication] controller:[UIApplication sharedApplication].keyWindow.rootViewController openURL:^(NSURL *url){
    [[UIApplication sharedApplication] openURL:url];
}];

If that doesn't seem to help, please share:

  • the version of the SDK you have installed
  • the steps and code to reproduce the issue
  • a screenshot of the issue

By the way, I deleted your second comment. In the future, please do not spam mention others. The Dropbox employees you mentioned do not work on the Objective-C SDK and won't be able to offer help with this issue. The people that can help regularly review newly posted issues and will reach out to offer help as I've done here. Thanks!

@ghost
Copy link
Author

ghost commented Oct 13, 2017

Thanks!

sdk version is 3.1.2
iOS 10.3
I tried the way you give me, but it was not working well.
i find a way ,that tap the setting and click safari and clear history and website data.then it works well...
But when i click done button in web or unlink after login in ,this issue comes back.

@ghost
Copy link
Author

ghost commented Oct 13, 2017

- (BOOL) dropboxIsLinked { if ([DBClientsManager authorizedClient]) { return YES; } else { [self dismissPopoverAnimated:NO]; [DBClientsManager authorizeFromController:[UIApplication sharedApplication] controller:self openURL:^(NSURL *url) { [[UIApplication sharedApplication] openURL:url]; }]; return NO; } }

@greg-db
Copy link
Contributor

greg-db commented Oct 13, 2017

Thanks! Version 3.1.2 is a bit old now though, and there have been various bug fixes since then, so please update to the latest version, currently v3.3.4 and let us know if you're still seeing the issue.

@ghost
Copy link
Author

ghost commented Oct 14, 2017

Thanks!
I have update the version to v3.3.4 ,but it doesn't work....maybe ,it's reason of the DBSafaricontroller 's webview cache. that , when i tap the setting and click the safari to clear the cache and website data ,it becomes well. a suggestion for you ...how to solve it ? maybe ,i would let my users to clear safari 's cache when the find this issue , now this is the only way for this issue ,i can't find another way...Waiting for you reply. Thank you again ,show enthusiasm for my question...

@greg-db
Copy link
Contributor

greg-db commented Oct 16, 2017

Thanks! I can't seem to reproduce this.

What version(s) of iOS are you seeing this with?
Does it reproduce for you in the DBRoulette example app?

@kallipigous
Copy link

kallipigous commented Oct 17, 2017

I have exactly the same trouble. Works fine when dropbox app is installed but the web page loaded up is blank. This is a landscape only app incidentally. if I clear the cache in safari it pops up fine.

@greg-db
Copy link
Contributor

greg-db commented Oct 17, 2017

@kallipigous Can you confirm you're passing in the topmost controller and are using the latest version of the SDK, per my earlier comments?

If so, please let me know what versions of iOS you're seeing this with, and if it reproduces with the example app.

@kallipigous
Copy link

Yup 'm passing the top controller and I'm using the most recent version of ios11.

I'll try with the example app.

@kallipigous
Copy link

I can confirm that dbroulette does work (though it just uses self for the viewcontroller) but the same code in my app does not. I get a white screen with a blank toolbar. When I clear the cache in safari and go back to my app it refreshes and appears.

@greg-db
Copy link
Contributor

greg-db commented Oct 17, 2017

@kallipigous Thanks! To clarify though, I was referring to the latest version of the Dropbox SDK, not iOS itself.

Anyway, we haven't been able reproduce this version of this issue (where it's not about the view controller). That being the case, can you provide a small sample project that does reproduce it? That would be helpful in investigating. Thanks in advance!

@kallipigous
Copy link

I'll have a look though it will be difficult to parse out. For the time being I'll have to insist people have the dropbox app installed. I'll keep playing though and let you know if anything.

@ghost
Copy link
Author

ghost commented Oct 18, 2017 via email

@greg-db
Copy link
Contributor

greg-db commented Oct 18, 2017

@andywangzhen Thanks! As discussed with kallipigous, we haven't been able to reproduce this behavior, and since it doesn't reproduce for you in the example app, it does seem to be related to something specific to your app. I hate to be a bother, but that being the case, we will need a small sample project that reproduces the issue to be able to investigate further. If you would be able to supply one, that would be very helpful.

@shriyaMadan
Copy link

Is this issue still there?

@greg-db
Copy link
Contributor

greg-db commented Mar 17, 2021

@shriyaMadan Unfortunately we were never able to reproduce the issue reported here. Are you seeing this issue yourself? If so, please share a sample project that demonstrates it so we can look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants