jorgefspereira / plaid_flutter

Plaid Link for Flutter. Integrates the native iOS, Android and Web SDKs.
https://pub.dev/packages/plaid_flutter
MIT License
70 stars 50 forks source link

Unable to start activity ComponentInfo{.../com.plaid.internal.LinkRedirectActivity} #36

Closed boomney closed 3 years ago

boomney commented 3 years ago

I am using Andriod Studio to build flutter app using this plugin. The link flow initialises as expected in the Emulator and I am redirected to the Bank (Monzo UK) but on completion and when the screen shows "All done", I am not redirected back to myapp, the emulator crashes - and I get the following messages:

I/flutter (11790): onEvent: verify.monzo.com, metadata: viewName: , exitStatus: null, mfaType: null, requestId: , timestamp: , linkSessionId: , institutionId: null, institutionName: null, institutionSearchQuery: null, errorType: null, errorCode: null, errorMesssage: null
I/utter_testapp_(11790): WaitForGcToComplete blocked HeapTrim on ProfileSaver for 5.674s
D/AndroidRuntime(11790): Shutting down VM
E/AndroidRuntime(11790): FATAL EXCEPTION: main
E/AndroidRuntime(11790): Process: com.company.flutter_testapp_1, PID: 11790
E/AndroidRuntime(11790): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.company.flutter_testapp_1/com.plaid.internal.LinkRedirectActivity}: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(11790):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3449)
E/AndroidRuntime(11790):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
E/AndroidRuntime(11790):    at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
E/AndroidRuntime(11790):    at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
E/AndroidRuntime(11790):    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
E/AndroidRuntime(11790):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
E/AndroidRuntime(11790):    at android.os.Handler.dispatchMessage(Handler.java:106)
E/AndroidRuntime(11790):    at android.os.Looper.loop(Looper.java:223)
E/AndroidRuntime(11790):    at android.app.ActivityThread.main(ActivityThread.java:7656)
E/AndroidRuntime(11790):    at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(11790):    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
E/AndroidRuntime(11790):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
E/AndroidRuntime(11790): Caused by: java.lang.IllegalStateException: You need to use a Theme.AppCompat theme (or descendant) with this activity.
E/AndroidRuntime(11790):    at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:843)
E/AndroidRuntime(11790):    at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:806)
E/AndroidRuntime(11790):    at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:693)
E/AndroidRuntime(11790):    at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:170)
E/AndroidRuntime(11790):    at com.plaid.internal.LinkRedirectActivity.onCreate(SourceFile:2)
E/AndroidRuntime(11790):    at android.app.Activity.performCreate(Activity.java:8000)
E/AndroidRuntime(11790):    at android.app.Activity.performCreate(Activity.java:7984)
E/AndroidRuntime(11790):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
E/AndroidRuntime(11790):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3422)
E/AndroidRuntime(11790):    ... 11 more
I/Process (11790): Sending signal. PID: 11790 SIG: 9
boomney commented 3 years ago

Sorry, I figured it out, needed to change/add 'Theme.AppCompat' to AndriodManifest.

chillbrodev commented 3 years ago

@boomney I am getting this error, on which activity did you add Theme.AppCompat? Thanks in advanced.

Edit: I found some info here https://github.com/plaid/plaid-link-android/issues/148