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: unable to decode message sent via REST API on wakuNode #36

Open
chaitanyaprem opened this issue Jul 8, 2024 · 1 comment
Open
Assignees

Comments

@chaitanyaprem
Copy link

chaitanyaprem commented Jul 8, 2024

While using this frontend app as part of https://github.com/waku-org/nwaku-compose
I had noticed the following decode error when i sent a message using commandline.
This is what i had used to send a message as explained in nwaku-compose repo.

curl -X POST "http://127.0.0.1:8645/relay/v1/auto/messages" -H "content-type: application/json" -d '{"payload":"'$(echo -n "Hello Waku Network - from Anonymous User" | base64)'","contentTopic":"/universal/1/community/waku"}'

`decode message error 
Object { payload: "SGVsbG8gV2FrdSBOZXR3b3JrIC0gZnJvbSBBbm9ueW1vdXMgVXNlcg==", contentTopic: "/universal/1/community/waku", version: 0, timestamp: 1720405343121209300, ephemeral: false }
 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    decodeMsg App.tsx:390
    children App.tsx:588
    App App.tsx:588
    React 8
    workLoop scheduler.development.js:266
    flushWork scheduler.development.js:239
    performWorkUntilDeadline scheduler.development.js:533`
@kaichaosun
Copy link
Contributor

@chaitanyaprem the encoding method is different in frontend if I remember correctly. The future of waku-frontend may include such inter operability, but I think we need to discuss it more before implement new features.

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

2 participants