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

Invalid message Error when trying to validate #41

Closed
sudoFerraz opened this issue Jan 31, 2022 · 4 comments
Closed

Invalid message Error when trying to validate #41

sudoFerraz opened this issue Jan 31, 2022 · 4 comments

Comments

@sudoFerraz
Copy link

Hello,

Currently when trying to validate a message received on the backend, the error:

Error: Invalid message: {"success":false,"state":103,"length":362,"matched":0,"maxMatched":5,"maxTreeDepth":15,"nodeHits":184,"inputLength":362,"subBegin":0,"subEnd":362,"subLength":362}
is thrown,

Where can I see more resources regarding the "state:103" or more info regarding the message errors.

@sudoFerraz
Copy link
Author

Realized I was using a previous version of SIWE from the notepad example, if you are hitting the same issue, be sure to update to siwe 1.0.0 on package.json and that the signature is not inside the SiweMessage anymore

@w4ll3
Copy link
Member

w4ll3 commented Jan 31, 2022

Just for clarification this error was thrown by the ABNF parser, the state number could be other. In summary there was something wrong with the message generated (probably wrong version as you said).

@kent426
Copy link

kent426 commented Feb 25, 2022

FYI, in my case, there is some character like an apostrophe(') in my statement of the SiweMessage part, so it gave the above error.

@sudoFerraz
Copy link
Author

@kent426 and anyone that also stumbled upon this, I realized that on the domain part, having a http://etc didn't worked because of one of the characters.

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

3 participants