visgl / visgl/react-google-maps

[Bug] When cookies blocked Page hangs when we use APIProvider

Open
#802 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
1.9k
Forks
193
Avg merge
3d 16h
Merged PRs (30d)
13

Description

Description

We use Usercentrics to block or allow Cookies / Analytics:

When wie are in the "blocked" State then the usage of APIProvider not working correctly:

The site hangs on loading a "long" (10 Sec +) Time and then it works as expected -> Site loads and with useMapsLibrary i get null as expected.

When i check it with DEV Tools i can see this:

Image

In my opinion, the APIProvider should be usable regardless of whether cookies/analytics have been accepted or not. The libraries are then loaded accordingly—or not.

  • This can then be checked using useApiIsLoaded.
  • Call useMapsLibrary and the returned values is the desired Library or null

Or is that not correct and im missing something?

Steps to Reproduce

Block Google with e.g. UserCentrics and use then APIProvider with mandatory apiKey prop

Environment
  • Library version: 1.5.4
  • Google maps version: weekly
  • Browser and Version: Edge 138.0.3351.83
  • OS: Windows 10

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

Reproduce the issue with APIProvider using a mandatory apiKey while Google cookies are blocked through Usercentrics, then observe the loading delay and the results from useApiIsLoaded and useMapsLibrary. Done means the site no longer hangs for 10 seconds or more and the library state matches the expected blocked-cookie behavior.

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
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.