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

bug: store v3 returns error "waku message hash parsing error: Incorrect base64 string" for some cursors #2715

Closed
fbarbu15 opened this issue May 21, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@fbarbu15
Copy link
Contributor

Problem

Some cursors are returning this error, while some are working fine. It looks like a 50% of the cursors are affected

To reproduce

If you can reproduce the behavior, steps to reproduce:

  1. Have 4 messages in the store
  2. Send a store v3 request with page size 2. Ex response:
    {"requestId":"","statusCode":200,"statusDesc":"OK","messages":[{"messageHash":{"data":"Y/RQpwaGT4M5avLAo6n2zDbPBHD0fUwjf2vUHYjp0qs="}},{"messageHash":{"data":"oKge3KvFaY2GV5FVvtDY+rKxFR+u+0UnlZ+emeQqhkc="}}],"paginationCursor":{"data":"oKge3KvFaY2GV5FVvtDY+rKxFR+u+0UnlZ+emeQqhkc="}}
  3. Retrieve the paginationCursor from the response and use it in a new request. Ex request:
    curl -v -X GET "http://127.0.0.1:48915/store/v3/messages?cursor=oKge3KvFaY2GV5FVvtDY%2BrKxFR%2Bu%2B0UnlZ%2BemeQqhkc%3D&pageSize=100&ascending=true&pubsubTopic=%2Fwaku%2F2%2Frs%2F0%2F0" -H "Content-Type: application/json"

Actual behavior

In 50% of the cases I get 400 Bad Request with waku message hash parsing error: Incorrect base64 string

Expected behavior

Should work

nwaku version/commit hash

harbor.status.im/wakuorg/nwaku:latest

Additional context

Cursors that work:

RFyVEr6pcroAemrPVk0Ouj4Q6wBobcVWDeaDHPmBc3M=
yDV4lrZUseGuJT47on8FCIyAD2mLwQYBBwsO/oQPmN0=

Cursors that doesn't work:

oKge3KvFaY2GV5FVvtDY+rKxFR+u+0UnlZ+emeQqhkc=
hrMOn3lyWbX81zl/wuDZx6YkZ09HFdO8+c3xl5Y7Bv0=

Logs:

node.log

@fbarbu15 fbarbu15 added the bug Something isn't working label May 21, 2024
@chair28980 chair28980 moved this to Priority in Waku May 21, 2024
@chair28980
Copy link
Contributor

@chair28980
Copy link
Contributor

Likely related: #2653

@SionoiS
Copy link
Contributor

SionoiS commented May 21, 2024

Looks like we use base64url in some places and standard base64 in others 😕

@SionoiS
Copy link
Contributor

SionoiS commented May 23, 2024

fixed by #2718

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

3 participants