Skip to content

"Network error SyntaxError: JSON.parse" when trying to Create a Pull Request #31893

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
dballard opened this issue Aug 20, 2024 · 7 comments
Closed
Labels

Comments

@dballard
Copy link

Description

I am trying to create a Pull Request on our main repo, and when I click "Create Pull Request" it spins for about 5 - 10 seconds and I get a red error popup "Network error SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data" and it does not work.

Interestingly, I've forked the repo to my account, and pushed the main branch and the 1 line change branch there and can create the PR successfully on that forked repo, so my guess is something is going on with our main repo specifically.

Included is a Trace log from gitea of me doing this action. Nothing jumped out at me as wrong or being in error

Repo that I cannot create a new PR on
https://git.openprivacy.ca/cwtch.im/cwtch-ui/

Repo on same instance with same PR successfully created
https://git.openprivacy.ca/dan/cwtch-ui/pulls/3

Gitea Version

1.22.1

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

https://gist.github.com/dballard/a94491d24576b8cd590a62d1787ecbc3

Screenshots

No response

Git Version

2.25.1

Operating System

Ubuntu 20.04.6

How are you running Gitea?

Downloaded from https://dl.gitea.com/gitea/ and run as a service with the service files from your docs.

Database

MySQL/MariaDB

@lunny
Copy link
Member

lunny commented Aug 21, 2024

Can I try to create a pull request for test purposes? I think maybe you can delete it after the test.
And It looks like logs cannot help. There is no error log.

@dballard
Copy link
Author

go for it

@lunny
Copy link
Member

lunny commented Aug 21, 2024

go for it

Did you mean creating a pull request from the base repository's branch?

@dballard
Copy link
Author

I believe the permissions will allow you to make a PR from your repo to the main one? if not let me know

@wxiaoguang
Copy link
Contributor

I think " Avoid returning without written ctx when posting PR (#31843) #31848 " could help for an edge case.

It is not in 1.22.1 but in 1.22-nightly. So it's recommended to deploy 1.22-nightly and retry to see whether there are new error logs.

@dballard
Copy link
Author

Thank you! that 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!

@wxiaoguang
Copy link
Contributor

Thank you very much for the feedback.

Actually it is a longstanding bug in Gitea: incorrect "lock" files might be left in the repo and block other operations.

@go-gitea go-gitea locked as resolved and limited conversation to collaborators Nov 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants