Please remove warning - Called stopObserving with existing subscriptions
See original GitHub issueEven if we call clearWatch
before stopObserving
, this warning is fired every time and gets very annoying. Can we get the warning removed? Or what’s the right way to prevent it?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:11 (4 by maintainers)
Top Results From Across the Web
How to call stopObserving() from navigator.geolocation ...
However, that gives me the warning: Called stopObserving without existing subscriptions. I have no idea what to make of it.
Read more >How to use the fbjs/lib/warning function in fbjs - Snyk
To help you get started, we've selected a few fbjs/lib/warning examples, ... if (sub) { warning(false, 'Called stopObserving with existing subscriptions.
Read more >IntersectionObserver.unobserve() - Web APIs | MDN
The IntersectionObserver method unobserve() instructs the IntersectionObserver to stop observing the specified target element.
Read more >Solved: Re: How does a parent stop observing a student ...
I have some parents that would like to stop observing or unlink their accounts to former students. How can they accomplish this task?...
Read more >Using the Service Observe feature on Windows clients
Use this procedure to use the Service Observe feature to listen in and possibly talk on calls to extensions, attendants, agents, ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
No you’re right.
clearWatch
will clear a specific subscription and then check if there’s any active watcher. If there’s none, it’ll callstopObserving
to shut down the native location updates.stopObserving
will shut down the native location updates immediately, then proceeds to check if there’s any active watchers. If there are active watchers, it’ll print a warning to let developers know they still have active watchers before clearing all of them.Printing the warning is actually useful for developers, who mistakenly called
stopObserving
. If you’re knowingly calling it to stop location updates & getting annoyed with the warning, you can ignore it usingYellowBox
api. Also this only affects development, it has no effect in production.Can you provide a sample code ? This shouldn’t be possible, clearWatch removes location tracking when called.