visgl / visgl/react-google-maps
[Bug] Refused to load remote script in chrome extension script
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
- 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
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 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