neomjs / neo

The application worker driven frontend framework
https://neomjs.com
MIT License
2.83k stars 151 forks source link

worker.mixin.RemoteMethodAccess: accessing new main threads too early #5577

Open tobiu opened 1 month ago

tobiu commented 1 month ago

It is an edge-case bug which does happen inside our colors app websocket demo: Screenshot 2024-07-15 at 19 07 46

the app worker tries to send messages to the new main thread => loading theme files, before these remotes have been registered.

2 options:

  1. debug the "app is ready" => connect event to ensure it fires once all main thread addons are ready.
  2. if a namespace does not exist yet, try again 100(?)ms later