I previously deployed a Langgraph application that was functioning correctly. Initially, the Langgraph backend API was hosted locally on my computer using a Docker container, and the app worked as long as the container was running.
Recently, I migrated the backend API to Langgraph Cloud and removed the previous frontend deployment on Vercel before redeploying it. I updated the environment variable NEXT_PUBLIC_API_URL to point to the new cloud API server. However, the application is no longer working as expected—it appears to be attempting to connect to the local API server (http://localhost:8123) instead of the cloud server. Notably, when I run the Docker container locally, the application functions properly, and I have confirmed that the code does not have the local URL hard-coded.
Could you please help me resolve this issue and ensure that the app connects to the Langgraph Cloud API server?
Hi @kihumban, sorry that you’re facing this issue. If I understand it correctly, you are using Langgraph Cloud API and store the API URL in the NEXT_PUBLIC_API_URL variable, which your frontend code is using.
Can you help me with some questions:
Have your re-deployed the application on Vercel after changing the environment variable? Was the deployment successful?
What is the link to the latest deployment so we can see the frontend application in action?
Yes I have redeployed the App in vercel. In fact I deleted in initial deployment and initiated a new deployment, but from the same repository. It seem the app still reading the old configuration - a cache issue
@anshumanb deleted the deployment and redeployed it. Now it seem to be pointing to the backend API server but I am getting the following error even after passing the API key in the header:
Hi @kihumban, nice to see you fixed the initial issue. This error seems to be related to the API. Have you already checked the API documentation to ensure you are using it correctly?
Can you share the code and what you are trying to do with that code so we can help?
@anshumanb This is a chatbot. It’s completely working fine when it test the remote (cloud server) on Jupyter Notebook and it is also run successfully with local API server. It just seem to fail when running with web frontend client and the langgraph cloud backend server which is throwing 403 error - “Missing authentication headers”
Hi @kihumban, thanks for sharing additional information. But, it looks like the langgraph server needs additional headers for authentication or CORS purposes when using from a deployed frontend application.
I’d recommend talking to the langgraph cloud team to understand what could be going wrong.