Skip to content

Deployment Issue: GraphBuilder App on AWS Linux (Docker + Ollama) - auth0-spa-js must run on a secure origin #1238

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

Open
damiannqn90 opened this issue Apr 17, 2025 · 12 comments

Comments

@damiannqn90
Copy link

Hi everyone,

I successfully set up GraphBuilder locally on my PC, running with Ollama in Docker and connected to a local DBMS. Now, I’m trying to deploy the same project to an AWS Linux instance and access it via the public IP (http://<PUBLIC_IP>:8080).

Steps Taken on AWS Linux:
Docker & Docker Compose: Installed and verified.

Ollama: Running in a container (same docker-compose.yml as local).

Ports: Confirmed 8080 is open in the AWS Security Group (inbound rules for 0.0.0.0/0).

Launch: The app starts without errors (docker-compose up -d shows all containers healthy).

The Issue:
When accessing http://<PUBLIC_IP>:8080, I get

Image

Image

index-e20483f0.js:40 Error:
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.

at index-e20483f0.js:68:4887
at new wde (index-e20483f0.js:70:9)
at index-e20483f0.js:70:17293
at Object.yF [as useState] (index-e20483f0.js:38:19949)
at Pi.useState (index-e20483f0.js:9:6427)
at Ide (index-e20483f0.js:70:17266)
at Wj (index-e20483f0.js:38:17030)
at xX (index-e20483f0.js:40:44101)
at yX (index-e20483f0.js:40:39819)
at $ce (index-e20483f0.js:40:39745)

JT @ index-e20483f0.js:40Entender este error
index-e20483f0.js:40 Uncaught Error:
auth0-spa-js must run on a secure origin. See https://github.com/auth0/auth0-spa-js/blob/main/FAQ.md#why-do-i-get-auth0-spa-js-must-run-on-a-secure-origin for more information.

at index-e20483f0.js:68:4887
at new wde (index-e20483f0.js:70:9)
at index-e20483f0.js:70:17293
at Object.yF [as useState] (index-e20483f0.js:38:19949)
at Pi.useState (index-e20483f0.js:9:6427)
at Ide (index-e20483f0.js:70:17266)
at Wj (index-e20483f0.js:38:17030)
at xX (index-e20483f0.js:40:44101)
at yX (index-e20483f0.js:40:39819)
at $ce (index-e20483f0.js:40:39745)

Any idea if i have to change any .env file or the docker-compose file ??

Thanks :)

@kartikpersistent
Copy link
Collaborator

Hi @damiannqn90 make sure VITE_SKIP_AUTH this variable is set to true to disable auth

@damiannqn90
Copy link
Author

I have VITE_SKIP_AUTH set to true. When I run the backend and frontend separately and access the app through port 5173, everything works fine. However, when I launch the app with Docker, I get the error I mentioned earlier. Both .env files are identical—do I need to modify something in the docker-compose.yml file?

running front and back separately, port 5173

Image

running docker-compose port 8080

Image

.env file :

VITE_BACKEND_API_URL="http://34.241.17.195:8000"
VITE_BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,web"
VITE_LLM_MODELS=ollama_llama3
VITE_ENV="DEV"
VITE_TIME_PER_PAGE=50
VITE_CHUNK_SIZE=5242880
VITE_CHUNK_OVERLAP=20
VITE_TOKENS_PER_CHUNK=100
VITE_CHUNK_TO_COMBINE=1
VITE_LARGE_FILE_SIZE=5242880
VITE_GOOGLE_CLIENT_ID=""
VITE_CHAT_MODES=""
VITE_BATCH_SIZE=2
VITE_LLM_MODELS_PROD="llama3"
VITE_FRONTEND_HOSTNAME="localhost:8080"
VITE_SEGMENT_API_URL=""
VITE_AUTH0_CLIENT_ID=""
VITE_AUTH0_DOMAIN=""
VITE_SKIP_AUTH=true

@kartikpersistent
Copy link
Collaborator

Hi @damiannqn90 if you see the code code the default for VITE_SKIP_AUTH is set to true and in docker compose file we mentioned the env file path add the .env with proper values in the frontend folder and then run the docker compose

@damiannqn90
Copy link
Author

damiannqn90 commented Apr 18, 2025

Thanks for your response @kartikpersistent

As you can see below, I already have VITE_SKIP_AUTH set to true in my .env file:

VITE_BACKEND_API_URL="http://34.241.17.195:8000"
VITE_BLOOM_URL="https://workspace-preview.neo4j.io/workspace/explore?connectURL={CONNECT_URL}&search=Show+me+a+graph&featureGenAISuggestions=true&featureGenAISuggestionsInternal=true"
VITE_REACT_APP_SOURCES="local,youtube,wiki,s3,web"
VITE_LLM_MODELS=ollama_llama3
VITE_ENV="DEV"
VITE_TIME_PER_PAGE=50
VITE_CHUNK_SIZE=5242880
VITE_CHUNK_OVERLAP=20
VITE_TOKENS_PER_CHUNK=100
VITE_CHUNK_TO_COMBINE=1
VITE_LARGE_FILE_SIZE=5242880
VITE_GOOGLE_CLIENT_ID=""
VITE_CHAT_MODES=""
VITE_BATCH_SIZE=2
VITE_LLM_MODELS_PROD="llama3"
VITE_FRONTEND_HOSTNAME="localhost:8080"
VITE_SEGMENT_API_URL=""
VITE_AUTH0_CLIENT_ID=""
VITE_AUTH0_DOMAIN=""
VITE_SKIP_AUTH=true

I’m not entirely sure if I’m interpreting your message correctly — please let me know if I’m missing something or if there’s anything else I should adjust, but with this config is not working (i am having the error message)

Thanks again !

@kartikpersistent
Copy link
Collaborator

kartikpersistent commented Apr 21, 2025

Hi @damiannqn90 I meant to add the the .env file in the frontend folder and redeploy

@damiannqn90
Copy link
Author

Hi @kartikpersistent sorry but I’m even more confused now. Should I literally add the word “this” somewhere? Because if not, I don’t really understand.

My .env file inside the frontend folder has always included the line:

VITE_SKIP_AUTH=true

When I run the project using Docker, I get the error.

However, if I use the exact same .env file and run the backend and frontend manually (without Docker), I don’t get that error.

Thanks for your help, and apologies in advance if I’m not fully understanding things.

@kartikpersistent
Copy link
Collaborator

Hi @damiannqn90 it's better to connect and resolve the miscommunication

@kartikpersistent
Copy link
Collaborator

Have you tried to Rum the application through docker then it should work in AWS Linux deployment

@kartikpersistent
Copy link
Collaborator

I suggested adding a .env file in the front-end folder and then running docker-compose up --build

@damiannqn90
Copy link
Author

Hi @kartikpersistent,

Thank you very much for your response — I really appreciate it!

I’ll share the step-by-step process below. I believe it would be very helpful if we could connect directly, as it might be easier to resolve this issue with a quick video call. Feel free to reach out to me at gaglianodamian90@gmail.com to coordinate a time or let me know your e-mail address so i can send you a Google meet.

Step-by-step:

1 - .env file in AWS vm :

Image

2 - Run docker-compose up --build

Image

3 - Try to connecto with the front-end app by http://34.247.183.61:8080/

Image

Image

@kartikpersistent
Copy link
Collaborator

Hi @damiannqn90 where exactly the .env file is located for frontend we mentioned env file should be present withing frontend folder

@damiannqn90
Copy link
Author

@kartikpersistent the .env file is located inside the folder of frontend, in ../graph_builder/llm-graph-builder/frontend/

Image

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

No branches or pull requests

2 participants