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

Showing Blank white screen with error dbapi-8-emm and dbapi-2://1/connect #167

Open
shoaibhassanWhizpool opened this issue Aug 10, 2017 · 27 comments

Comments

@shoaibhassanWhizpool
Copy link

shoaibhassanWhizpool commented Aug 10, 2017

Hello Dropbox Team,
i am getting

-canOpenURL: failed for URL: "dbapi-2://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"
2017-08-10 11:31:29.961522+0500 [2831:792345] -canOpenURL: failed for URL: "dbapi-8-emm://1/connect" - error: "The operation couldn’t be completed. (OSStatus error -10814.)"

I am using pod version 3.1.1 into my application.

@greg-db
Copy link
Contributor

greg-db commented Aug 10, 2017

The 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.)

You shouldn't be seeing a blank screen for the authorization page though. Can you share a screenshot showing the issue? Also, which device(s) is it affecting? (Is it only affecting split view controllers on iPad? If so, that's a known issue we're looking into.)

@shoaibhassanWhizpool
Copy link
Author

shoaibhassanWhizpool commented Aug 11, 2017

here is my code for calling login screen
-(void)loadDropBoxData{
    if (![DBClientsManager authorizedClient]) {
        [DBClientsManager authorizeFromController:[UIApplication sharedApplication]
                                       controller:self
                                          openURL:^(NSURL *url) {
                                              [[UIApplication sharedApplication] openURL:url];
                                          }];
    }
    else{
        [self performSelector:@selector(requestDropBoxFiles) withObject:nil afterDelay:0];
    }
}

when i uninstall app and call this code for first time, it shows login window, but if i don't login and press done button of dropbox login screes it comes back, and if i press login button again.it shows white blank screen like this.
simulator screen shot aug 11 2017 2 59 23 pm

@greg-db
Copy link
Contributor

greg-db commented Aug 11, 2017

Based on the screenshot, it looks like you're seeing this on iPhone, not iPad.

I just tried to reproduce this using the code you supplied, but it worked properly for me. I'm not sure I understand the part where you said "press done button of dropbox login screes it comes back" though. What specifically comes back? Can you clarify the steps to reproduce this?

Additionally, please let us know:

  • which version of Xcode you're using
  • which version of iOS you're using

By the way, I notice you mentioned you're using version 3.1.1 of the SDK. The latest version is 3.2.0, so please upgrade to that first and try again.

@guidedways
Copy link

I can confirm I'm seeing the same thing on v3.1.2 (and v3.2.0 won't compile, I've raised this issue). I had v3.0.18 before and it was working perfectly.

@greg-db
Copy link
Contributor

greg-db commented Aug 14, 2017

@guidedways Can you let me know what version(s) of Xcode and iOS you're seeing this with? This isn't reproducing for me with SDK v3.1.2.

@guidedways
Copy link

This is Xcode 8.x (latest) and iOS Simulator 10.x (latest). I switched back to 3.0.18 and I've had no issues whatsoever. I tried this with a completely fresh install on a iOS simulator. The same code (unchanged) worked the moment I reverted back to v3.0.18.

@greg-db
Copy link
Contributor

greg-db commented Aug 14, 2017

@guidedways Thanks! That's the same setup I'm testing with though and it unfortunately isn't showing the same issue for me.

Does the DBRoulette sample app display the same issue for you? Also, does this only reproduce when following the steps outlined by shoaibhassanWhizpool above, or does it occur on every call to authorizeFromController?

@Oleksandren
Copy link

Oleksandren commented Aug 18, 2017

Hello!
I have the same problem. On the iPhone (both simulator iPhone 7 and device iPhone 7plus) I have white blank screen when try to log in.
The code for log in used the as in the listing above.

The app used splitViewController.
Also interesting behaviour I can observe: In my app I have two place where is used login into Dropbox:
The first place is the settings screen. This screen is the only one viewController in the UINavigationController stack. On this screen everything works well(properly opens webView for log in into Dropbox, and I can log in).
The second place - some viewController, which is fourth in the UINavigationController stack. And in this ViewController I have white blank screen, every time when I try to login in to Dropbox.

@greg-db
Copy link
Contributor

greg-db commented Aug 18, 2017

@Oleksandren Thanks for the information!

@Oleksandren
Copy link

Oleksandren commented Aug 20, 2017

@greg-db
Instead passing self as parameter (UIViewController), I pass self.navigationController.viewControllers[0] and everything works well on the simulator. Then I tried to check it on the device. The problem still unresolved, and when I run app on the simulator - the provided solution stop working on simulator too.
The I try pass self.parentViewController - it not helps. When I pass rootViewController ( [[[[UIApplication sharedApplication] delegate] window] rootViewController] ) - it helps, but on the simulator only. On the device nothing to help to resolve this problem.

So, working call to ask authorization in Dropbox look like the following (works only on the simulator):

[DBClientsManager authorizeFromController:[UIApplication sharedApplication]
                                       controller:self.navigationController.viewControllers[0]
                                          openURL:^(NSURL *url) {
                                              [[UIApplication sharedApplication] openURL:url];
                                          }];

But it works only on simulator.

@Oleksandren
Copy link

