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

PlaidLink is closed right away after the loading circle appears #620

Closed
jdconley opened this issue Jan 12, 2024 · 15 comments
Closed

PlaidLink is closed right away after the loading circle appears #620

jdconley opened this issue Jan 12, 2024 · 15 comments

Comments

@jdconley
Copy link

jdconley commented Jan 12, 2024

The problem

The Link UI isn't displaying on our Android app. There are some warnings and errors in the logs that might be relevant.

Environment

Plaid Link React Native 11.2.0
ReactNative Version 0.72.6
Occurs on Android yes
Android OS Version 14 (34)
Android Devices/Emulators Pixel 8 physical and various emulators
Occurs on iOS no
iOS Version 16+
iOS Devices/Emulators all
Link Session ID not sure, never see it in the logs

Steps to Reproduce

In order to get the app to compile I did some version mappings in gradle as shown in #608 :

    def lifecycle_version = "2.5.1"
    implementation "androidx.lifecycle:lifecycle-viewmodel:$lifecycle_version"
    implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version"
    def work_version = "2.8.1"
    implementation "androidx.work:work-runtime:$work_version"
    implementation "androidx.work:work-runtime-ktx:$work_version"

Create a link token and then attempt to open the link UI. The UI doesn't display.

Expected Result

Link UI to display.

Screenshots

Link never displays it's just my app.

Logs

2024-01-12 13:46:53.567 31753-31880 ReactNativeJS           com.myapp               I  Plaid link token created: link-production-5c2bc59c-4a8b-48f8-830d-bb2bd99977c6
2024-01-12 13:46:53.639 31753-31753 cr_CombinedPProvider    com.myapp               I  #registerProvider() provider:WV.v7@88a3583 isPolicyCacheEnabled:false policyProvidersSize:0
2024-01-12 13:46:53.641 31753-31753 cr_PolicyProvider       com.myapp               I  #setManagerAndSource() 0
2024-01-12 13:46:53.688 31753-31753 cr_CombinedPProvider    com.myapp               I  #linkNativeInternal() 1
2024-01-12 13:46:53.688 31753-31753 cr_AppResProvider       com.myapp               I  #getApplicationRestrictionsFromUserManager() Bundle[EMPTY_PARCEL]
2024-01-12 13:46:53.688 31753-31753 cr_PolicyProvider       com.myapp               I  #notifySettingsAvailable() 0
2024-01-12 13:46:53.688 31753-31753 cr_CombinedPProvider    com.myapp               I  #onSettingsAvailable() 0
2024-01-12 13:46:53.688 31753-31753 cr_CombinedPProvider    com.myapp               I  #flushPolicies()
2024-01-12 13:46:53.771 31753-32033 cr_TrackExitReasons     com.myapp               E  Failed to parse JSON from file.
2024-01-12 13:46:53.779 31753-31753 Compatibil...geReporter com.myapp               D  Compat change id reported: 214741472; UID 10275; state: ENABLED
2024-01-12 13:46:53.835 31753-31753 erhour.chat.dev         com.myapp               W  Accessing hidden method Ljava/lang/invoke/MethodHandles$Lookup;-><init>(Ljava/lang/Class;I)V (unsupported, reflection, allowed)
2024-01-12 13:46:53.864 31753-31753 erhour.chat.dev         com.myapp               W  Accessing hidden field Landroid/content/pm/ApplicationInfo;->primaryCpuAbi:Ljava/lang/String; (unsupported, reflection, allowed)
2024-01-12 13:46:53.884 31753-31753 WindowOnBackDispatcher  com.myapp               W  OnBackInvokedCallback is not enabled for the application.
                                                                                                    Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2024-01-12 13:46:53.963 31753-32080 TrafficStats            com.myapp               D  tagSocket(146) with statsTag=0xffffffff, statsUid=-1
