Error when uploading RubyGems packages #9007

Closed
opened 2025-11-02 08:25:37 -06:00 by GiteaMirror · 10 comments
Owner

Originally created by @deanpcmad on GitHub (May 29, 2022).

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

Originally created by @deanpcmad on GitHub (May 29, 2022). ### 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. ```bash 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
GiteaMirror added the topic/packagestype/bug labels 2025-11-02 08:25:37 -06:00
Author
Owner

@deanpcmad commented on GitHub (May 29, 2022):

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

@deanpcmad commented on GitHub (May 29, 2022): I've just tried uploading a Docker image and that worked fine
Author
Owner

@delvh commented on GitHub (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.

@delvh commented on GitHub (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.
Author
Owner

@KN4CK3R commented on GitHub (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.

@KN4CK3R commented on GitHub (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.
Author
Owner

@deanpcmad commented on GitHub (Jun 24, 2022):

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

@deanpcmad commented on GitHub (Jun 24, 2022): As it's a private gem, I can't share the contents of it but I did have issues uploading the rails gem
Author
Owner

@KN4CK3R commented on GitHub (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

@KN4CK3R commented on GitHub (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](https://user-images.githubusercontent.com/1666336/175719443-942ac286-0e76-4620-9d24-527523b4ce0b.png)
Author
Owner

@deanpcmad commented on GitHub (Jun 24, 2022):

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

@deanpcmad commented on GitHub (Jun 24, 2022): Hmm, I'll give it another go then. What version are you using there?
Author
Owner

@KN4CK3R commented on GitHub (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
@KN4CK3R commented on GitHub (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 ```
Author
Owner

@deanpcmad commented on GitHub (Jul 20, 2022):

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
@deanpcmad commented on GitHub (Jul 20, 2022): Just tried it with another gem of mine, [twitchrb](https://github.com/deanpcmad/twitchrb/releases/tag/v1.0.0) and I get a similar error, but different lines: ``` yaml: unmarshal errors: line 29: cannot unmarshal !!seq into string ```
Author
Owner

@KN4CK3R commented on GitHub (Jul 24, 2022):

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

@KN4CK3R commented on GitHub (Jul 24, 2022): Thank you for the new example. Found the error this time and fixed it in #20470.
Author
Owner

@deanpcmad commented on GitHub (Jul 31, 2022):

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

@deanpcmad commented on GitHub (Jul 31, 2022): Just to confirm this is now fixed for a few Rubygems I've tested. Thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9007