plaid / plaid-link-android

Plaid Link Android SDK
https://plaid.com/docs/link/android
MIT License
114 stars 48 forks source link

SDK version 4.1.0 exits immediately after launch #260

Closed tadfisher closed 7 months ago

tadfisher commented 8 months ago

The problem

Using the native SDK, launching via the OpenPlaidLink() contract results in a short loading screen, then LinkActivity finishes immediately after calling the workflow endpoint. The Link flow works correctly on version 4.0.0, and exhibits this behavior on version 4.1.0.

When this occurs, no logs are printed to Logcat (with LinkLogLevel.VERBOSE) and we receive a LinkExit result with all fields set to null. No activity is logged with my client_user_id in either Logs or Item Debugger.

Environment

Android OS Version 14 (34)
Android Devices/Emulators Pixel 7 Pro, Pixel 6 Pro, emulator

Steps to Reproduce

Token configuration:

{
   "client_id":"OMITTED",
   "secret":"OMITTED",
   "user":{
      "client_user_id":"OMITTED",
   },
   "client_name":"Mercury",
   "products":[
      "auth",
      "transactions"
   ],
   "country_codes":[
      "US"
   ],
   "language":"en",
   "webhoook":"OMITTED",
   "android_package_name":"com.mercury.bank.dev"
}

Logs

logcat session

Code To Reproduce Issue

This is a Compose application, but that shouldn't affect much (and this code works with 4.0.0):

// For example
@Composable
fun LaunchPlaidButton(val token: String, onResult: (LinkResult) -> Unit) {
    val launcher = rememberLauncherForActivityResult(OpenPlaidLink(), onResult)
    Button(
        onClick = {
            launcher.launch(linkTokenConfiguration {
                logLevel = LinkLogLevel.VERBOSE
                this.token = token
            })
        },
    ) {
        Text("Launch Plaid Link")
    }
}
dseverns-livefront commented 8 months ago

Plus one to this, just started working with Plaid so no example of working but exactly the same scenario listed here. Also attempted with this sample app and same result.

eric-labelle commented 8 months ago

@tadfisher / @dseverns-livefront mind looking with StrictMode? Probably the same issue I filed earlier this week.

melissaosullivan commented 8 months ago

Hi,

I double checked that this sample app is not seeing this auto-close issue on 4.1.0. I also built a small demo with compose and I can't reproduce the issue described. Could you please provide a sample app which displays this issue?

Thanks, Melissa

dseverns-livefront commented 8 months ago

@melissaosullivan I tried this with the Plaid sample, only change I made was changing the product to auth to match my Plaid accounts, Can confirm after I tried version 4.0.0 it worked for me.

dseverns-livefront commented 8 months ago

@eric-labelle 4.1 was not working for me with and without strict mode enabled and never saw that stack trace. 4.0 works for both configs though.

melissaosullivan commented 7 months ago

@dseverns-livefront I'm not able to reproduce this issue so far. A few questions:

melissaosullivan commented 7 months ago

@tadfisher @dseverns-livefront I think I've found the issue and addressed this in the 4.1.1 release. Please try out this version. Thanks.

dseverns-livefront commented 7 months ago

What do you mean by "changing the product to auth to match my Plaid accounts?" Is this referring to the token creation request? Are you using a sandbox token?

Sorry, I changed the array in the server config to replace "transactions" with "auth" and yes it was sandbox tokens

melissaosullivan commented 7 months ago

Closing this ticket as this issue has been addressed in 4.1.1. Please upgrade to that version. Thanks for reporting this bug!