visgl / visgl/react-google-maps

[Bug] Throws if an AdvancedMarker is rendered and the apiKey is invalid

Open
#889 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

google maps issue
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.