Enable Umami analytics generate error in offscreen
Describe the bug
I'm provide umami analytics in my extension
app.config.ts
export default defineAppConfig({ analytics: { enabled: storage.defineItem("local:enabled", { init: () => false }), userId: storage.defineItem("local:key", { init: () => crypto.randomUUID() as string | undefined }), userProperties: storage.defineItem("local:properties-key", { init: () => ({}) }), providers: [ umami({ apiUrl: umamiApiUrl, websiteId: umamiWebsiteId, domain: umamiDomain }) ] } });And I have offscreen that run with my extension on browser run
background.ts ` (async () => { const contexts = await browser.runtime.getContexts({ contextTypes: [browser.runtime.ContextType.OFFSCREEN_DOCUMENT] });
if (!contexts.length) {
await browser.offscreen.createDocument({
url: "/offscreen.html",
reasons: ["DOM_SCRAPING"],
justification: "Some reason"
});
}
await waitForOffscreenReady();
})(); `
With this I got error in offscreen
Uncaught (in promise) Error: You must add the 'storage' permission to your manifest to use 'wxt/storage' even when I have storage in my manifest
Reproduction
Enable umami in app with described steps
Steps to reproduce
No response
System Info
Mac os,Used Package Manager
pnpm
Validations
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
- The provided reproduction is a minimal reproducible example of the bug.
Source: wxt-dev/wxt