File "/static/assets/img/404.png" not found #13401

Closed
opened 2025-11-02 10:41:17 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @xNyapAe3 on GitHub (Aug 19, 2024).

Description

I'm new to Gitea, it's really a great project.

I followed the instructions on https://docs.gitea.com/administration/reverse-proxies#nginx-and-serve-static-resources-directly, run make frontend and config STATIC_ROOT_PATH = /static, also rename public/ directory to static/.

Everything works fine, except when I visit a non-existent link, the 404 image is broken. The url https://git.example.com/static/assets/img/404.png return 404, due to 404.png does not exist under directory /static/assets/img/.

There should be the same issue with other error codes, such as 500, etc.

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

gitea

Git Version

go-git

Operating System

Windows 11

How are you running Gitea?

command-line

Database

MSSQL

Originally created by @xNyapAe3 on GitHub (Aug 19, 2024). ### Description I'm new to Gitea, it's really a great project. I followed the instructions on https://docs.gitea.com/administration/reverse-proxies#nginx-and-serve-static-resources-directly, run `make frontend` and config `STATIC_ROOT_PATH = /static`, also rename `public/` directory to `static/`. Everything works fine, except when I visit a non-existent link, the 404 image is broken. The url https://git.example.com/static/assets/img/404.png return 404, due to 404.png does not exist under directory `/static/assets/img/`. There should be the same issue with other error codes, such as 500, etc. ### Gitea Version 1.22.1 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots <img width="1327" alt="gitea" src="https://github.com/user-attachments/assets/817800ca-ae64-4f6f-b49b-661b8579dc57"> ### Git Version go-git ### Operating System Windows 11 ### How are you running Gitea? command-line ### Database MSSQL
GiteaMirror added the issue/not-a-bug label 2025-11-02 10:41:17 -06:00
Author
Owner

@yp05327 commented on GitHub (Aug 19, 2024):

This is a bit strange.

due to 404.png does not exist under directory

404.png has been removed in 1.23, see #31409
But you said that your version is 1.22.1, so 404.png should be there.

@yp05327 commented on GitHub (Aug 19, 2024): This is a bit strange. > due to 404.png does not exist under directory 404.png has been removed in 1.23, see #31409 But you said that your version is 1.22.1, so 404.png should be there.
Author
Owner

@wxiaoguang commented on GitHub (Aug 19, 2024):

Because they were using wrong branch. They were using "main (1.23)" branch to "make frontend" for 1.22

@wxiaoguang commented on GitHub (Aug 19, 2024): Because they were using wrong branch. They were using "main (1.23)" branch to "make frontend" for 1.22
Author
Owner

@xNyapAe3 commented on GitHub (Aug 19, 2024):

I replaced the binary with main-nightly version, now it goes well. Thanks guys.

@xNyapAe3 commented on GitHub (Aug 19, 2024): I replaced the binary with main-nightly version, now it goes well. Thanks guys.
Author
Owner

@wxiaoguang commented on GitHub (Aug 19, 2024):

Actually the document should be updated:

  1. Use the correct git branch to checkout & build
  2. (OR) Use ./gitea embedded extract to get the assets, no need to figure the git branch nor build manually.
@wxiaoguang commented on GitHub (Aug 19, 2024): Actually the document should be updated: 1. Use the correct git branch to checkout & build 2. (OR) Use `./gitea embedded extract` to get the assets, no need to figure the git branch nor build manually.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13401