[Bug] "AdvancedMarkerElement: map invalid: not an instance of MapsApiMap"
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend
Research direction
Start with the linked CodeSandbox and its multiple-page Map and TooltipMarker setup, then inspect the AdvancedMarker integration while reproducing the intermittent map-invalid error during page changes. Done means identifying and resolving the issue so the error no longer occurs in the reproduced setup, with relevant regression coverage if an existing test entry point applies.
Written by the indexing model from the issue text.
Description
Description
We keep getting this error:
AdvancedMarkerElement: map invalid: not an instance of MapsApiMap
I'm not sure what's causing this issue to occur, but we keep running into it. There are a few things to note about our usage:
- We're using the
AdvancedMarkerto create aTooltipMarkercomponent - Our app renders a list of pages, each with their own
Map, each receiving a unique location
At first I thought the error was perhaps being caused by some mounting/unmounting behavior that happens when switching between pages, or by how we implemented TooltipMarker, but I'm honestly not sure.
Steps to Reproduce
https://codesandbox.io/p/sandbox/advancedmarker-example-cyycp9
Getting the error to show up consistently is... not easy. The codesandbox linked above shows how the app is set up at a basic level, i.e. multiple pages rendering their own Map and a basic TooltipMarker implementation using AdvancedMarker.
Environment
- Library version: 1.1.1
- Google maps version: weekly
- Browser and Version: Chrome 128
- OS: Mac
Logs
No response
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 195
- Avg merge
- 6h 26m
- Merged PRs (30d)
- 3
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing 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.
More from visgl/react-google-maps
-
Polygon / Polyline: edits after a controlled `paths` update never reach `onPathsChanged`Possibly taken @anubhavlal07 claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
visgl/react-google-maps#1120 ·
Maintainers usually reply within 1 day
-
google maps issue
Difficulty 3/5 1-2 days Newbie friendliness 74/100
visgl/react-google-maps#1080 · 1 comment ·
Maintainers usually reply within 1 day
-
bug needs more info
Difficulty 3/5 1-2 days Newbie friendliness 45/100
visgl/react-google-maps#1039 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
visgl/react-google-maps#918 · 9 comments ·
Maintainers usually reply within 1 day
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
visgl/react-google-maps#905 ·
Maintainers usually reply within 1 day
All issues in visgl/react-google-maps
Similar issues
-
accessibility area:ci ci-test level:low priority:high type:test
Difficulty 2/5 1-3 hours Newbie friendliness 71/100
skytuhua-org/Gen-V1#3132 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
drmrd/vernacular#1238 ·
Maintainers usually reply within 1 day
-
question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
enhancement migration-prioritized
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
Hudson-Pufferfish/local-party-console#136 ·
Maintainers usually reply within 1 day
-
priority:medium
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Maintainers usually reply within 1 day