go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
43.82k stars 5.38k forks source link

Cannot open Actions workflow run (SyntaxError: Unexpected token 'V', "Verify " is not valid JSON) #30321

Open artshade opened 4 months ago

artshade commented 4 months ago

Description

Dear Developers,

Sincere, thank you very much for the incredibly marvelous... ineffably magnificent project... ✨


Encountered the following issue which currently does not allow viewing any ran workflows. With a page https://gitea.example.com/org/repo/actions/runs/123 opened and a screen (e.g. attached preview Picture 1).

During the page loading, I see in network request logs a GET request to https://gitea.example.com/org/repo/actions/runs/123/artifacts that receives a response with HTTP status 401 Unauthorized and body:

Verify

Eventually, an exception appears in Console (e.g. attached preview Picture 2):

SyntaxError: Unexpected token 'V', "Verify
" is not valid JSON

Regarding the logs, I am sorry, but I did not find proper ones, and those appear in Docker console only, even if configured in app.ini as:

; MODE = console
MODE = file
; Either "Trace", "Debug", "Info", "Warn", "Error" or "None", default is "Info"
LEVEL = Debug

Directory /data/gitea/log is empty, and only Action status probes are shown there it seems like 2024/04/07 13:44:12 ...eb/routing/logger.go:102:func1() [I] router: completed POST /api/actions/runner.v1.RunnerService/FetchTask for 172.25.0.1:57486, 200 OK in 210.0ms @ <autogenerated>:1(http.Handler.ServeHTTP-fm) each second.


I would appreciate a suggestion whether it's an expected outcome or not to dig further.

Best and kind regards

Gitea Version

1.21.10

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

Picture 1

image

Picture 2

image

Git Version

2.39.2

Operating System

Docker CLI in Linux x64

How are you running Gitea?

Docker Compose (+ some local networking)

services:

  gitea:
    image: gitea/gitea
    restart: unless-stopped

    ports:
      - 3020:3000
      - 3021:22

    depends_on:
      db:
        condition: service_healthy

    volumes:
      - '/volume1/docker/data/gitea/data/:/data/'

  gitea-actions-runner-1:
    image: 'gitea/act_runner'
    restart: unless-stopped

    environment:
      GITEA_RUNNER_NAME: "$GITEA_RUNNER_1_GITEA_RUNNER_NAME"
      GITEA_RUNNER_REGISTRATION_TOKEN: "$GITEA_RUNNER_1_GITEA_RUNNER_REGISTRATION_TOKEN"
      GITEA_INSTANCE_URL: "$GITEA_RUNNER_1_GITEA_INSTANCE_URL"
      GITEA_RUNNER_LABELS: "$GITEA_RUNNER_1_GITEA_RUNNER_LABELS"
      CONFIG_FILE: '/app/config.yaml'

    volumes:
      - '/volume1/docker/data/gitea/data/actions/runners/runner-1/config/config.yaml:/app/config.yaml'
      - '/volume1/docker/data/gitea/data/actions/runners/runner-1/data/:/data/'
      - '/var/run/docker.sock:/var/run/docker.sock'

    depends_on:
      - gitea

  db:
    image: 'bitnami/postgresql:latest'
    restart: unless-stopped

    environment:
      POSTGRESQL_USERNAME: "$DB_USERNAME"
      POSTGRESQL_PASSWORD: "$DB_PASSWORD"
      POSTGRESQL_DATABASE: "$DB_DATABASE"

    volumes:
      - '/volume1/docker/data/gitea/db/data:/bitnami/postgresql/data'

    healthcheck:
      test: pg_isready -h 127.0.0.1 -d "$DB_DATABASE" -U "$DB_USERNAME"
      interval: 10s
      timeout: 5s
      retries: 10
      start_period: 10s  

Database

PostgreSQL

lunny commented 4 months ago

Could you clean the web browser cache and try again?

artshade commented 4 months ago

Could you clean the web browser cache and try again?

Thank you very much, @lunny! Yes, it worked (cleared the whole "storage" for the domain in Chrome latest), and... I probably might have to try that initially indeed... (am sorry), though am still curious what might it be.

Hurray! 🪐🚀


image

silverwind commented 4 months ago

It's coming from here, definitely some kind of bug as other users on Discord have also reported seeing pages with only this "Verify" text:

https://github.com/go-gitea/gitea/blob/0178eaec256a349371c75e582edd7fefca2085d0/routers/web/web.go#L124