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

fix(examples): Set record to the Waku Node Builder as it is required. #2328

Merged
merged 1 commit into from
Jan 5, 2024

Conversation

EmilIvanichkovv
Copy link
Contributor

@EmilIvanichkovv EmilIvanichkovv commented Jan 2, 2024

Description

I followed the instructions in the examples readme. After running make example2, everything appeared to be in order. However, when executing ./build/subscriber, I encountered the following message:

NTC 2024-01-02 16:50:37.824+02:00 starting subscriber                        tid=132009 file=subscriber.nim:35 wakuPort=50000 discv5Port=8000
/some/nice/path/nwaku/examples/subscriber.nim(102) subscriber
/some/nice/path/nwaku/vendor/nim-chronos/chronos/internal/asyncfutures.nim(660) cb
Error: unhandled exception: Asynchronous task [setupAndSubscribe() at subscriber.nim:34] finished with an exception "LPError"!
Message: node record is required
Stack trace: /some/nice/path/nwaku/examples/subscriber.nim(102) subscriber
/some/nice/path/nwaku/examples/subscriber.nim(34) setupAndSubscribe
/some/nice/path/nwaku/vendor/nim-chronos/chronos/internal/asyncfutures.nim(378) futureContinue
/some/nice/path/nwaku/examples/subscriber.nim(44) setupAndSubscribe
/some/nice/path/nwaku/vendor/nim-results/results.nim(840) tryValue
 [FutureDefect]

The error indicated that a "node record is required," so I addressed this by setting it to the Waku Node Builder object. After rebuilding and restarting both the subscriber and publisher, everything seems to be working correctly.

Changes

  • Create enr record and set it to Waku Node Builder object in the examples

How to test

  1. Follow the examples readme.

Issue

closes #2327

@jm-clius jm-clius requested review from SionoiS and alrevuelta January 2, 2024 15:41
Copy link
Contributor

@jm-clius jm-clius left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@EmilIvanichkovv EmilIvanichkovv changed the title fix: Set record to the Waku Node Builder in the examples. fix(examples): Set record to the Waku Node Builder. Jan 2, 2024
@EmilIvanichkovv EmilIvanichkovv changed the title fix(examples): Set record to the Waku Node Builder. fix(examples): Set record to the Waku Node Builder as it is required. Jan 2, 2024
Copy link
Member

@vpavlin vpavlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@EmilIvanichkovv EmilIvanichkovv force-pushed the fix/examples branch 2 times, most recently from edb9e0b to f166f25 Compare January 3, 2024 12:36
@Ivansete-status Ivansete-status merged commit 42ede93 into waku-org:master Jan 5, 2024
8 checks passed
@EmilIvanichkovv EmilIvanichkovv deleted the fix/examples branch January 5, 2024 09:14
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

Successfully merging this pull request may close these issues.

bug: subscriber and publisher from examples are not working as expected.
5 participants