airgap-it / beacon-sdk

The beacon sdk allows developers of dApps and wallets on Tezos to implement the wallet interaction standard tzip-10.
https://walletbeacon.io
MIT License
102 stars 63 forks source link

Max Listeners Exceeded #268

Closed klassare closed 2 years ago

klassare commented 2 years ago

Describe the bug (current behavior) After adding 10 (can vary between devices/browsers) peers, it is no longer possible to add more peers. It will just silently fail, with no permission request showing up in the wallet.

To Reproduce Steps to reproduce the behavior:

  1. Go to kukai.app
  2. Pair with a dapp
  3. Repeat step 2 until you see a warning in the dev console

Expected (correct) behavior Users must be able to connect with as many dapps (peers) as they want.

Screenshots and/or logs exeededLimit

Environment

Additional context

AndreasGassmann commented 2 years ago

Thanks for the report.

Looking through the documentation of "EventEmitter", it looks like this message is only there to warn users of a potential memory leak. In our case, those listeners, one per connected dApp, are intentional. There is no problem with this behaviour if the listeners are set up on purpose.

I will still try to reproduce the issue locally, because the functionality should not be affected.

klassare commented 2 years ago

Closing this since it's not reproducible. We received user reports that it didn't work, but started to work after removing some peers. The problems must have been unrelated to this warning.