robosats
robosats copied to clipboard
Max concurrent requests is limited to 50 before crash
Describe the bug
The RoboSats Android app crashes when there is a queue of 50 pending requests to the Tor
client react-native-tor
.
The current setting for numberConcurrentRequests
at 0 should allow unlimited concurrent requests.
https://github.com/RoboSats/robosats/blob/84904901fcb704c84f0d0684c89e893209a03014/mobile/services/Tor/index.ts#LL9C10-L9C10
Tests with this number set close to 50 and also close to 1000 yield the same crash at ~50 pending requests.
To Reproduce Steps to reproduce the behavior. Can be easily reproduced if there are 50+ orders in the order book
- Open the Android app and let it connect to Tor
- Go to the Offers page and click > (next page) very quickly to start loading all 50+ robot avatars at once
- The app will suddenly shut down
Expected behaviorhelp The app should not shut down. This might become more problematic once there are several coordinators and many more concurrent requests.
Possible solution
If nothing can be done with the current API of react-native-tor
, we could implement our own queuing in the web client js that runs only when embedded in the Webview Android app.
Is your feature request related to a problem? Please describe. Sounds do not work on the Android webview is not making sounds work when the order is taken, etc.
Describe the solution you'd like We could make the sounds work by sending a message up to the react-native wrapper and playing sounds using react-native libraries.
In a similar fashion to our already implemented methods in systemClient
to handle clipboard and cookies, we could add methods to handle sounds.
This task is rewarded with :zap: 300K Sats :zap:
Hi @Reckless-Satoshi, I have limited skills in RN but I think I can help. If this is still a issue, can you assign me?