fetch.close(); leads to ANR Application Not Responding
See original GitHub issueI have an activity where I build an instance of fetch in onCreate()
then use that instance through out the Activity
.
Finally onDestroy()
I call fetch.close();
This works fine the Activity destroyed and fetch instance is closed. But my phone freezes to about 9 seconds and usually with an ANR Application Not Responding after that then it works fine. But during the freeze NO button NOR input responds you know.
I struggled with it then I comment off //fetch.close();
and when I left onDestroy();
the activity everything works great and No any ANR’s. I also could not leave the code that way since when a user reenter the activity onCreate();
fails with an exception
FetchException Namespace already exist for this instance of Fetch, did you forget to close...
So I am stuck with this… What can solve this?
Issue Analytics
- State:
- Created 6 years ago
- Comments:17 (6 by maintainers)
@Xenolion @Sergios21 found the issue with closing Fetch and ANR. Working on a fix. Hope to release it soon.
The bug is solved! Now I can close Fetch instance without any error! @tonyofrancis