dropbox-sdk-obj-c
dropbox-sdk-obj-c copied to clipboard
Showing Blank white screen with error dbapi-8-emm and dbapi-2://1/connect
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.
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.)
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.

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.
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.
@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.
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.
@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?
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.
@Oleksandren Thanks for the information!
@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.
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.
Thanks again @Oleksandren ! We'll follow up here once we have any news on this issue.
@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.
Thanks @Oleksandren !
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.
Thanks for the additional report @manishbajo2008 ! I don't have an update on this yet, but I'll follow up here once I do.
@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.
@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.
@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.
@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.
An update on this, I am facing the same issue.
@manish-cs I don't have an update on this yet. I'll reply here once I do.
Lovely iOS 11, in DBOAuthMobile-iOS.m add this before presentViewController:
if (@available(iOS 11.0, *)) { [NSThread sleepForTimeInterval:0.5f]; }
Works for me!
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!
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.
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)
}
}
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.