android / android/nowinandroid

[Bug]: TooManyRequestsException in ConnectivityManager.registerNetworkCallback Causes App Crash

Open
#1,714 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Kotlin
Stars
21.8k
Forks
4.6k
Avg merge
19h 20m
Merged PRs (30d)
2

Description

### Is there an existing issue for this?

- [X] I have searched the existing issues

### Is there a StackOverflow question about this issue?

- [X] I have searched StackOverflow

### What happened?

The app crashes with the following exception when using ConnectivityManager.registerNetworkCallback. This occurs because multiple network callbacks are registered without proper cleanup or throttling, leading to a TooManyRequestsException.

This issue is commonly discussed on platforms like Stack Overflow. A related thread that might provide helpful insights is [Compose TooManyRequestsException when there is not more than one callback registered].[https://stackoverflow.com/questions/77493004/compose-toomanyrequestsexception-when-this-is-not-more-than-1-callback-registere](url)

### Relevant logcat output

_No response_

### Code of Conduct

- [X] I agree to follow this project's Code of Conduct

Contributor guide

Open the contributing guide

Research direction

Start by locating the app path that calls ConnectivityManager.registerNetworkCallback and reproduce the TooManyRequestsException described in the issue. Review the linked Stack Overflow thread for context; done means the app no longer crashes from excessive network callback registration, with cleanup or throttling behavior verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.