Skyvern-AI / skyvern

Automate browser-based workflows with LLMs and Computer Vision
https://www.skyvern.com
GNU Affero General Public License v3.0
5.75k stars 418 forks source link

Network error #688

Open jamalhajizada opened 1 month ago

jamalhajizada commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

Happy to help.

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

wintonzheng commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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 commented 1 month ago

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