Skip to content

Fix Chrome extension error: Add missing storage permission#1347

Merged
damsleth merged 3 commits intodevfrom
copilot/fix-sidebar-extension-error
Feb 4, 2026
Merged

Fix Chrome extension error: Add missing storage permission#1347
damsleth merged 3 commits intodevfrom
copilot/fix-sidebar-extension-error

Conversation

Copy link
Contributor

Copilot AI commented Feb 4, 2026

Your checklist for this pull request

  • Make sure you are requesting to pull a feature/bugfix branch (right side).
  • Make sure you are making a pull request against the dev branch (left side). Also you should start your branch off our dev branch.
  • Check your code additions locally using npm run watch
  • Make sure strings/resources are added using our resource files
  • Make sure CHANGELOG.md is updated if applicable
  • Make sure Smoke tests are updated if applicable

Review checklist

  • Tested locally

Review theme song

Remove section if you think this is stupid.
🎵 Artist - Song 🎵

Description

Extension threw TypeError: Cannot read properties of undefined (reading 'local') at background.js:22:20 because chrome.storage API requires explicit permission.

Changes:

  • Added "storage" to manifest.json permissions array
  • Updated README.md and TECHNICAL.md to document the permission

Code usage:

// background.js:22 - Set default environment on install
chrome.storage.local.set({ 'did-environment': 'https://did.puzzlepart.com' })

// background.js:35 & sidebar.js:57,64 - Persist user's environment selection
chrome.storage.local.get(['did-environment'], callback)

Without this permission, chrome.storage is undefined.

How to test

  1. Check out locally with gh
  2. Open edge://extensions/ in Microsoft Edge
  3. Reload the extension
  4. Click extension icon - verify no console errors
  5. Switch environments and reopen sidebar - verify persistence works

Related issues

Use e.g. Closes #1000 to link issue 1000 to the PR. Remove section if no related issues.

Related discussions

Remove section if no related discussions.

Related PRs

Remove section if not.

Related smoke tests

Remove section if no related smoke tests.

Original prompt

fix error in sidebar extension functionality:

Error in event handler: TypeError: Cannot read properties of undefined (reading 'local') at chrome-extension://migfdfopbigobolgjgdmmpknlmgcfgmf/background.js:22:20
Context
Unknown
Stack Trace
:0 (anonymous function)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 2 commits February 4, 2026 15:03
Co-authored-by: damsleth <7300548+damsleth@users.noreply.github.com>
Co-authored-by: damsleth <7300548+damsleth@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix error in sidebar extension functionality Fix Chrome extension error: Add missing storage permission Feb 4, 2026
Copilot AI requested a review from damsleth February 4, 2026 15:06
@damsleth damsleth marked this pull request as ready for review February 4, 2026 15:33
@damsleth damsleth merged commit 5eb276e into dev Feb 4, 2026
4 of 5 checks passed
@damsleth damsleth deleted the copilot/fix-sidebar-extension-error branch February 4, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments