Problems accessing various pages in Chrome #2840

Closed
opened 2025-11-02 04:50:37 -06:00 by GiteaMirror · 9 comments
Owner

Originally created by @Roemer on GitHub (Jan 31, 2019).

  • Gitea version (or commit ref): 0823791 (latest docker image)
  • Git version: 2.17.1
  • Operating system: Windows 10 x64
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

When I try to access various pages like commit-details, issues, wiki, pull-requests, releases etc I get the error from the screenshot below. Accessing a projects main page works. Also using another browser like FireFox works.

In my setup, I have gitea running as http service in docker and a reverse-proxy to allow outside-access via https.
...

Screenshots

image

Originally created by @Roemer on GitHub (Jan 31, 2019). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 0823791 (latest docker image) - Git version: 2.17.1 - Operating system: Windows 10 x64 - 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: ## Description When I try to access various pages like commit-details, issues, wiki, pull-requests, releases etc I get the error from the screenshot below. Accessing a projects main page works. Also using another browser like FireFox works. In my setup, I have gitea running as http service in docker and a reverse-proxy to allow outside-access via https. ... ## Screenshots ![image](https://user-images.githubusercontent.com/393641/52036085-6da79a00-252c-11e9-96b9-2269ed375017.png)
Author
Owner

@Roemer commented on GitHub (Jan 31, 2019):

While posting this issue and trying some more things, I found out that doing a forced-refresh (ctrl-refresh) in chrome on all those pages fixed the issue temporarily. But as soon as I refresh the page, the problem is back until I do another ctrl-refresh.

@Roemer commented on GitHub (Jan 31, 2019): While posting this issue and trying some more things, I found out that doing a forced-refresh (ctrl-refresh) in chrome on all those pages fixed the issue temporarily. But as soon as I refresh the page, the problem is back until I do another ctrl-refresh.
Author
Owner

@Roemer commented on GitHub (Jan 31, 2019):

Chrome Developer Console shows the following errors:
image

