plaid / react-plaid-link

React bindings for Plaid Link
https://plaid.github.io/react-plaid-link
MIT License
270 stars 151 forks source link

linkTokenConfiguration.token: is invalid, it must contain an environment name. #342

Closed dfvalenciaviamericas closed 1 month ago

dfvalenciaviamericas commented 6 months ago

Hi Plaid

i am trying to run tiny TinyQuickstartReactNative using this variables in the .env file PLAID_CLIENT_ID=*our_plaid_client_id**** PLAID_SECRET=*our_plaid_secret***** PLAID_ENV=DEV PLAID_SANDBOX_REDIRECT_URI=https://cdn-testing.plaid.com/link/v2/stable/sandbox-oauth-a2a-react-native-redirect.html PLAID_ANDROID_PACKAGE_NAME=com.tinyquickstartreactnative

however when i click in the "open link button" i am receiving this message error : {"error": {"displayMessage": "linkTokenConfiguration.token: is invalid, it must contain an environment name.", "errorCode": "6", "errorDisplayMessage": "linkTokenConfiguration.token: is invalid, it must contain an environment name.", "errorJson": null, "errorMessage": "linkTokenConfiguration.token: is invalid, it must contain an environment name.", "errorType": "creation error", "metadata": {"institution": null, "linkSessionId": null, "metadataJson": null, "requestId": null, "status": null}}}

image
phoenixy1 commented 6 months ago

It sounds like the app's backend call to /link/token/create might have failed -- can you verify that you successfully created a link token? You should be able to check your logs at https://dashboard.plaid.com/developers/logs. If the call failed, an error code for the failure should be in the logs.

dfvalenciaviamericas commented 6 months ago

I am getting this error when trying to call create_link_token

image

error catch create_link_token LOG [SyntaxError: JSON Parse error: Unexpected character: <]

ToddKerpelman commented 6 months ago

IIRC, the Plaid Environment should be sandbox production or development (and development is going away next month). Try using sandbox for now and see if that helps.

dfvalenciaviamericas commented 6 months ago

i am using sandbox but issue persists

image

any other advise @ToddKerpelman

RevanthGundala commented 2 months ago

Running into the same issue

phoenixy1 commented 1 month ago

Also, make sure the .env.example file is renamed to .env.

I'm going to close this out since it's a bit old -- if anyone else is seeing the same issue, please re-open a new issue.