2024-01-12 13:46:54.754 31753-31753 WindowOnBackDispatcher  com.myapp               W  OnBackInvokedCallback is not enabled for the application.
                                                                                                    Set 'android:enableOnBackInvokedCallback="true"' in the application manifest.
2024-01-12 13:46:54.789 31753-32090 TrafficStats            com.myapp               D  tagSocket(305) with statsTag=0x90000, statsUid=-1
2024-01-12 13:46:54.873 31753-31753 Compatibil...geReporter com.myapp               D  Compat change id reported: 193247900; UID 10275; state: ENABLED
2024-01-12 13:46:54.889 31753-31753 libEGL                  com.myapp               D  loaded /vendor/lib64/egl/libGLES_mali.so
2024-01-12 13:46:54.958 31753-32036 cr_media                com.myapp               W  BLUETOOTH_CONNECT permission is missing.
2024-01-12 13:46:54.958 31753-32036 cr_media                com.myapp               W  registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
2024-01-12 13:46:55.005 31753-31753 Compatibil...geReporter com.myapp               D  Compat change id reported: 78294732; UID 10275; state: ENABLED
2024-01-12 13:46:55.011 31753-31880 ReactNativeJS           com.myapp               I  Plaid link exit: {"metadata":{}}
2024-01-12 13:46:55.030 31753-32170 TrafficStats            com.myapp               D  tagSocket(197) with statsTag=0xffffffff, statsUid=-1
2024-01-12 13:46:55.067 31753-31753 WindowOnBackDispatcher  com.myapp               W  sendCancelIfRunning: isInProgress=falsecallback=android.view.ViewRootImpl$$ExternalSyntheticLambda17@f3dd28
2024-01-12 13:46:55.078 31753-31880 ReactNativeJS           com.myapp               I  [App State] Now: active
2024-01-12 13:46:55.084 31753-31753 chromium                com.myapp               E  [ERROR:aw_browser_terminator.cc(154)] Renderer process (32014) crash detected (code -1).
2024-01-12 13:46:55.114 31753-31812 Compatibil...geReporter com.myapp               D  Compat change id reported: 194532703; UID 10275; state: ENABLED
2024-01-12 13:46:55.116 31753-31812 Compatibil...geReporter com.myapp               D  Compat change id reported: 253665015; UID 10275; state: DISABLED
2024-01-12 13:46:56.236 31753-31880 ReactNativeJS           com.myapp               I  [AnalyticsService] Tracked "App Opened"

Code To Reproduce Issue

A very basic link open.

        openLink({
          tokenConfig: {
            token: linkTokenResponse.token,
            noLoadingState: true, // also tried false
            logLevel: LinkLogLevel.DEBUG,
          },
          onSuccess: success => this.onLinkSuccess(success),
          onExit: exit => this.onLinkExit(exit),
          iOSPresentationStyle: LinkIOSPresentationStyle.FULL_SCREEN,
        });
@jdconley
Copy link
Author

I just created a brand new react native app (0.73.2) and tried to use the PlaidLink Pressable component with the same result. Though this time I didn't need to do the gradle hacks as above, so the plaid android sdk must line up better with the latest react native sdk.

@dtroupe-plaid
Copy link
Collaborator

@jdconley thanks for reporting. I am unable to reproduce this issue on Android 13. I used the token from your logs here are the results

Screenshot_1705101839

link-loading.mov

It also looks like there is a crash occurring in the logs

[ERROR:aw_browser_terminator.cc(154)] Renderer process (32014) crash detected (code -1).

Does this issue only occur on Android 14?

@dtroupe-plaid
Copy link
Collaborator

@jdconley I've confirmed the issue is specific to Android 14 and I can reproduce it. I'll report back once I have an update.

@jdconley jdconley changed the title Link doesn't display on Android Link doesn't display on Android 14 Jan 12, 2024
@jdconley
Copy link
Author

jdconley commented Jan 12, 2024

Thanks! FYI I also downgraded to the 10.x version of the Plaid Link RN SDK and had the same result. 9.x doesn't build with modern RN due to some gradle plugin incompatibilities.

