question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

fetch.close(); leads to ANR Application Not Responding

See original GitHub issue

I 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:closed
  • Created 6 years ago
  • Comments:17 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
tonyofranciscommented, Mar 12, 2018

@Xenolion @Sergios21 found the issue with closing Fetch and ANR. Working on a fix. Hope to release it soon.

1reaction
Xenolioncommented, Mar 16, 2018

The bug is solved! Now I can close Fetch instance without any error! @tonyofrancis

Read more comments on GitHub >

github_iconTop Results From Across the Web

ANRs - Android Developers
When the UI thread of an Android app is blocked for too long, an "Application Not Responding" (ANR) error is triggered. If the...
Read more >
Android app not responding (ANR) - Stack Overflow
ANR occurs when Android detects the system is unable to respond to user input for more than a few seconds.
Read more >
What is ANR and How it Can be Prevented in Android?
ANR stands for Application Not Responding. ... try-catch statement to catch the exception then your app will crash and can be force closed....
Read more >
View crashes and application not responding (ANR) errors
Open Play Console. · Select an app. · On the left menu, select Quality > Android vitals > Crashes and ANRs. · Near...
Read more >
A New Way to Solve Application Not Responding (ANR ...
Note: This piece is about how to finally solve ANRs using higher-fidelity data from Embrace (YC S19) as opposed to using existing solutions, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found