-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unsubscribe from Geolocation.watchPosition() in desktop browsers results in an error. #164
Comments
EDIT: A previous version of this issue suggested that .map() .publishBehavior().refCount() did not work as expected. However, this is working fine for me now on Android. So I must have made a build or coding mistake when reporting the issue. |
Sorry @arlowhite, I'm a bit confused here. Are you still experiencing issues with the GeoLocation plugin? |
I did notice the README had an incorrect example of calling |
Updated ionic-native to 1.2.4, no effect. Yes, I still see this error with Chrome and Firefox; in Firefox, the message is different:
Just to clarify, there's no issue when running on my Android device. This error is only seen when developing on the desktop in Chrome or Firefox while using ionic serve. I can't test Internet Explorer since I'm on Linux and don't have my development environment setup in Windows. You don't see this error when unsubscribing in a desktop browser environment? I would say this is a minor bug that almost isn't worth hunting down except for the fact that it may worry developers when they see it. And it's not good to have a method that errors in the development environment but works when deployed to a mobile device. |
ionic info
rxjs: 5.0.0-beta.6
ionic-native: 1.2.2 - 1.2.4
cordova-plugin-geolocation version: 2.2.0
Chrome Version 50.0.2661.102 (64-bit) - 51.0.2704.84 (64-bit)
Firefox 47.0
When testing my app with ionic serve in Chrome Dev tools, I get an error when unsubscribing.
http://ionicframework.com/docs/v2/native/geolocation/
However, the same code works fine on my Android device.
In Chrome Dev Tools, I see this warning:
"Unable to clear the previous observable watch for Geolocation watchPosition"
Followed by the stacktrace:
(cutoff rest of stacktrace, unsubscribe is called in onPageWillLeave)
The text was updated successfully, but these errors were encountered: