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

Invalid value "undefined" for header "PLAID-CLIENT-ID" #217

Closed
TobiasDeBruijn opened this issue May 15, 2021 · 16 comments · May be fixed by #225
Closed

Invalid value "undefined" for header "PLAID-CLIENT-ID" #217

TobiasDeBruijn opened this issue May 15, 2021 · 16 comments · May be fixed by #225

Comments

@TobiasDeBruijn
Copy link

Hey there,

I'm unable to get this quickstart going due to the error Invalid value "undefined" for header "PLAID-CLIENT-ID" which is thrown on the backend when I load the frontend.

Here's my .env with some redacted values:

PLAID_CLIENT_ID=REDACTED
PLAID_SECRET=REDACTED
PLAID_ENV=development
PLAID_PRODUCTS=auth,transactions
PLAID_COUNTRY_CODES=NL
PLAID_REDIRECT_URI=REDACTED

I've added a .env in frontend/ as per #184:

DANGEROUSLY_DISABLE_HOST_CHECK=true

I'm using the Docker container method, however I am running it on Kubernetes. I'm routing / to the frontend, and /api to the backend, since that is what it seems to be making requests to.

See the screenshot for the error in the frontend:
image

Screenshot of the error in the backend:
image

@phoenixy1
Copy link
Contributor

Hi @TheDutchMC! We tried this ourselves but haven't been able to reproduce this issue on a non-Kubernetes setup. As @skylarmb mentioned in #184, the Quickstart app makes assumptions that you're running it locally and hasn't been configured to support hosting it in this way. Can you reproduce the issue if you are running it locally?

@TobiasDeBruijn
Copy link
Author

Fair point. Ill see if I can get it working locally. Thinking about it, I dont think I need to keep this app running indefinitely anyways, so that should be fine (Using it as per Firefly-iii's Plaid integration guide)

@phoenixy1
Copy link
Contributor

@TheDutchMC Any updates? If it's still not working when configured locally, please let us know, otherwise I plan to close this issue out.

@TobiasDeBruijn
Copy link
Author

My apologies for the delay, I've been a bit busy of the past week.

I've set up the quickstart as per the guide in the README locally. Connecting to localhost:3000, the frontend shows, gives a 500 for favicon.ico, and the /api/info request is just stuck at pending (No errors that I can see in the backend).

Might be important to note that I had to change the provided docker-compose file, in the file the name property was defined under networks, which it didn't like. Could that be related?

I've tried the Node and Java backends, both give the same result.

@phoenixy1
Copy link
Contributor

@lindawoo-plaid would you be able to take a look at this when you get a chance? I am a bit swamped.

@lindawoo-plaid
Copy link
Contributor

@TheDutchMC Why did you have to change the name property in the docker-compose file? Yes, this could have something to do with your error. What change did you make to it? (I'm trying to reproduce your error)

@TobiasDeBruijn
Copy link
Author

Hey there,

I had to remove the name property entirely. Docker compose errored with that it was not allowed there

@lindawoo-plaid
Copy link
Contributor

@skylarmb, Do you have any idea why Docker would not allow the "networks" property on their docker-compose file? This property is necessary for it to run on my machine.

@skylarmb
Copy link
Contributor

skylarmb commented Jun 4, 2021

@TheDutchMC what version of docker / docker-compose are you running? the networks part of the docker-compose file is required for this app to work

@TobiasDeBruijn
Copy link
Author

I'm on Docker version Docker version 20.10.6, build 370c289 and Docker-compose version docker-compose version 1.27.4, build 40524192

@skylarmb
Copy link
Contributor

skylarmb commented Jun 4, 2021

hmm @TheDutchMC i am using almost identical versions and I cannot reproduce this network issue, even if i remove the name property of the network.

However, the original error you posted is quite confounding to me. Somewhere your client id from your env vars is not being set correctly and is ending up as undefined somewhere deep in the stack (you can see the stack trace points to some sort of internal validation inside Axios) when making a network call to the Plaid API.

If you discard your changes and try a different backend such as python or ruby, what error do you get then? Just the 502 error about the frontend not being able to talk to the API? Or is there an error in the api logs as well?

ah, after reading this: #217 (comment) it seems that you are now stuck simply on a docker network issue, not the backend throwing an error. The issue you describe with the frontend network request hanging indefinitely does seem like its an issue with your docker network config and not the app itself.

I tried removing the name config under the network and it still works fine for me. I am using docker 20.10.6 and docker-compose 1.29.1

In the meantime ill continue to play with this to see if i can reproduce something

@skylarmb
Copy link
Contributor

skylarmb commented Jun 4, 2021

Could you confirm real quick that you did not change any other env vars that affect networking such as APP_PORT or REACT_APP_API_HOST or any of the proxy setup e.g. frontend/src/setupProxy.js etc.

@TobiasDeBruijn
Copy link
Author

Honestly, I'm not sure what was going wrong.

I've recloned the repo, faced with the same docker compose error, so I took the key out, and now everyone on the Plaid side works fine.

Not sure what was wrong, but I think it was a one off. I suppose it is then clear to close this issue

@skylarmb
Copy link
Contributor

skylarmb commented Jun 10, 2021

thanks! Ill make a PR to remove name from the docker-compose.yml file as it works without it and seems to cause issues for you

Sounds like it was very likely some temporary network configuration issue on your machine 👍

@TobiasDeBruijn
Copy link
Author

Yep guessing as much :D

@antone29
Copy link

I was getting this same error. I found I was calling for my environment variables in two different places so when i commented one of them out, it worked.

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

Successfully merging a pull request may close this issue.

5 participants