Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EXP] Inconsistency between dev mode and prod mode permissions (Bug?) #1049

Open
2 tasks done
zystudios opened this issue Aug 10, 2024 · 0 comments
Open
2 tasks done
Labels
documentation Improvements or additions to documentation

Comments

@zystudios
Copy link

zystudios commented Aug 10, 2024

In dev mode, I seem to have all the permissions, and I don't have to declare them separately in package.json.

 "manifest": {
    "host_permissions": [
      "https://*/*"
    ],
    "permissions": [
    ]
  }

For example, I don't have to declare tabs permissions to use chrome.tabs.sendMessage

But in prod mode, If I don't declare tabs permission I can't use chrome.tabs.sendMessage

I must declare it in package.json:

  "permissions": [
       "tabs"
    ]

There are also things like having to declare contextMenus in order to use chrome.contextMenus.create under prod, etc.

But under dev I can just use it without declaring it.

  "permissions": [
       "contextMenus"
    ]

🙁🙁🙁🙁🙁🙁🙁🙁

So this creates a problem, everything works fine with my extension in the dev environment, but in the prod environment there are all sorts of problems because I don't know about this mechanism of plasmo, and I have to declare the relevant permissions in the prod environment to be able to use it.

Is this a bug or is the framework designed so ?

I suggest to keep all the permissions the same whether it's dev or prod, so that you can find the problem as early as possible under dev!

Or the framework can do a check if you use code without declared permissions and give you the necessary hints.

Thanks

Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I checked the current issues for duplicate problems.
@zystudios zystudios added the documentation Improvements or additions to documentation label Aug 10, 2024
@zystudios zystudios changed the title [EXP] Inconsistency between dev mode and pro mode permissions [EXP] Inconsistency between dev mode and prod mode permissions Aug 10, 2024
@zystudios zystudios changed the title [EXP] Inconsistency between dev mode and prod mode permissions [Bug?] Inconsistency between dev mode and prod mode permissions Aug 10, 2024
@zystudios zystudios changed the title [Bug?] Inconsistency between dev mode and prod mode permissions [EXP] Inconsistency between dev mode and prod mode permissions (Bug?) Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant