Skip to content

Error when uploading RubyGems packages #19837

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
deanpcmad opened this issue May 29, 2022 · 10 comments · Fixed by #20470
Closed

Error when uploading RubyGems packages #19837

deanpcmad opened this issue May 29, 2022 · 10 comments · Fixed by #20470

Comments

@deanpcmad
Copy link

Description

When trying to upload a RubyGem package to Gitea (main version 1.17.0+dev-629-ge0273bad7), I get a cannot unmarshal !!seq into string error.

gem push --host http://localhost:3000/api/packages/dean/rubygems mygem.gem

Pushing gem to http://localhost:3000/api/packages/dean/rubygems...
yaml: unmarshal errors:
  line 57: cannot unmarshal !!seq into string

Looking at the server logs, it shows this:

2022/05/29 11:58:23 ...rubygems/rubygems.go:24:apiError() [E] [629351cf] yaml: unmarshal errors:
	  line 57: cannot unmarshal !!seq into string
2022/05/29 11:58:23 [629351cf] router: completed POST /api/packages/dean/rubygems/api/v1/gems for 127.0.0.1:39502, 500 Internal Server Error in 13.3ms @ rubygems/rubygems.go:193(rubygems.UploadPackageFile)

When trying to reproduce the error on try.gitea.io, it doesn't show an error but when checking my account, no Gem has been uploaded so I'm not sure if packages are fully enabled on that system?

Gitea Version

1.17.0+dev-629-ge0273bad7

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.34.1

Operating System

Ubuntu 22.04

How are you running Gitea?

Just running the binary in the command line

Database

SQLite

@deanpcmad
Copy link
Author

I've just tried uploading a Docker image and that worked fine

@delvh
Copy link
Member

delvh commented May 30, 2022

When trying to reproduce the error on try.gitea.io, it doesn't show an error but when checking my account, no Gem has been uploaded so I'm not sure if packages are fully enabled on that system?

Yeah, packages are disabled for try.gitea.io as far as I know.
For the rest, I don't really have an idea where the problem could be coming from.

@KN4CK3R
Copy link
Member

KN4CK3R commented Jun 24, 2022

Could you upload you gem file and/or project? I added only a basic marshal implementation to get it working. Maybe something is missing.

@deanpcmad
Copy link
Author

As it's a private gem, I can't share the contents of it but I did have issues uploading the rails gem

@KN4CK3R
Copy link
Member

KN4CK3R commented Jun 24, 2022

I have tested rack and rails without problems:

gem push --host http://localhost:3000/api/packages/KN4CK3R/rubygems rails-7.0.3.gem     
Pushing gem to http://localhost:3000/api/packages/KN4CK3R/rubygems...

grafik

@deanpcmad
Copy link
Author

Hmm, I'll give it another go then. What version are you using there?

@KN4CK3R
Copy link
Member

KN4CK3R commented Jun 24, 2022

Gitea is current master but there were no changes to the packages registry since 1.17-RC1.

gem -v
3.2.5

@deanpcmad
Copy link
Author

Just tried it with another gem of mine, twitchrb and I get a similar error, but different lines:

yaml: unmarshal errors:
  line 29: cannot unmarshal !!seq into string

@KN4CK3R
Copy link
Member

KN4CK3R commented Jul 24, 2022

Thank you for the new example. Found the error this time and fixed it in #20470.

@deanpcmad
Copy link
Author

Just to confirm this is now fixed for a few Rubygems I've tested. Thanks!

@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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants