plaid/quickstart

TypeError: Cannot read properties of undefined (reading 'data') at prettyPrintResponse

Karsenh opened this issue · 12 comments

I followed by the documentation on the plaid website as well as the YouTube guide which outlined the quick start docs with some minor changes such as including 'symlink=true' in the git clone command for Win users. Both of these failed in the same manner, throwing the following error:

TypeError: Cannot read properties of undefined (reading 'data') at prettyPrintResponse in my server console each time the React page loads / refreshes. Pretty sure this is on line 438 of the index.js iirc.

I noticed in the YouTube comment section other people having the same issue but I haven't seen any response.

Thank you.

Yeah, I've run into this problem, as well. This is probably happening because your app server is receiving an error from the Plaid service, and we're not properly checking for that before we send the response on to prettyPrintResponse

Long term, we should fix this by making our prettyPrintResponse more resilient to bad data. Short term, see if you can add in a little extra error logging in the function that's trying to call this one to see if you can figure out what's returning an error.

Is there a fix for this?

@maxjowett not yet! As mentioned above, this only occurs if the API call failed, and is a failure to display the backend error message gracefully on the frontend. You can still view the error code in the backend server logs or on dashboard.plaid.com. Let us know if you are stuck!

Got this error too, but haven't been able to fix it. Added a try/catch in the index.js to no avail. No records showing up in the Dashboard/server logs... any ideas?

For the record, I'm on Windows and did follow the steps (the second time.. woops) involving symlinks from Github.

Got this error too, but haven't been able to fix it. Added a try/catch in the index.js to no avail. No records showing up in the Dashboard/server logs... any ideas?

For the record, I'm on Windows and did follow the steps (the second time.. woops) involving symlinks from Github.

FIXED: had to do all of the following:

  1. Run pip install -r requirements.txt from within the quickstart/python folder
  2. Start the server from the python start.sh file
  3. Start the frontend as normally using npm start in the frontend folder
  4. Done!

how do you fix this for node js?

@Solutionsafoot This issue as this is just a symptom of some kind of error happening during an API call and isn't specific enough to provide troubleshooting advice. To troubleshoot this issue, check the console or the Plaid API log at https://dashboard.plaid.com/activity/logs

@Solutionsafoot This issue as this is just a symptom of some kind of error happening during an API call and isn't specific enough to provide troubleshooting advice. To troubleshoot this issue, check the console or the Plaid API log at https://dashboard.plaid.com/activity/logs

as others have stated, this error is not accompanied by anything in the activity logs for me.

interestingly, I added console.log(error.response); on line 487ofnode/index.js`... and then I no longer received an error and was able to move along with attempting a link.

I also got the error in Node, not able to see anything helpful in the console log and nothing in plaid logs. I tried the 487 and that did NOT do anything for me. Giving up on node and going to try Python next.

Copying the .env to the /node directory fixed the issue for me.

Copying the .env to the /node directory fixed the issue for me.

Same! Thank you!