question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dropbox login crash on Android 13 with targetSdk 33

See original GitHub issue

Hi, I’ve lifted my app to targetSdk 33. The Dropbox login flow crashes on my Android 13 device when pressing “Allow” in the “grant access” dialog in the Dropbox app (i.e. throwing ActivityNotFound when trying to call back to my app). Very likely root cause: “Intent filters block non-matching intents” change introduced with Android 13 SDK 33. It works fine when reverting my app to targetSdk 31.

Are you aware of this issue? I assume this needs a patch on your side (?)

Stack trace:

Process: [com.dropbox.android](http://com.dropbox.android/)
    android.content.ActivityNotFoundException: Unable to find explicit activity class {com.myapp.MyActivity/com.dropbox.core.android.AuthActivity}; have you declared this activity in your AndroidManifest.xml, or does your intent not match its declared <intent-filter>?
        at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2158)
        at android.app.Instrumentation.execStartActivity(Instrumentation.java:1805)
        at android.app.Activity.startActivityForResult(Activity.java:5470)
        at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:2)
        at android.app.Activity.startActivityForResult(Activity.java:5428)
        at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.java:1)
        at android.app.Activity.startActivity(Activity.java:5926)
        at android.app.Activity.startActivity(Activity.java:5893)
        at dbxyzptlk.Wd.a.b(RealSafeIntentStarter.java:3)
        at com.dropbox.android.dauth.DelegatedAuthActivity$j$c.a(DelegatedAuthActivity.java:9)
        at com.dropbox.android.dauth.DelegatedAuthActivity$j.a(DelegatedAuthActivity.java:2)
        at dbxyzptlk.Vg.c.onPostExecute(DbxAsyncTask.java:10)
        at android.os.AsyncTask.finish(AsyncTask.java:771)
        at android.os.AsyncTask.-$$Nest$mfinish(Unknown Source:0)
        at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:788)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7898)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:12 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
DynamicG-Androidcommented, Aug 15, 2022

perfect. yes this works. many thanks. (and yes, my manifest entry is like in the example app).

recap for those stumbling over the same problem and seeing this - the second intent-filter needs to be added to manifest when targeting Android 13:

        <activity
            android:name="com.dropbox.core.android.AuthActivity"
            android:exported="true"
            android:configChanges="orientation|keyboard"
            android:launchMode="singleTask">
            <intent-filter>
                <!-- Change this to be db- followed by your app key -->
                <data android:scheme="db-${dropboxKey}" />
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.BROWSABLE" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
            <!-- for Android 13 -->
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
            </intent-filter>
        </activity>

1reaction
devPalaciocommented, Sep 23, 2022

Yes, this is a valid as a workaround until you’re confident your users are running a newer version of Dropbox.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ActivityNotFoundException during authentication started to ...
dropbox.core.android.AuthActivity is directly in the Manifest of the app module. Everything worked fine until targeting Android 13(which forced ...
Read more >
Meeting SDK still crashes on Android 12 or 13 - when ...
I have tried upgrading the Meeting SDK to the latest. How To Reproduce. Set targetSdkVersion 33; Set compileSdkVersion 33; Try to join a...
Read more >
[SOLVED] Error after updating B4A from 11.8 to 12 - B4X
I've enabled android.jar version 33 on IDE Path I've tried to deinstall the app ... (at Binary XML file line #50): com.dropbox.core.android.
Read more >
Android SDK crash - Dropbox Community
Hi. I have implemented Dropbox API in my android app. After released the app to public, I got a number of crash report...
Read more >
can't deliver broadcast [245258072] - Visible to Public - Issue ...
In firebase I see crashes only for Android 13 (Only Pixel devices) ... Our targetSdkVersion is 33 and minSdkVersion is 21.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found