@Roemer commented on GitHub (Jan 31, 2019): Chrome Developer Console shows the following errors: ![image](https://user-images.githubusercontent.com/393641/52037177-8e70ef00-252e-11e9-8e7d-7968e678aa6e.png)
Author
Owner

@techknowlogick commented on GitHub (Jan 31, 2019):

@Roemer which reverse-proxy are you using?

@techknowlogick commented on GitHub (Jan 31, 2019): @Roemer which reverse-proxy are you using?
Author
Owner

@Roemer commented on GitHub (Feb 1, 2019):

@techknowlogick I'm using the one integrated in a Synology NAS which uses nginx under the hood.

@Roemer commented on GitHub (Feb 1, 2019): @techknowlogick I'm using the one integrated in a Synology NAS which uses nginx under the hood.
Author
Owner

@Roemer commented on GitHub (Feb 1, 2019):

I just tested and if I skip the reverse proxy, it works also in Chrome. Are there some special settings needed in the reverse proxy? Also I'm fairly unsure what I need to set in Serversection of the app.ini from gitea.
What should be put int:
SSH_DOMAIN, ROOT_URL and DOMAIN?
Currently I have:

SSH_DOMAIN       = diskstation
ROOT_URL         = http://diskstation:3000/
DOMAIN           = diskstation

Should this be the information from the reverse proxy like the following?:

SSH_DOMAIN       = git.mydomain.com
ROOT_URL         = https://git.mydomain.com/
DOMAIN           = git.mydomain.com
@Roemer commented on GitHub (Feb 1, 2019): I just tested and if I skip the reverse proxy, it works also in Chrome. Are there some special settings needed in the reverse proxy? Also I'm fairly unsure what I need to set in `Server`section of the `app.ini` from gitea. What should be put int: `SSH_DOMAIN`, `ROOT_URL` and `DOMAIN`? Currently I have: ``` SSH_DOMAIN = diskstation ROOT_URL = http://diskstation:3000/ DOMAIN = diskstation ``` Should this be the information from the reverse proxy like the following?: ``` SSH_DOMAIN = git.mydomain.com ROOT_URL = https://git.mydomain.com/ DOMAIN = git.mydomain.com ```
Author
Owner

@zeripath commented on GitHub (Feb 2, 2019):

You should put the external information into the Gitea app.ini, so the second option is correct.

@zeripath commented on GitHub (Feb 2, 2019): You should put the external information into the Gitea app.ini, so the second option is correct.
Author
Owner

@Roemer commented on GitHub (Feb 2, 2019):

I added all those information, didnt't change anything.

@Roemer commented on GitHub (Feb 2, 2019): I added all those information, didnt't change anything.
Author
Owner

@zeripath commented on GitHub (Feb 2, 2019):

Let's just check your configuration. Take an url with the rejected promise above, replace the external server url bit with localhost:$PORT where port is the port that gitea is listening on, presumably 3000.

Then from the server box:

curl -v --path-as-is $URL -u $USER

Check the response. If this is an API request like /api/v1/repos/username/reponame/issues it should respond with the full external url of your gitea as the urls.

Gitea must have its ROOT_URL and SSH_DOMAIN set as if they are the external facing urls.

As an example my nginx configuration is simply:

	location /git/ {
		client_max_body_size 100M;
		proxy_pass http://localhost:3000/;
	}

My app.ini (suitably replaced):

[server]
ROOT_URL         = https://www.domain.com/git/
SSH_DOMAIN       = www.domain.com
DOMAIN           = www.domain.com
HTTP_PORT        = 3000
DISABLE_SSH      = false
SSH_PORT         = 22
...

There is only one [server] section in my app.ini and these keys are only placed once in the file. (If you change app.ini you must restart gitea.)

So for example, for me this would be to replace www.domain.com/git/ -> localhost:3000/ and then on my server curl -v localhost:3000/api/v1/repos/testuser/testrepo/issues -u testuser noting that the response contains urls that link back to www.domain.com/git/...

@zeripath commented on GitHub (Feb 2, 2019): Let's just check your configuration. Take an url with the rejected promise above, replace the external server url bit with `localhost:$PORT` where port is the port that gitea is listening on, presumably 3000. Then from the server box: ```bash curl -v --path-as-is $URL -u $USER ``` Check the response. If this is an API request like `/api/v1/repos/username/reponame/issues` it should respond with the full external url of your gitea as the urls. Gitea must have its ROOT_URL and SSH_DOMAIN set as if they are the external facing urls. As an example my nginx configuration is simply: ``` location /git/ { client_max_body_size 100M; proxy_pass http://localhost:3000/; } ``` My app.ini (suitably replaced): ``` [server] ROOT_URL = https://www.domain.com/git/ SSH_DOMAIN = www.domain.com DOMAIN = www.domain.com HTTP_PORT = 3000 DISABLE_SSH = false SSH_PORT = 22 ... ``` There is only one `[server]` section in my app.ini and these keys are only placed once in the file. (If you change app.ini you must restart gitea.) So for example, for me this would be to replace `www.domain.com/git/` -> `localhost:3000/` and then on my server `curl -v localhost:3000/api/v1/repos/testuser/testrepo/issues -u testuser` noting that the response contains urls that link back to `www.domain.com/git/...`
Author
Owner

@Roemer commented on GitHub (Feb 2, 2019):

NO WAY!!!
I just found out the issue (thanks to https://stackoverflow.com/questions/47160929/progressive-web-app-uncaught-in-promise-typeerror-failed-to-fetch).
The problem was that I have a repository starting with Ad. The AdBlock Plus extension from chrome then blocked all those sub-sites! Disabling adblock on my gitea page solved the issue completely.
So it is absolutely no issue with gitea, just with AdBlock and a repository name starting with ad.

@Roemer commented on GitHub (Feb 2, 2019): NO WAY!!! I just found out the issue (thanks to https://stackoverflow.com/questions/47160929/progressive-web-app-uncaught-in-promise-typeerror-failed-to-fetch). The problem was that I have a repository starting with `Ad`. The `AdBlock Plus` extension from chrome then blocked all those sub-sites! Disabling adblock on my gitea page solved the issue completely. So it is absolutely no issue with gitea, just with AdBlock and a repository name starting with `ad`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2840