Android: Too many receiver, Total of 1000, registered for pid
Hi,
The Android app getting crash, When I download more than 1000 image, but iOS works fine.
Version of installed library and RN :
Code Snippet:
Can someone please suggest what I made mistakes
@RonRadtke any suggestions for this issue ..?
Looks like we are limited on the amount of receivers per pid. The Request class I'm using internally extends BroadcastReceiver. Every download will create a new one. So you somewhen will run in the limit there. Does it help to wait till the requests are done before starting new downloads?
But unless we find a problem that the receivers are not cleaned up and this is causing the issue we won't be able to do much here.
@RonRadtke We are waiting till the previous execution gets over. We suspect the framework is not releasing the threads internally and that's how it is hitting the ceiling. Is there a way for us to call a function explicitly to clean up the threads used internally? Please guide us as we need to download more than 1000 files one by one.
No there isn't. I think there is more likely a problem that the receivers are not correctly destroyed/ unregistered.So that basically the request objects don't die after being finished and reported to the javascript side.Sent from Outlook for Android
https://github.com/RonRadtke/react-native-blob-util/issues/226 I put it on my todo
Should be fixed with the new event system