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: filter subscription is not working on cold start #2190

Closed
weboko opened this issue Oct 20, 2024 · 2 comments · Fixed by #2194
Closed

bug: filter subscription is not working on cold start #2190

weboko opened this issue Oct 20, 2024 · 2 comments · Fixed by #2194
Assignees
Labels
bug Something isn't working

Comments

@weboko
Copy link
Collaborator

weboko commented Oct 20, 2024

Problem

When js-waku tab is open for first time sometimes Filter doesn't work

Solution

Investigate and fix

@weboko weboko added the bug Something isn't working label Oct 20, 2024
@weboko weboko self-assigned this Oct 20, 2024
@vpavlin
Copy link
Member

vpavlin commented Oct 21, 2024

I think I've seen this too, but it started working after a while (even without reload, I believe, but I will check again)

@weboko
Copy link
Collaborator Author

weboko commented Oct 21, 2024

It seems that peer:identify kicks in later so that when js-waku has already a connection - it usually not negotiated fully so waitForPeers starts waiting for new peer:identify events

Image

If it is the case that means that:

  • if waitForPeers is used - it will block execution unless there are more than one node present;
  • if waitForPeers is not used but subscription is getting initiated right after dial / bootstrap of the node - it might not have peers / protocols populated at that point in time (see picture);

Image

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
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants