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

Fixed an Error that came up with my Instance #1471

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

skyethepinkcat
Copy link

When trying to use nheko on my personal matrix instance, I ran into an issue where some invalid event (I believe it was entirely empty) had been added at some point, and each time I tried to login with nheko rather than working as intended, it would give me the repeating error:

[db] [error] failed to save state after initial sync: mdb_put: MDB_BAD_VALSIZE: Unsupported size of key/DB name/data, or wrong DUPFIXED size

on each initial sync. I was able to solve this issue by simply having nheko ignore the error with a try catch statement. I'm not certain if this is the best way to do it, but it fixes it for me and I haven't seen any errors after using it.

@deepbluev7
Copy link
Member

Sorry, I kinda missed this! I am a bit confused how you even got that far though. In theory this should throw if there is any event without a type: https://github.com/Nheko-Reborn/mtxclient/blob/master/include/mtx/events_impl.hpp#L282

I would prefer if mtxclient already filtered events like that out. If you can reproduce this, can you try fixing it there?

@@ -34,6 +34,7 @@
#include "UserSettingsPage.h"
#include "Utils.h"
#include "encryption/Olm.h"
#include <typeinfo>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This include seems unnecessary?

@deepbluev7
Copy link
Member

I guess it is possible that this check now is incomplete: https://github.com/Nheko-Reborn/mtxclient/blob/master/include/mtx/events_impl.hpp#LL269C39-L269C39

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

Successfully merging this pull request may close these issues.

2 participants