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

Network error #688

Closed
jamalhajizada opened this issue Aug 8, 2024 · 13 comments
Closed

Network error #688

jamalhajizada opened this issue Aug 8, 2024 · 13 comments

Comments

@jamalhajizada
Copy link

Can someone shed a light on why I get "Network error" when trying to do any action? :/
I run contributor. Spent 50 hours to get here))

@gboxxx
Copy link

gboxxx commented Aug 8, 2024

Same here.

Browser console: localhost:8000/api/v1/generate/task:1 Failed to load resource: net::ERR_CONNECTION_REFUSED

Docker-Compose

version: '3.8'

services:
  postgres:
    image: postgres:14-alpine
    restart: always
    # comment out if you want to externally connect DB
    ports:
      - 5432:5432
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
    environment:
      - PGDATA=/var/lib/postgresql/data/pgdata
      - POSTGRES_USER=skyvern
      - POSTGRES_PASSWORD=skyvern
      - POSTGRES_POSTGRES_DB=skyvern
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U skyvern"]
      interval: 5s
      timeout: 5s
      retries: 5

  skyvern:
    image: public.ecr.aws/skyvern/skyvern:latest
    restart: on-failure
    # comment out if you want to externally call skyvern API
    ports:
      - 8523:8000
    volumes:
      - ./artifacts:/data/artifacts
      - ./videos:/data/videos
      - ./har:/data/har
      - ./.streamlit:/app/.streamlit
    environment:
      - DATABASE_STRING=postgresql+psycopg://skyvern:skyvern@postgres:5432/skyvern
      - BROWSER_TYPE=chromium-headful
      - ENABLE_OPENAI=true
      - OPENAI_API_KEY=MYSECRETKEY
      # If you want to use other LLM provider, like azure and anthropic:
      # - ENABLE_ANTHROPIC=true
      # - LLM_KEY=ANTHROPIC_CLAUDE3_OPUS
      # - ANTHROPIC_API_KEY=<your_anthropic_key>
      # - ENABLE_AZURE=true
      # - LLM_KEY=AZURE_OPENAI
      # - AZURE_DEPLOYMENT=<your_azure_deployment>
      # - AZURE_API_KEY=<your_azure_api_key>
      # - AZURE_API_BASE=<your_azure_api_base>
      # - AZURE_API_VERSION=<your_azure_api_version>
    depends_on:
      postgres:
        condition: service_healthy
    healthcheck:
      test: ["CMD", "test", "-f", "/app/.streamlit/secrets.toml"]
      interval: 5s
      timeout: 5s
      retries: 5

  skyvern-ui:
    image: public.ecr.aws/skyvern/skyvern-ui:latest
    restart: on-failure
    ports:
      - 8080:8080
      - 9090:9090
    volumes:
      - ./artifacts:/data/artifacts
      - ./videos:/data/videos
      - ./har:/data/har
      - ./.streamlit:/app/.streamlit
    # environment:
    #   - VITE_API_BASE_URL=
    #   - VITE_SKYVERN_API_KEY=
    depends_on:
      skyvern:
        condition: service_healthy

  streamlit:
    image: public.ecr.aws/skyvern/skyvern:latest
    restart: on-failure
    ports:
      - 8501:8501
    volumes:
      - ./artifacts:/data/artifacts
      - ./videos:/data/videos
      - ./har:/data/har
      - ./.streamlit:/app/.streamlit
    command: ["/bin/bash", "entrypoint-streamlit.sh"]
    depends_on:
      skyvern:
        condition: service_healthy

I was able to edit the Geico example and got some activity (albeit, not good results), but cannot create any new templates due to this error.

Another thing, is - POSTGRES_POSTGRES_DB an error in the repo docker-compose.yml?

@wintonzheng
Copy link
Contributor

Happy to help.

@jamalhajizada how did you run skyvern? I'm also happy to jump onto a call to help debug

@wintonzheng
Copy link
Contributor

Browser console: localhost:8000/api/v1/generate/task:1 Failed to load resource: net::ERR_CONNECTION_REFUSED

    ports:
      - 8523:8000

i wonder if it's because the port number has been modified and the ui is still sending the request to the 8000 port of your localhost

@jamalhajizada
Copy link
Author

jamalhajizada commented Aug 10, 2024

I'd love to. I'm not sure how but network error got fixed.
now i'm having 403 error :) loving it. tried all apis in all the places and certainly having fun :D
403 has to have something to do with network, doesn't it?

@jamalhajizada
Copy link
Author

Happy to help.

@jamalhajizada how did you run skyvern? I'm also happy to jump onto a call to help debug

as contributor. Can't get a docker started.

@LawyZheng
Copy link
Collaborator

@jamalhajizada Can you try to delete the file .streamli/secret.toml first and then run docker compose down, docker compose up

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the Stale label Sep 16, 2024
@rjodwyer
Copy link

Not sure if you got it to work, but I had to update the VITE_API_BASE_URL to a resolvable URL and then add the API key from the UI into VITE_SKYVERN_API_KEY and it works.

Now I cannot see any progress in the UI though, so not sure if it is dependant on that port to output a graphical display.

I can follow along with the progress in docker logs, but that GUI display would be handy.

Will try a fresh docker with all available ports to see if its better.

thanks for this awesome project.

@github-actions github-actions bot removed the Stale label Sep 25, 2024
@taqqi1214
Copy link

qhU2RqJHGP__26-10-2024__19-28

Hi there, i am getting attached error while creating tasks...error is "there was an error while saving changes Network error". container starts healthy though

@LawyZheng
Copy link
Collaborator

@taqqi1214 where do you run Skyvern? Your local PC or a remote server?

@outsurface
Copy link

Hello,
I'm also facing the same error "Network Error"

When i checked my browser console i found this & I'm using remote server i guess this is happening only in remote server because local PC will automatically connect to the localhost.

image

@outsurface
Copy link

outsurface commented Oct 28, 2024

I was able to solve this issue by replacing localhost with ip at VITE_API_BASE_URL in frontend .env

But now the error is 403 Forbidden how to resolve this?

image

@LawyZheng
Copy link
Collaborator

@outsurface you can check the solution we mentioned in the previous comment!
#688 (comment)

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

7 participants