Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
Pedro V.5
10 years agoNew member | Level 1
Bug on Android Core API
When using the Dropbox Core API, if the Dropbox app is not installed, when trying to open the URL to authenticate on the browser the following error happens:
E/com.dropbox.client2.android.AuthActivity(19192): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=www.dropbox.com/1/connect?locale=...&k=...&n=...&s=&state=oauth2:... flg=0x60000000 }
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1672)
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1442)
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.Activity.startActivityForResult(Activity.java:3474)
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.Activity.startActivityForResult(Activity.java:3435)
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.Activity.startActivity(Activity.java:3677)
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.Activity.startActivity(Activity.java:3645)
E/com.dropbox.client2.android.AuthActivity(19192): at com.dropbox.client2.android.AuthActivity.a(SourceFile:623)
E/com.dropbox.client2.android.AuthActivity(19192): at com.dropbox.client2.android.AuthActivity.a(SourceFile:41)
E/com.dropbox.client2.android.AuthActivity(19192): at com.dropbox.client2.android.AuthActivity.run(SourceFile:465)
E/com.dropbox.client2.android.AuthActivity(19192): at android.os.Handler.handleCallback(Handler.java:733)
E/com.dropbox.client2.android.AuthActivity(19192): at android.os.Handler.dispatchMessage(Handler.java:95)
E/com.dropbox.client2.android.AuthActivity(19192): at android.os.Looper.loop(Looper.java:157)
E/com.dropbox.client2.android.AuthActivity(19192): at android.app.ActivityThread.main(ActivityThread.java:5293)
E/com.dropbox.client2.android.AuthActivity(19192): at java.lang.reflect.Method.invokeNative(Native Method)
E/com.dropbox.client2.android.AuthActivity(19192): at java.lang.reflect.Method.invoke(Method.java:515)
E/com.dropbox.client2.android.AuthActivity(19192): at com.android.internal.os.ZygoteInit.run(ZygoteInit.java:1265)
E/com.dropbox.client2.android.AuthActivity(19192): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
E/com.dropbox.client2.android.AuthActivity(19192): at dalvik.system.NativeStart.main(Native Method)
This can be fixed by adding the following validation on line 620 of AuthActivity.java :: startWebAuth(String state)
if(url != null && url.startsWith("www.")){
url = "http://" + url;
}
Note: This does not happen on every device.
5 Replies
Replies have been turned off for this discussion
- Greg-DB10 years ago
Dropbox Community Moderator
Thanks for the report! We'll look into it.
- Greg-DB10 years ago
Dropbox Community Moderator
Can you let us know more about the devices where you see this? I.e.:
- What version(s) of Android are they running?
- What browsers are available, and what versions are they?
- Pedro V.510 years agoNew member | Level 1
One device where it happens:
- Samsung SM-P600
- Android 4.4.2
- Browsers: Chrome, Firefox, Internet (default)
- Greg-DB10 years ago
Dropbox Community Moderator
Thanks! I'm working on reproducing this, but I can't seem to get the SDK to give me a URL that doesn't have the "https://" at the beginning, which seems to be the important difference, per the exception in your posted log. The URL is built by
RESTUtility.buildURLin com/dropbox/client2/RESTUtility.java. That only returns eithernull(in case of anUnsupportedEncodingException) or:return "https://" + host + ":443" + target;Is your
RESTUtility.buildURLmodified by any chance?Otherwise, can you try adding some logging to see if/where it's getting modified? E.g., something like this between
RESTUtility.buildURLandIntent intent = new Intent...instartWebAuth:Log.d("TEST", "url: " + url); Log.d("TEST", "parsed URI: " + Uri.parse(url)); - Pedro V.510 years agoNew member | Level 1
Sorry, you're absolutely right. This was our fault.
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
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!