visgl / visgl/react-google-maps
[Bug]: TypeError: Cannot read properties of undefined (reading 'getRootNode')
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
Description
Our app (https://restaurants.umai.io/en/restaurants) crashes randomly with this report, and i found the stack trace as below:
Please find more details for traces here:
https://umai.sentry.io/share/issue/75cbb8ab61614381b63877782fadd42e/
Steps to Reproduce
The error may stem from the @vis.gl/react-google-maps library attempting to access a map instance that has already been unmounted or is in an invalid state during the cleanup phase.
Environment
- Library version: "@vis.gl/react-google-maps": "^1.5.4",
- Google maps version: weekly
- Browser and Version: Chrome 137.0.0
- OS: Windows >=10
Logs
Exception - This event:
TypeError: Cannot read properties of undefined (reading 'getRootNode')
{
arguments: [
{
message: Cannot read properties of undefined (reading 'getRootNode'),
name: TypeError,
stack:
TypeError: Cannot read properties of undefined (reading 'getRootNode')
at Object.sn (https://maps.googleapis.com/maps-api-v3/api/js/61/10d/main.js:173:41)
at set map (https://maps.googleapis.com/maps-api-v3/api/js/61/10d/marker.js:105:349)
at https://restaurants.umai.io/_next/static/chunks/4465-9b4e1d888e5ea8c0.js:1:16560
at oK (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:87697)
at ux (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:106467)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105730)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105928)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105792)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105862)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105792)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105862)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105792)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105928)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105792)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105862)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105792)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105862)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105792)
at uS (https://restaurants.umai.io/_next/static/chunks/118e8794-c82d6148a62986e3.js:1:105928)
at uw (https://restaurants.umai.io/_next/static/chunks/118e8794-...
}
]
}
Google Maps JavaScript API error: NotLoadingAPIFromGoogleMapsError
https://developers.google.com/maps/documentation/javascript/error-messages#not-loading-api-from-google-maps-error
{
arguments: [
Google Maps JavaScript API error: NotLoadingAPIFromGoogleMapsError
https://developers.google.com/maps/documentation/javascript/error-messages#not-loading-api-from-google-maps-error
],
logger: console
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository files or tests are named. Start by reviewing the map and marker lifecycle paths implicated by the stack trace, then investigate the reported unmount or invalid-state cleanup scenario and the Google Maps loading error. Done means reproducing the crash or identifying a confirmed lifecycle failure and adding coverage for the fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100