[BUG] manifest.json contains "storage" permission in dev and prod build, even if not added in package.json
What happened?
What happened?
After the dev or the prod build is generated the manifest.json contains permission for storage by default even though I have not added in package.json's manifest object
Following is the package.json manifest section
"manifest": {
"permissions": [
"identity"
],
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self' 'unsafe-inline';"
},
"oauth2": {
"client_id": "$PLASMO_PUBLIC_FIREBASE_CLIENT_ID",
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"
]
}
}
And following is the manifest.json from chrome-mv3-prod
{
"icons": {
"16": "icon16.plasmo.6c567d50.png",
"32": "icon32.plasmo.76b92899.png",
"48": "icon48.plasmo.aced7582.png",
"64": "icon64.plasmo.8bb5e6e0.png",
"128": "icon128.plasmo.3c1ed2d2.png"
},
"manifest_version": 3,
"action": {
"default_icon": {
"16": "icon16.plasmo.6c567d50.png",
"32": "icon32.plasmo.76b92899.png",
"48": "icon48.plasmo.aced7582.png",
"64": "icon64.plasmo.8bb5e6e0.png",
"128": "icon128.plasmo.3c1ed2d2.png"
},
"default_popup": "popup.html"
},
"version": "0.0.1",
"author": "Cliqueraft",
"name": "supertasks.io extension",
"description": "Quick decision making tool web extension",
"permissions": [
"storage",
"identity"
],
"content_security_policy": {
"extension_pages": "script-src 'self'; object-src 'self'; script-src-elem 'self' 'unsafe-inline';"
},
"oauth2": {
"scopes": [
"https://www.googleapis.com/auth/userinfo.email",
"https://www.googleapis.com/auth/userinfo.profile"
]
}
}
After debugging the code I encountered following code could be the reason for adding storage permission by default https://github.com/PlasmoHQ/plasmo/blob/c1dd9529278d777f8a0a085d5c63c08135a416bb/cli/plasmo/src/features/manifest-factory/base.ts#L78
PS: My app gets rejected from web-app store if I am using unnecessary permissons
Version
Latest
What OS are you seeing the problem on?
MacOSX
What browsers are you seeing the problem on?
Chrome
Relevant log output
No response
(OPTIONAL) Contribution
- [X] I would like to fix this BUG via a PR
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
- [X] I checked the current issues for duplicate problems.
i have the same problem, any solution?
@hugepizza For meanwhile you can manually go to prod folder which is generated and remove storage permission from manifest.json file
Let me generate PR for the same
+1, the same problem, how to solve? I dont want to manually
That auto permission will only be applied if you installed the storage package. If you don't need to use permission at all, remove the plasmo storage package should remove it I think :-?