chrome-ext-troubleshootinglisted
Install: claude install-skill RadOrigin-LLC/RAD-Claude-Skills
# Chrome Extension Troubleshooting
Common problems fall into three categories: build/packaging issues, runtime bugs, and Chrome Web Store rejections. Most have straightforward diagnoses once the pattern is recognized.
## Build-Time Mistakes
### Case-Sensitive File Paths
Windows is case-insensitive; CWS reviewer runs on Linux (case-sensitive). `Background.js` works locally but fails on submission (Yellow Magnesium rejection).
**Fix:** Verify all file paths match exactly, including capitalization. Test on a case-sensitive filesystem or review the packed `.zip` contents.
### Missing web_accessible_resources
Content scripts cannot load extension assets (images, fonts, CSS) without declaring them:
```json
{
"web_accessible_resources": [{
"resources": ["images/*", "fonts/*"],
"matches": ["<all_urls>"]
}]
}
```
### Indirect eval() from npm Packages
Third-party libraries may internally use `eval()`, violating MV3 CSP. Audit dependencies:
```bash
# Search for eval in bundled output
grep -r "eval(" .output/chrome-mv3/
grep -r "new Function(" .output/chrome-mv3/
```
**Fix:** Replace the library, isolate in a sandbox page, or find an alternative.
### Accidental Secrets in Source ZIP
Firefox requires a sources `.zip` that can rebuild the extension. `.env` files or secrets may leak:
**Fix:** Add `.env*`, `*.pem`, and credentials to `.gitignore` and verify they're excluded from the ZIP.
## Runtime Debugging
| Symptom | Likely Cause | Fix |
|---------|-------------|-