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: encoding/hex: odd length hex string for filter/v2/subscriptions POST requests #928

Closed
fbarbu15 opened this issue Nov 27, 2023 · 10 comments · Fixed by #932
Closed

bug: encoding/hex: odd length hex string for filter/v2/subscriptions POST requests #928

fbarbu15 opened this issue Nov 27, 2023 · 10 comments · Fixed by #932
Assignees
Labels
bug Something isn't working

Comments

@fbarbu15
Copy link

fbarbu15 commented Nov 27, 2023

To Reproduce
Steps to reproduce the behavior:
Using REST API:

  1. Connect 2 nodes on filter protocol
  2. Try to filter subscribe to a topic
    Ex:
curl -vv -X POST "http://localhost:34710/filter/v2/subscriptions" -H "accept: text/plain" -H "content-type: application/json" -d '{"requestId":"146546546","contentFilters":["/test/1/waku-filter/proto"]
, "pubsubTopic": "/waku/2/rs/19/1"}'

=> HTTP 400 with no response content but in the docker log I can see encoding/hex: odd length hex string

Error can also be seen in the attached docker log
node2_2023-11-27_17-52-56__0ca635b5-7362-482e-ac1f-c750cfa0cc4f__wakuorg_go-wakulatest.log

go-waku version/commit hash

wakuorg/go-waku:latest

Additional context
On nwaku this works fine

@fbarbu15 fbarbu15 added the bug Something isn't working label Nov 27, 2023
@fbarbu15 fbarbu15 changed the title bug: encoding/hex: odd length hex string when for filter/v2/subscriptions POST requests bug: encoding/hex: odd length hex string for filter/v2/subscriptions POST requests Nov 27, 2023
@richard-ramos richard-ramos self-assigned this Nov 28, 2023
@fbarbu15 fbarbu15 reopened this Dec 11, 2023
@fbarbu15
Copy link
Author

I get encoding/hex: invalid byte: U+002D '-' now
node2_2023-12-11_10-57-37__988487c8-181e-4c4b-b683-4f42f1960b7a__wakuorg_go-wakulatest.log

@richard-ramos
Copy link
Member

@fbarbu15, please share the request you used that triggered that error

@fbarbu15
Copy link
Author

I've double checked and with the original curl request I still get odd length hex string so it seems that this fix in not in go-waku:latest
This 2nd error is with a request that uses a UUID for requestId. ex:

curl -vv -X POST "http://localhost:55372/filter/v2/subscriptions" -H "accept: text/plain" -H "content-type: application/json" -d '{"requestId":"a39716e7-6d41-4f2d-8ee6-7a9868c119d6","contentFilters":["/test/1/waku-filter/proto"]
, "pubsubTopic": "/waku/2/rs/19/1"}'

@richard-ramos
Copy link
Member

Hm, indeed. Seems like latest is not being updated automagically.
Maybe @yakimant @apentori can take a look? i seem to have lost access to the docker jobs of go-waku in ci.status.im

@apentori
Copy link
Contributor

There is an issue with the CI job, due to the migration with harbor registry.

@apentori
Copy link
Contributor

The build is fixed, latest images are now accessible in harbor/ https://harbor.status.im/harbor/projects/9/repositories/go-waku/artifacts-tab/artifacts/latest.
I'm going to update the test environment to use harbor registry instead of docker hub

@fbarbu15
Copy link
Author

The build is fixed, latest images are now accessible in harbor/ https://harbor.status.im/harbor/projects/9/repositories/go-waku/artifacts-tab/artifacts/latest. I'm going to update the test environment to use harbor registry instead of docker hub

Thanks @apentori
How do I get access to this harbor registry?
And how do I update my code to use this new image? right now I use image name: "wakuorg/go-waku:latest"

@apentori
Copy link
Contributor

You can pull the image with docker pull harbor.status.im/wakuorg/go-waku:latest

If you use a docker compose, you can add the registry domain name harbor.status.im before the image name so docker will know to use the harbor registry.

@fbarbu15
Copy link
Author

You can pull the image with docker pull harbor.status.im/wakuorg/go-waku:latest

If you use a docker compose, you can add the registry domain name harbor.status.im before the image name so docker will know to use the harbor registry.

Thanks, works!

@fbarbu15
Copy link
Author

@richard-ramos confirming the fix and closing this one

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

Successfully merging a pull request may close this issue.

3 participants