@dtroupe-plaid
Copy link
Collaborator

dtroupe-plaid commented Jan 12, 2024

@jdconley are you using the same token? Do you have the same result on sandbox?

I was able to reproduce the issue once, but after trying another token the UI did load as expected. Oddly enough it will also now load with the token provided in the logs 🤔

@jdconley
Copy link
Author

@jdconley are you using the same token? Do you have the same result on sandbox?

I was able to reproduce the issue once, but after trying another token the UI did load as expected. Oddly enough it will also now load with the token provided in the logs 🤔

That's... unfortunate. I was testing with that token but I can generate a new one. How about link-production-b3b87048-f751-4ee1-9e8b-a8f68161adfa -- just failed to launch link with it in my app. Haven't tried sandbox yet. Do you need my token creation arguments or can you look that up internally?

@dtroupe-plaid
Copy link
Collaborator

It's very inconsistent for me. Some times it loads and some times it exits right away. I think I have all the information I need for now. Thanks for the help 🙏

@dtroupe-plaid dtroupe-plaid changed the title Link doesn't display on Android 14 PlaidLink is closed right away after the loading circle appears Jan 16, 2024
@ChanukaSandeepa
Copy link

Still UI does not load even with newly created tokens on SandBox. The UI loads with an error message only when the token is expired. Do you have some suggestions?

@jdconley
Copy link
Author

I just loaded up Android 13 in a simulator to see if I could test the feature there. It is reproducing for me on Android 13 API 33 as well in the arm64 simulator.

@dtroupe-plaid
Copy link
Collaborator

@ChanukaSandeepa @jdconley I was able to reproduce this issue in version 4.1.0 of our android SDK.

We are working to resolve the issue. In the meantime you can use a version of the RN sdk that doesn't use version 4.1.0 or 3.14.2 that means you want to use version v11.1.0 or v10.9.0.

Please let me know if you have issues with either of those SDKs. I will post an timeline update as soon as I have one. Thanks for your patience 🙏

@jdconley
Copy link
Author

jdconley commented Jan 17, 2024

We are working to resolve the issue. In the meantime you can use a version of the RN sdk that doesn't use version 4.1.0 or 3.14.2 that means you want to use version v11.1.0 or v10.9.0.

Confirmed the Link UI loads for me on v11.1.0.

@ChanukaSandeepa
Copy link

ChanukaSandeepa commented Jan 17, 2024

The UI does not loads for v11.1.0 and I'm getting a crash for v10.9.0. The crash says PlaidAndroid.startLinkActivityForResult got 3 arguments, expected 5. Do you have any suggestions for these 5 arguments?

Here is the code example,

<PlaidLink
                tokenConfig={{
                    token: ""
                    logLevel: LinkLogLevel.DEBUG,
                    noLoadingState: false,
                }}
                onSuccess={(success) => { console.log(success) }}
                onExit={(linkExit) => { console.log(linkExit) }}
                iOSPresentationStyle={LinkIOSPresentationStyle.MODAL}
          >
              <Text>Add Account</Text>
  </PlaidLink>

@ChanukaSandeepa
Copy link

I resolved the problem by clearing cache and rebuilding the app with v11.1.0. Thank you!

This was referenced Jan 18, 2024
@dtroupe-plaid
Copy link
Collaborator

dtroupe-plaid commented Jan 18, 2024

Hi

I've released v11.3.0 && v10.11.0 which revert the Android SDK to 4.0.0 or 3.14.1 neither of which has this issue.

Additionally, versions 11.2.0 and 10.10.0 are deprecated.

I will leave this issue open until we have an updated Android SDK and we confirm the issue no longer exists. For now using the latest SDK will avoid this problem 🙏

@dtroupe-plaid
Copy link
Collaborator

Releases 11.4.0 and v10.12.0 were released today to address this issue. I am going to close this issue.

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

3 participants