Oleksandren commented Aug 21, 2017

I tried to use latest version of the Dropbox SDK. It is not helps to resolve bug. But when I used the latest version of the SDK, in the log appeared the following warning:

[ViewService] Failed to get remote view controller with error: Error: domain=_UIViewServiceInterfaceErrorDomain, code=2

As I see in the search results this problem in iOS core (in the Safari View Controller which opened to make log in). Also the same bug with FBSDK too.
The one of the solution which proposed here:
https://stackoverflow.com/questions/44327068/failed-to-get-remote-view-controller-with-error-error-domain-uiviewserviceint
is to clear data and history from Safari settings on your phone. But it no way for us(we can't ask user to clear the cache every time when him/she will want to use Dropbox).
Also I tried to use another solution, which proposed here:
https://stackoverflow.com/questions/34015649/problems-with-sfsafariviewcontroller
But it also not helps.

@greg-db
Copy link
Contributor

greg-db commented Aug 21, 2017

Thanks again @Oleksandren ! We'll follow up here once we have any news on this issue.

@Oleksandren
Copy link

@greg-db
I think you can try remove all appearance configurations for UIToolbar and for UIBarButtonItem's. In this case toolbar will be not so attractive, but it not cause the bug.

@greg-db
Copy link
Contributor

greg-db commented Aug 22, 2017

Thanks @Oleksandren !

@manishbajo2008
Copy link

manishbajo2008 commented Sep 11, 2017

We have integrated dropbox SDK API v2 in our app.We are getting a blank screen,no login screen found when App runs on iPad.Our App runs fine on iPhone and the login screen appears.May you help us on this issue this seems to be a bug in your SDK,because the login screen is getting rendered from your server.
iOS version used -> 10.3.3
Besides, dropbox SDK API v1 works fine on iPhone and iPad.Please provide us solution.

@greg-db
Copy link
Contributor

greg-db commented Sep 11, 2017

Thanks for the additional report @manishbajo2008 ! I don't have an update on this yet, but I'll follow up here once I do.

@manishbajo2008
Copy link

manishbajo2008 commented Sep 13, 2017

@greg-db
Thanks for your response.
May we get some type of confirmation report from dropbox team regarding this issue.As we have tried to release our app HpePrint but apple has rejected our app raising this user interface bug.We have also tried contacting the developer team of dropbox but no response has been found.

@greg-db
Copy link
Contributor

greg-db commented Sep 13, 2017

@manishbajo2008 I work with the API team at Dropbox and I can confirm this issue is currently open with engineering, though I don't have a timeline for a fix right now.

I do see that you just opened an API ticket and a forum thread for this, but I'll close those in favor of this GitHub issue so we can track this in one place.

@manishbajo2008
Copy link

@greg-db
Is there any progress on this?May your team communicate with apple team explaining this open issue?

Below find the details for rejection from Apple:-
From Apple
• 2. 1 Performance: App Completeness
Guideline 2.1 - Performance - App Completeness

We discovered one or more bugs in your app when reviewed on iPad running iOS 11 on Wi-Fi connected to an IPv6 network.

When attempting to connect Dropbox, an empty, white page is displayed with no close or back button.

@greg-db
Copy link
Contributor

greg-db commented Sep 26, 2017

@manishbajo2008 Thanks for the information. I don't have an update from the team on this, but I'll let them know about the issues it is causing for you in app review to see if we can help.

@manish-cs
Copy link

An update on this, I am facing the same issue.

@greg-db
Copy link
Contributor

greg-db commented Sep 28, 2017

@manish-cs I don't have an update on this yet. I'll reply here once I do.

@fmalekpour
Copy link

Lovely iOS 11, in DBOAuthMobile-iOS.m add this before presentViewController:

if (@available(iOS 11.0, *)) { [NSThread sleepForTimeInterval:0.5f]; }

Works for me!

@greg-db
Copy link
Contributor

greg-db commented Sep 29, 2017

We're still looking into this, but it no longer reproduces for us. If anyone is still seeing this issue, would you be able to share a sample project that shows it? Thanks!

@scobbe
Copy link
Contributor

scobbe commented Oct 4, 2017

Sorry for the long delay here. I think the solution is to make sure that you're passing the topmost view controller when authorizing. With the UISplitViewController case, it's not necessarily self.

So would people mind trying this to see if it fixes the problem for them:

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

[UIApplication sharedApplication].keyWindow.rootViewController should get you the topmost view controller.

I can be sure to add a note in the documentation.

@sovannarithsok
Copy link

Should check the top controller:

       let vc = UIApplication.shared.keyWindow?.rootViewController
        if var topController = vc {
            while let presentedViewController = topController.presentedViewController {
                topController = presentedViewController
            }
            DBClientsManager.authorize(fromController: UIApplication.shared, controller: topController) { (url) in
                UIApplication.shared.openURL(url)
            }
        }

@CharlieBurtoff
Copy link

Make sure you are not presenting the WebView from an ActionSheet - that can cause the blank screen / no loading issues. I wasted a long time before checking the view hierarchy which was ultimately my issue. I also was distracted by the TCP / Socket errors.

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

10 participants