serviceworker.js & manifest.json not found #2642

Closed
opened 2025-11-02 04:43:11 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @yarumair on GitHub (Dec 9, 2018).

Description

Iam getting 404 both for /manifest.json and /serviceworker.js.

I have setup gitea behind nginx proxy as:

server {
	listen 443 ssl;
	server_name xxx.xxx.xx;
	
	
	ssl_certificate /etc/letsencrypt/live/xxx.xxx.xx/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/xxx.xxx.xx/privkey.pem;

	client_max_body_size 0;

	location / {
		proxy_pass https://localhost:2052;
	}

	location ~ /\.ht {
			deny all;
	}

	
	access_log /var/log/nginx/xxx.xxx.xx.access.log;
	error_log /var/log/nginx/xxx.xxx.xx.error.log;
}

Following files/folders are placed here /var/lib/gitea/custom

robots.txt
public
templates
https

Following is the link for app.ini

https://gist.github.com/yarumair/74d4dfc14dac520f32903141b86d414d

No error at nginx level for this.

Originally created by @yarumair on GitHub (Dec 9, 2018). - Gitea version (or commit ref):1.6.0 - Git version:2.17.1 - Operating system:ubuntu 18.04 - Database (use `[x]`): - [ ] PostgreSQL - [x ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ x] No - [ ] Not relevant - Log gist: https://gist.github.com/yarumair/090ea2332e8ef7f3cfa0412a783dbe0c ## Description Iam getting `404` both for ` /manifest.json` and `/serviceworker.js`. I have setup gitea behind nginx proxy as: ``` server { listen 443 ssl; server_name xxx.xxx.xx; ssl_certificate /etc/letsencrypt/live/xxx.xxx.xx/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/xxx.xxx.xx/privkey.pem; client_max_body_size 0; location / { proxy_pass https://localhost:2052; } location ~ /\.ht { deny all; } access_log /var/log/nginx/xxx.xxx.xx.access.log; error_log /var/log/nginx/xxx.xxx.xx.error.log; } ``` Following files/folders are placed here `/var/lib/gitea/custom` ``` robots.txt public templates https ``` Following is the link for `app.ini` https://gist.github.com/yarumair/74d4dfc14dac520f32903141b86d414d No error at nginx level for this.
GiteaMirror added the type/questionissue/stale labels 2025-11-02 04:43:11 -06:00
Author
Owner

@lunny commented on GitHub (Dec 9, 2018):

could you reproduce that on https://try.gitea.io

@lunny commented on GitHub (Dec 9, 2018): could you reproduce that on https://try.gitea.io
Author
Owner

@yarumair commented on GitHub (Dec 9, 2018):

HI @lunny

Iam not sure i can do it. Since, i have done certain customization in app.ini and also using custom folder. Moreover iam running behind nginx as proxy. Not sure if this is possible to replicate on https://try.gitea.io.

On try.gitea.io both manifest.json and serviceworker.js are showing fine.

If you see my log there is one consistent error:

[...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: !api, name: 2.0]

which led me to believe that somehow Gitea is treating both the files as repository and searching for them.

So any pointers in right direction to debug are highly appreciated

@yarumair commented on GitHub (Dec 9, 2018): HI @lunny Iam not sure i can do it. Since, i have done certain customization in app.ini and also using custom folder. Moreover iam running behind nginx as proxy. Not sure if this is possible to replicate on https://try.gitea.io. On try.gitea.io both `manifest.json` and `serviceworker.js` are showing fine. If you see my log there is one consistent error: `[...s/context/context.go:147 NotFoundOrServerError()] [E] GetRepositoryByOwnerAndName: repository does not exist [id: 0, uid: 0, owner_name: !api, name: 2.0]` which led me to believe that somehow Gitea is treating both the files as repository and searching for them. So any pointers in right direction to debug are highly appreciated
Author
Owner

@probwebdev commented on GitHub (Dec 31, 2018):

Update: Sorry guys, everything is alright. PWA part not yet merged into stable and after switching between latest and 1.6 docker images Chrome registered a service worker for domain and couldn't find it while using 1.6 release. Unregister it in Chrome Dev Tools helped me.
Hi guys! Could you please check if that commit merged properly 294904321c? Seems that release/1.6 branch don't have all the changes. For example look into routes.go, on master we have new routes but that's not true for 1.6 branch.

@probwebdev commented on GitHub (Dec 31, 2018): Update: Sorry guys, everything is alright. PWA part not yet merged into stable and after switching between latest and 1.6 docker images Chrome registered a service worker for domain and couldn't find it while using 1.6 release. Unregister it in Chrome Dev Tools helped me. ~~Hi guys! Could you please check if that commit merged properly https://github.com/go-gitea/gitea/commit/294904321cb6de535237a6a156d5c4ec462bc117? Seems that release/1.6 branch don't have all the changes. For example look into routes.go, on master we have new routes but that's not true for 1.6 branch.~~
Author
Owner

@stale[bot] commented on GitHub (Mar 2, 2019):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.

@stale[bot] commented on GitHub (Mar 2, 2019): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions.
Author
Owner

@stale[bot] commented on GitHub (Mar 16, 2019):

This issue has been automatically closed because of inactivity. You can re-open it if needed.

@stale[bot] commented on GitHub (Mar 16, 2019): This issue has been automatically closed because of inactivity. You can re-open it if needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2642