Skip to content

bug: store v3 returns error "illegal base64 data at input byte" for some cursors/hashes #1109

@fbarbu15

Description

@fbarbu15

Describe the bug
Some cursors/hashes are returning this error, while some are working fine. It looks like a 50% of the cursors are affected
Very similar to nwaku bug logos-messaging/logos-messaging-nim#2715

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":"lhxaAF/mQbvGj+WkU7SrqVg4xp9pErO+W8STZOoSOC8="},{"messageHash":"wMpdcbqPXkl+vBnh7H4Mdc48bjn7B0d7TLHycSgKSbw="}],"paginationCursor":"wMpdcbqPXkl+vBnh7H4Mdc48bjn7B0d7TLHycSgKSbw="}
  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:48732/store/v3/messages?pubsubTopic=%2Fwaku%2F2%2Frs%2F0%2F0&contentTopics=%2Fmyapp%2F1%2Flatest%2Fproto&cursor=wMpdcbqPXkl%2BvBnh7H4Mdc48bjn7B0d7TLHycSgKSbw%3D&pageSize=100&ascending=true" -H "Content-Type: application/json"

Actual behavior

400 Bad Request with illegal base64 data at input byte 11

Expected behavior

Should work

go-waku version/commit hash

harbor.status.im/wakuorg/go-waku:latest

Additional context
Same thing happens for the hashes key instead of cursor

Logs
publishing_node1.log
store_node1.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions