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

feat: better support for development #1665

Closed
8 of 9 tasks
Tracked by #95
weboko opened this issue Oct 15, 2023 · 5 comments · Fixed by #1733
Closed
8 of 9 tasks
Tracked by #95

feat: better support for development #1665

weboko opened this issue Oct 15, 2023 · 5 comments · Fixed by #1733
Assignees
Labels
E:Presentation Readiness See https://github.com/waku-org/pm/issues/95 for details enhancement New feature or request

Comments

@weboko
Copy link
Collaborator

weboko commented Oct 15, 2023

This is a support request

Problem

This issue is rather generic and includes two things to address: better development compatibility and suppression of useless errors.

I saw these problem occurring during basic flow:

  • send couple of lightPush messages;
  • make couple of filter subscriptions;
  • request some store messages;
  • run waku relay and send / get some messages;
  • wait for 5-10-20 minutes doing nothing on the page;

Better development

During hackathon many builders complained about errors that were bothering their development routine. It was happening due to random errors being thrown and either not caught or being caught but propagated up the stack. When such a thing happens - build in development mode show special screen with message of the error.

This problem can be addressed by creating basic apps and running basic flow

  • check if NextJS;
  • check latest create-react-app;

Useless errors

This one is quite generic but we should start investigating it and addressing.
Problem here is that in console there are many errors that are misleading people new to project (see below).

TODO:

  • run basic flow and check errors in console;
  • if they have no value - document here and try to suppress;

image

Proposed Solutions

Useless errors should be suppressed and not shown to console or caught by js-waku if they originate from beneath.
This should prevent development mode showing error screens when not needed and will help novice people not getting lost in understanding what is a real error and what is not.

@weboko weboko added the enhancement New feature or request label Oct 15, 2023
@weboko weboko self-assigned this Oct 15, 2023
@vpavlin
Copy link
Member

vpavlin commented Oct 16, 2023

My way to reproduce some nasty behaviour in react app

  1. Clone https://github.com/vpavlin/js-waku-helpers
  2. cd example & npm start
  3. Open the app in multiple tabs
  4. Wait for both server and client to be ready (server prints ready, client is ready when New game is clickable)
  5. Fill in the game name and user name, hit New game
  6. You can also fill in user name in another tab and hit Join button games it captured from Waku

I observe multiple errors which bubble up with various frequency

Failed to get a connection to the peer
The operation was aborted
stream reset
stream ended before 1 bytes became available
Uncaught (in promise) CodeError: Too many outbound protocol streams for protocol "/vac/waku/filter-subscribe/2.0.0-beta1" - limit 64
...

@weboko weboko added the E:Presentation Readiness See https://github.com/waku-org/pm/issues/95 for details label Oct 16, 2023
@weboko
Copy link
Collaborator Author

weboko commented Oct 16, 2023

Moving to priority due to it being highly requested and important to overall satisfaction.
Will start working on it in a day or so.

@weboko
Copy link
Collaborator Author

weboko commented Oct 31, 2023

Weekly update:

  • achieved: experimented with Next.js app;
  • next: looking for ways to mitigate errors in console or catch others;

@weboko
Copy link
Collaborator Author

weboko commented Nov 5, 2023

Weekly update:

  • achieved: by going through basic flow identified errors that can or cannot be ignored;
  • next: working on improving log errors, aiming to complete in couple of days;

@weboko
Copy link
Collaborator Author

weboko commented Nov 27, 2023

Lately I've been doing a lot of experiments with NextJS and didn't face any critical problems with js-waku.
The only thing that was noticed is problem with create-react-app and latest js-waku that is fixed by @hackyguru

So the only leftover is errors with WebSocket connection that is not possible to remove as it originates in a low level of browser API and the only mitigation to this I see is an information statement in developer console to prevent consumers from chasing ghosts investigating why WebSocket fails for them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:Presentation Readiness See https://github.com/waku-org/pm/issues/95 for details enhancement New feature or request
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants