visgl / visgl/react-google-maps
[Bug] Throws if an AdvancedMarker is rendered and the apiKey is invalid
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 193
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 13
Description
Description
Summary: title
Context:
In our business, clients provide their own api keys. This makes it likely that an apiKeys are invalid, expired or not configured correctly.
We would like to show custom error messages, but throwing makes it impossible. We tried using an error boundary, but I'm not sure how to get the reason for the error.
Steps to Reproduce
Code Sandbox: https://codesandbox.io/p/sandbox/q3cyxh
It should throw on load
Environment
- Library version: 1.7.1
- Google maps version: weekly
- Browser and Version: Chrome latest
- OS: Windows 10
Logs
TypeError
Cannot read properties of undefined (reading 'getRootNode')
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
Start by running the linked CodeSandbox with an invalid or missing API key and an AdvancedMarker, then compare the reported getRootNode TypeError with the expected behavior. Trace the AdvancedMarker error path and determine how the invalid-key failure can be surfaced for consumers to handle. Done means the reproduction no longer produces an unusable uncaught error and the failure reason is available for a custom message.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 45/100