Skip to content
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

500 error when trying to use non-semver packages #20603

Closed
dorianim opened this issue Aug 1, 2022 · 10 comments
Closed

500 error when trying to use non-semver packages #20603

dorianim opened this issue Aug 1, 2022 · 10 comments
Labels

Comments

@dorianim
Copy link

dorianim commented Aug 1, 2022

Description

After creating a non-semver package, the page https://gitea.domain/user/-/packages returns an error 500.

Gitea logs .../web/user/package.go:58:ListPackages() [E] [62e82d7a] GetPackageDescriptors: Malformed version: preview-be4d4b6e7849557ce7ba7bfee4b66c47c27f986a

Gitea Version

1.17.0

Can you reproduce the bug on the Gitea demo site?

No, maybe because it is on 1.18.0+dev-198-g4f14c6de1?

Screenshots

image

How are you running Gitea?

I am using the gitea/gitea docker image on the latest tag

Database

PostgreSQL

@dorianim
Copy link
Author

dorianim commented Aug 7, 2022

Another thing I just discovered:
The /admin/packages-Page now also returns 500

@lunny
Copy link
Member

lunny commented Aug 8, 2022

What's the error logs?

@dorianim
Copy link
Author

dorianim commented Aug 8, 2022

I think, these are the relevant lines:

gitea-gitea-1  | 2022/08/08 10:11:59 ...eb/admin/packages.go:49:Packages() [E] [62f0c54f] GetPackageDescriptors: Malformed version: preview-be4d4b6e7849557ce7ba7bfee4b66c47c27f986a
gitea-gitea-1  | 2022/08/08 10:11:59 [62f0c54f] router: completed GET /admin/packages for x.x.x.x:0, 500 Internal Server Error in 181.1ms @ admin/packages.go:24(admin.Packages)

@DerGoogler
Copy link

Oh, seems that this not so old

@dorianim
Copy link
Author

dorianim commented Aug 8, 2022

No, definitely not. I think, it has been introduced in #20531

@dorianim
Copy link
Author

dorianim commented Sep 14, 2022

Any idea on how to resolve this? I currently cannot use my packages because of this...
Is there some way to delete the faulty packages from the database?
I tried deleting it using the api, but it also returned 500:
image

@wxiaoguang
Copy link
Contributor

Could you try to do update package set semver_compatible=0 ?

(suggest to backup your table first)

@dorianim
Copy link
Author

It worked! Thank you so much :)
I'm gonna close this issue for now, let's see, if the problem reappears

@wxiaoguang
Copy link
Contributor

I am curious whether this bug exists in 1.17.2 or 1.17-dev/1.18-dev. If yes, it should be fixed. Feel free to open an issue if there is still a problem.

@KN4CK3R
Copy link
Member

KN4CK3R commented Sep 23, 2022

Looks like we need a migration to fix this for existing packages.

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
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

5 participants