Skip to content
This repository was archived by the owner on May 29, 2023. It is now read-only.

[BUG] #22

Closed
sterichards opened this issue Apr 15, 2021 · 5 comments
Closed

[BUG] #22

sterichards opened this issue Apr 15, 2021 · 5 comments

Comments

@sterichards
Copy link

sterichards commented Apr 15, 2021

🐞 Bug report

Description

Intermittently, using Chrome with geolocate enabled, calling this.geolocation$.pipe(take(1)).subscribe(position => { doesn't have anything returned from the observer

Reproduction

this.geolocation$.pipe(take(1)).subscribe(position => {
                this.latitude = position.coords.latitude;
                this.longitude = position.coords.longitude;
                console.log('a');
            }, () => {
                console.log('b');
            },
            () => {
                console.log('c');
            });

        if (!this.geolocationSupport) {
                console.log('d');
        }

None of the console logs happen

http://www.stackblitz.com/...

Expected behavior

At least attempt to obtain geoposition

Versions

  • OS: macOS 11.2.3 Big Sur
  • Browser Chrome 89.0.4389.114
  • Angular 11.2.2

Additional context

Brave - Works
Safari - Works

I have tried over HTTP and HTTPs

I have tried Incognito Chrome. I have tried clearing browser cache

@6matko
Copy link

6matko commented Apr 26, 2021

Same here.

@waterplea
Copy link
Member

This sounds weird. This library is very basic and mostly just translates native API to RxJS Observables. I wonder if this could be issue with Chrome. There are no clear steps to reproduce, right?

@6matko
Copy link

6matko commented Apr 26, 2021

I checked it right now with example code in MDN. All worked in Firefox but this time it worked on Chrome but not in Vivaldi browser (Chromium based). Now I doubt that its fault of library.

@sterichards
Copy link
Author

This sounds weird. This library is very basic and mostly just translates native API to RxJS Observables. I wonder if this could be issue with Chrome. There are no clear steps to reproduce, right?

Not really. It was intermittent within Chrome for me. No errors or warnings of any kind in the browser console

@waterplea
Copy link
Member

Looking at the source code for the library I don't see how this could happen unless native geolocation.watchPosition bugs out. If anybody notices a pattern in reproduction, feel free to drop a comment and reopen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants