visgl / visgl/react-google-maps

[Bug] Refused to load remote script in chrome extension script

Open
#535 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description

Refused to load the script 'https://maps.googleapis.com/maps/api/js?key=secret&language=en-US&solution_channel=GMP_visgl_rgmlibrary_v1_default&loading=async&callback=__googleMapsCallback__' because it violates the following Content Security Policy directive: "script-src 'self'". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

failed to load the Google Maps JavaScript API Error: The Google Maps JavaScript API could not load.
at scriptElement.onerror (index.umd.js:182:1)

Steps to Reproduce
  1. init GoogleAPIMapsProvider in chrome extension
Environment
  • Library version: @vis.gl/react-google-maps@1.1.3
  • Google maps version: weekly
  • Browser and Version: Version 128.0.6613.138 (Official Build) (64-bit)
  • OS: Windows 10
Logs

No response

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 with the GoogleAPIMapsProvider path that produces the error in index.umd.js, then reproduce the supplied Google Maps URL and CSP failure in a Chrome extension. Trace how the provider loads the remote script and identify the extension-compatible behavior required for successful loading. Done means the provider loads the Google Maps JavaScript API without the reported script-src violation.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.