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

Error decoding mirror: msgpack decode error #791

Closed
pfelecan opened this issue Oct 26, 2018 · 13 comments
Closed

Error decoding mirror: msgpack decode error #791

pfelecan opened this issue Oct 26, 2018 · 13 comments

Comments

@pfelecan
Copy link

Since the last update on a Debian testing, 1.3.0+ds1-1 from 1.3.0-6, nothing works anymore.
For example:

aptly mirror list
Error decoding mirror: msgpack decode error [pos 200]: invalid length of bytes for decoding time - expecting 4 or 8 or 12, got 15
Error decoding mirror: msgpack decode error [pos 190]: invalid length of bytes for decoding time - expecting 4 or 8 or 12, got 15
No mirrors found, create one with `aptly mirror create ...`.

There are mirrors, two of them.

I tried an aptly db recover, to no avail.

@pfelecan
Copy link
Author

I reverted the installation, i.e. removed the new package and reinstalled the old one.
The aforementioned error does not appear anymore.
Consequently, it's a packaging/build error.
Time to open a bug report on the Debian tracker.

@smira
Copy link
Contributor

smira commented Oct 26, 2018

Yep, aptly was built without provided vendor/, and Gopkg.lock wasn't used as well.

You can use builds from https://www.aptly.info/download/

@pfelecan pfelecan reopened this Oct 30, 2018
@pfelecan
Copy link
Author

This is quite annoying.
What the Debian packager/maintainer recommends is to "recreate" the database.
Is that possible? How can we recreate the database?

@smira
Copy link
Contributor

smira commented Oct 30, 2018

There's only one way - drop the database (~/.aptly/db) and aptly will create new one, but this will lead to all the aptly data being erased.

@smira
Copy link
Contributor

smira commented Oct 30, 2018

What is even worse - DB would be incompatible with aptly builds from repo.aptly.info.

@smira
Copy link
Contributor

smira commented Oct 30, 2018

The best thing I can do is to provide fixed version of aptly which will enforce older encoding with new version of the codec but Debian package should be update

@smira
Copy link
Contributor

smira commented Oct 30, 2018

Workaround is described in ugorji/go#269

@taladar
Copy link

taladar commented Oct 30, 2018

Wouldn't it make sense to have migration code from old versions of the DB time encoding to new versions? aptly will have to move to the new version of the dependency eventually, especially since we are talking serialization/deserialization libraries and those (in general) tend to be notorious for security issues.

@pfelecan
Copy link
Author

FYI, I opened an issue on the Debian tracker 911924

@smira
Copy link
Contributor

smira commented Oct 30, 2018

@taladar I'm talking about moving to new version of the library but configuring it in a way to read and write data in the same format as the vendored version today in aptly

@smira
Copy link
Contributor

smira commented Oct 30, 2018

Looks like new version of ugorji/codec is even more broken then I might have assumed. It skips fields tagged as json:"-" for msgpack encoding.

@smira
Copy link
Contributor

smira commented Dec 4, 2018

So far I'm still stuck on that, with little time on my side to spend on aptly unfortunately. I'm trying to get a migration from old version to new more stable msgpack library, but that doesn't work out as I would have expected so far.

@neolynx
Copy link
Member

neolynx commented Aug 4, 2024

this was fixed with updated ugorji/go/codec

@neolynx neolynx closed this as completed Aug 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants