Skip to content

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

@dkleber89

Description

@dkleber89

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions