Closed T-baby closed 2 months ago
Thanks for your report, are you able to share details of the developer console in your browser, or network tab showing what the http response shows?
same issue, any solution?
There were many similar reports: check your reverse-proxy (eg: nginx) & firewall & WAF, do not "deny" some requests for Gitea's backend.
If there is still a problem, please show your full configuration (including Gitea's app.ini and your reverse-proxy config), and provide a reproducible setup with detailed steps.
No WAF and CDN was used, only Nginx was used for reverse proxy. The Nginx configuration is as follows:
server {
listen 80;
server_name xx;
client_max_body_size 10G;
location / {
proxy_pass http://gitea:3000;
index index.html index.htm;
}
}
server {
listen 443 ssl;
server_name xx;
client_max_body_size 10G;
client_header_timeout 1800s;
client_body_timeout 1800s;
send_timeout 1800s;
proxy_connect_timeout 1800s;
proxy_read_timeout 1800s;
proxy_send_timeout 1800s;
ssl_certificate crt;
ssl_certificate_keykey;
location / {
proxy_pass http://gitea:3000;
index index.html index.htm;
}
}
ps: Nginx could have various plugins. , so "please show your full configuration", eg: nginx -T
The config you shown is not the real one you are using, because I can see you manually prettified / changed it.
This request url is: https://xx/xx/project/compare/develop...feat/dev_test
This request headers is:
This response headers is:
This response body is null.
The full configuration of nginx:
I think it is still related to your network or config.
Maybe your request is rejected by Tencent Cloud.
I tried using it in the browser's incognito mode, but I still couldn't merge. The complete headers of requests and response are as follows:
POST /xx/xx/compare/develop...feat/dev_test HTTP/1.1
Accept: */*
Accept-Encoding: gzip, deflate, br, zstd
Accept-Language: zh-CN,zh;q=0.9
Cache-Control: no-cache
Connection: keep-alive
Content-Length: 890
Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryS8dz1rWTyhWCS8rN
Cookie: i_like_gitea=f033aa68145ed416; lang=zh-CN; _csrf=Hb7iUYpQYTXXr0aq9pt4RtfBA-Y6MTcyMTg3NzQxNTIyMjg2NTk5MA
DNT: 1
Host: xx
Origin: https://xx
Pragma: no-cache
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36
sec-ch-ua: "Not/A)Brand";v="8", "Chromium";v="126", "Google Chrome";v="126"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
x-csrf-token: Hb7iUYpQYTXXr0aq9pt4RtfBA-Y6MTcyMTg3NzQxNTIyMjg2NTk5MA
HTTP/1.1 200 OK
Server: nginx/1.23.0
Date: Thu, 25 Jul 2024 03:17:45 GMT
Content-Length: 0
Connection: keep-alive
Cache-Control: max-age=0, private, must-revalidate, no-transform
X-Frame-Options: SAMEORIGIN
We are unable to create a merge request only for this repository. It works fine for all others.
Try go use other servers than Tencent Cloud.
Try go use other servers than Tencent Cloud.
We are not using Tencent Cloud servers.
Try go use other servers than Tencent Cloud.尝试使用除腾讯云之外的其他服务器。
We are not using Tencent Cloud servers.
Then: "please provide a reproducible setup with detailed steps."
You could provide the reproducible setup by a docker-compose file and some related commands, to make others could also reproduce the problem on their side.
I received another report similar to this issue. And this time it can indeed be found in Gitea's logs that it received the request and returned a response with zero status code.
2024/08/15 03:32:59 ...eb/routing/logger.go:102:func1() [I] router: completed POST /[hidden]/compare/[hidden]...[hidden] for [hidden], 0 in 1563.2ms @ repo/pull.go:1223(repo.CompareAndPullRequestPost)
IIRC, the framework will return 200 with an empty body if WriteHeader
hasn't been called.
No idea how it could happen, but maybe there is something going wrong with Gitea.
More context and a new clue:
https://github.com/go-gitea/gitea/issues/31893#issuecomment-2300630715
That PR alone didn't fix it but looking at the response in the network section of the browser we were now with the nightly getting a proper error 500 back that indicated somehow there was a .lock file on that repo left over that was blocking this. i removed it and it worked!
Description
When trying to create a merge request in a self-hosted Gitea instance, a toast notification pops up with the message: "SyntaxError: Unexpected end of JSON input". After checking the server logs, no errors were found.
Gitea Version
1.22.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Docker, version 20.10.17, running on Ubuntu 22.04.
Database
PostgreSQL