element-hq / element-hq/element-web

Live location sharing freeze/crash when location permissions disabled

Open
#24,852 3 comments 0 reactions 1 assignee Claimed by @kerryarchibald View on GitHub
A-Location-Sharing O-Occasional S-Major T-Defect Z-Labs
Dominant language
TypeScript
Stars
13.5k
Forks
2.8k
PR merge metrics
PR metrics pending

Description

### Steps to reproduce

1. Start with location permissions disabled or maybe not allowed/activated in any way (fresh start)
1. Open the **More options** menu in the bottom-right
1. Select **Location**
1. Select **My live location**
1. Application freezes up
1. After a while, the live location sharing overlay closes and the following error is shown in the console

Open the **More options** menu in the bottom-right -> Select **Location** | Select **My live location** | Application freezes up | After a while, the live location sharing overlay closes and the following error is shown in the console
--- | --- | --- | ---
![](https://user-images.githubusercontent.com/558581/225740399-b4bb10e8-5d7a-4b7f-89c3-7b5277e6757d.png) | ![](https://user-images.githubusercontent.com/558581/225740414-3a8fb0c9-4797-4f0b-a6df-162314b0f105.png) | ![](https://user-images.githubusercontent.com/558581/225740464-65df7db5-7b55-4c12-8369-df9d26bd4891.png) | .

```
Uncaught RangeError: Maximum call stack size exceeded
at JSON.stringify ()
at rageshake.ts:95:29
at Array.map ()
at ConsoleLogger.log (rageshake.ts:89:21)
at consoleObj. (rageshake.ts:73:26)
at console.error (instrument.js:110:1)
at Logger.error (logger.ts:44:39)
at GeolocateControl. (LocationPicker.tsx:177:16)
at GeolocateControl.fire (maplibre-gl.js:31:11745)
at GeolocateControl._onError (maplibre-gl.js:35:379875)
```

### Outcome

#### What did you expect?

A proper error dialog/state that doesn't lock up my browser. Probably just need to show the existing `Could not fetch location` modal after failing to fetch.

![](https://user-images.githubusercontent.com/558581/225740373-31770658-05cd-47e7-b1cc-f3f0f86b1685.png)

#### What happened instead?

Application freezes and live location sharing feature essentially just crashes and disappears.

### Operating system

Windows 10

### Browser information

Chrome Version 110.0.5481.180

### URL for webapp

develop.element.io

### Application version

Element version: c8b3f5d51211-react-a86a8e7f8eee-js-23837266fca5 Olm version: 3.2.12

### Homeserver

matrix.org

### Will you send logs?

Yes

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.