-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
500 Internal Server Error when creating new pull request #6225
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
Comments
We're also getting
|
Are there are any error in gitea.log? |
No errors. But if I go to /org/proj/pulls and press "New Pull Request" it goes to /org/proj/compare/master...fork:master which gives 404. We did not have this problem with 1.7.2. |
Still an issue with 1.7.4 |
Are there schema changes between 1.7.2 and 1.7.4 or would downgrade be safe? |
@ptman I'm sorry to see this. I've not been following this so I don't completely understand the issue. Are you able to work out what the url should be? Having seen two PRs touch this endpoint in quick succession because one completely broke I think this endpoint is fairly poorly described. I'm able get 404s on my rather pathological repos on try. |
The URL should show the diff between the base and the branch to be merged, not 404. I could look closer at the SQL differences if I knew for sure that downgrading to 1.7.2 doesn't break anything. |
For reference here is some discussion of why it can 404 when there is a double quote in the filename: #6309. Basic testing says gitea will break on any situation where the diff includes the diff --git section inside double quotes like diff --git "a/file" "b/file". This includes having a backslash in the file name which is perhaps more common (Windows?). I think this might be one of a few issues that lead to bad compare/pull/etc... |
In my case the branch names don't contain anything that needs to be encoded. Is it safe to downgrade from 1.7.4 to 1.7.2 or have there been DB schema changes? |
@ptman that's downgrade should be safe but of course backup before any change of your production environment. |
Ok, here are some sanitized logs from both 1.7.2 and 1.7.4. It seems that after 1.7.2 (i.e. 1.7.3 & 1.7.4) there's a missing join. You can diff the files side by side to see the difference, but I've also added newlines to point it out: https://gist.github.com/ptman/f76b398d0503e5c50424c1ea8cbfafec |
Ok @ptman it looks like your issue is different from the initial issue reported by @hotbain. I'm not certain what's causing that issue as we need more information from @hotbain - If I had to guess, it's likely they're affected by the issue fixed by @mrsdizzie, it's unlikely that they're affected by the remaining branch escaping and preceding hyphen branch issues. In any case your issue is related to: Which was reverted by: Now, you appear to be in the subset for whom the original commit worked and it's reversion breaks. This is #6302 Ok, so the revision did two things - one was change the url and the other was the permissions change. So first of all, are the permissions correct - can the proposer read pulls on the base? And I need to know where you click pull request and what you expect the URL to be. Can you hand change the URL to make it work? |
so let's take this to #6302 |
I am also experiencing this kinds of errors when creating pull requests and accepting pull requests. I have not been able to pinpoint exactly how to produce an error, I tried using the PR url given on the console during the push or manually getting to the pull request page. Sometimes one way gives a 500, sometimes it is the other way around. My setup is using gitea 1.7.3 built with go1.11.5 : tidb, sqlite3 Usually when the error 500 appears I have the following error in gitea.log :
Do you need more informations ? |
@nicovince that's another issue. It caused by your sqlite database and which version are you using? |
@lunny I am using sqlite-3.25.3 edit: trying to update to 3.27, I'll let you know if that improves my situation. |
@nicovince please open another issue for this. I suspect we will need to move to a pure Gitea serv as client of Gitea web to prevent this. |
opened #6435 |
@hotbain could you confirm that this has been resolved on v1.8.0 |
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. |
I think this has been resolved. Please feel free to reopen it. |
Still happens in Gitea Version: 1.9.0+dev-376-ge07ff2f89 logs show:
|
This is not the same bug as the original. It has the same overall effect but it is not the same. @jeansergegagnon how did you cause this? |
I'm experiencing the same issues as @jeansergegagnon on Gitea version 1.9.2, a simple installation with an sqlite database. Steps to reproduce:
Log:
If you need me to open a separate issue for this let me know. |
This looks like a different problem too. Please fill in another issue for it. Thank you. |
OK. Could you reproduce this follow the steps: 1 fork A to B |
Dear All, I found the same issue. After a good installation, simply stop to work. Please, kindly ask any newer reference. Update the git version is not an option for me. Thanks! |
this should be fixed if there is a new issue feel free to open a new issue for it :) |
Description
[Macaron] 2019-03-02 09:59:20: Completed POST /hotbain/spring_cloud/compare/master...test_branch 404 Not Found in 175.311212ms
[Macaron] 2019-03-02 09:59:21: Started GET /serviceworker.js for [::1]
Screenshots
The text was updated successfully, but these errors were encountered: