plaid / plaid-link-android

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

metadataJson fields returning wrong strings #188

Closed nfarina closed 3 years ago

nfarina commented 3 years ago

The problem

Our app runs in an Android WebView, but uses the native Plaid Link SDK. We use metadataJson to pass information from the native Plaid SDK to the web app. We just upgraded to the latest (v3.5.0) version of the Plaid SDK, and in this version the metadataJson field is returning strings that do not contain valid JSON. Here's an example:

# com.plaid.internal.core.protos.link.workflow.primitives.SdkResult$SDKResult$Metadata@79ce6e4b
institution {
  institution_id: "ins_129229"
  name: "Varo Bank"
}
link_session_id: "66f1e230-0000-1111-2222-8b8d1c4c99e8"
status: "requires_credentials"

That's the actual String value of the metadataJson field.

Environment

Android OS Version 11
Android Devices/Emulators Pixel 3 physical

Steps to Reproduce

I'm simply calling Plaid.create as usual and listening for callbacks.

Expected Result

A valid JSON string in onExit, onSuccess, and also Plaid.setLinkEventListener events (although these have never returned any metadataJson values at all!).

amytang0 commented 3 years ago

Hi, thanks for flagging this! We recommend grabbing the values directly from the object, but this will be fixed in the next release

amytang0 commented 3 years ago

3.5.1 should have resolved this issue, please re-open this if not the case. Thank you!