Skip to content

Frontend assets not loaded #15655

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

Closed
1 of 6 tasks
garritfra opened this issue Apr 28, 2021 · 7 comments · Fixed by #15677
Closed
1 of 6 tasks

Frontend assets not loaded #15655

garritfra opened this issue Apr 28, 2021 · 7 comments · Fixed by #15677

Comments

@garritfra
Copy link
Contributor

garritfra commented Apr 28, 2021

  • Gitea version (or commit ref): 2c57352
  • Git version: 2.31.1
  • Operating system: arm64 MacOS Big Sur
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:
``` 021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET /assets/img/loading.png for 127.0.0.1:60212 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET /assets/img/loading.png for 127.0.0.1:60212 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET /assets/css/index.css?v=59069cfb7c25ec07d836c20cccdeb08a for 127.0.0.1:60211 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET /assets/img/loading.png 302 Found in 92.75µs 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET /assets/css/index.css?v=59069cfb7c25ec07d836c20cccdeb08a 302 Found in 129.833µs 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET /assets/img/loading.png 302 Found in 405.875µs 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET /assets/css/index.css?v=59069cfb7c25ec07d836c20cccdeb08a 302 Found in 457.958µs 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET /assets/js/index.js?v=59069cfb7c25ec07d836c20cccdeb08a for 127.0.0.1:60211 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET /assets/js/index.js?v=59069cfb7c25ec07d836c20cccdeb08a for 127.0.0.1:60211 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET /assets/js/index.js?v=59069cfb7c25ec07d836c20cccdeb08a 302 Found in 145.25µs 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET /assets/js/index.js?v=59069cfb7c25ec07d836c20cccdeb08a 302 Found in 361.375µs 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET / for [::1]:60222 2021/04/28 22:10:29 ...s/context/context.go:184:HTML() [D] Template: install 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET / 200 OK in 2.298333ms 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET / for [::1]:60223 2021/04/28 22:10:29 ...s/context/context.go:184:HTML() [D] Template: install 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET / 200 OK in 1.780292ms 2021/04/28 22:10:29 ...uters/routes/base.go:36:1() [I] Started GET / for [::1]:60224 2021/04/28 22:10:29 ...s/context/context.go:184:HTML() [D] Template: install 2021/04/28 22:10:29 ...uters/routes/base.go:45:1() [I] Completed GET / 200 OK in 1.823291ms 2021/04/28 22:10:30 ...uters/routes/base.go:36:1() [I] Started GET /assets/img/favicon.png for 127.0.0.1:60211 2021/04/28 22:10:30 ...uters/routes/base.go:36:1() [I] Started GET /assets/img/favicon.png for 127.0.0.1:60211 2021/04/28 22:10:30 ...uters/routes/base.go:45:1() [I] Completed GET /assets/img/favicon.png 302 Found in 132.375µs 2021/04/28 22:10:30 ...uters/routes/base.go:45:1() [I] Completed GET /assets/img/favicon.png 302 Found in 458.084µs 2021/04/28 22:10:30 ...uters/routes/base.go:36:1() [I] Started GET / for [::1]:60225 2021/04/28 22:10:30 ...s/context/context.go:184:HTML() [D] Template: install 2021/04/28 22:10:30 ...uters/routes/base.go:45:1() [I] Completed GET / 200 OK in 991.417µs 2021/04/28 22:10:30 ...uters/routes/base.go:36:1() [I] Started GET /assets/img/logo.svg for 127.0.0.1:60211 2021/04/28 22:10:30 ...uters/routes/base.go:36:1() [I] Started GET /assets/img/logo.svg for 127.0.0.1:60211 2021/04/28 22:10:30 ...uters/routes/base.go:45:1() [I] Completed GET /assets/img/logo.svg 302 Found in 75.958µs 2021/04/28 22:10:30 ...uters/routes/base.go:45:1() [I] Completed GET /assets/img/logo.svg 302 Found in 255.291µs 2021/04/28 22:10:30 ...uters/routes/base.go:36:1() [I] Started GET / for [::1]:60226 2021/04/28 22:10:30 ...s/context/context.go:184:HTML() [D] Template: install 2021/04/28 22:10:30 ...uters/routes/base.go:45:1() [I] Completed GET / 200 OK in 771.958µs ```

Description

The setup process has trouble accessing the assets (js and css). I'm quite certain that this issue is identical with #13725, just with another cause.

It seems like the temporary fix introduced in that issue has been broken during a refactoring. I'm not entirely sure, but maybe 6433ba0 has to do with this, since it fiddles around with Chi and it touches the code in question. Maybe I'm on a wrong track entirely though.

Screenshots

image

@techknowlogick
Copy link
Member

The commit prior to the one you are using is: 1e87761 which changes the path to assets

@lunny
Copy link
Member

lunny commented Apr 29, 2021

@a1012112796 Maybe you could take a look.

@silverwind
Copy link
Member

Maybe be configuration-dependant. Can you post the relevant parts of the server section in the config?

@garritfra
Copy link
Contributor Author

@silverwind I haven't changed anything configwise.

  1. git clone
  2. TAGS="bindata sqlite sqlite_unlock_notify" make build
  3. ./gitea web

@silverwind
Copy link
Member

Still it would help if you can show some config, e.g. ROOT_URL, STATIC_URL_PREFIX (I suspect the latter is causing issues if set).

@hendrikbl
Copy link

@silverwind I haven't changed anything configwise.

  1. git clone
  2. TAGS="bindata sqlite sqlite_unlock_notify" make build
  3. ./gitea web

This is exactly what I did following the Hacking on Gitea Guide in the docs.

I did not configure anything at all since it is not mentioned as a necessary step in the docs.

Getting the same result as @garritfra.

@KN4CK3R
Copy link
Member

KN4CK3R commented Apr 30, 2021

Will be fixed with #15677

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants