-
Notifications
You must be signed in to change notification settings - Fork 46.7k
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
[DevTools] Manifest version 2 is deprecated #24522
Comments
Redux DevTools issue for reference/inspiration/impact: reduxjs/redux-devtools#1037 |
Hey! Thanks so much for the heads up! We've added it to our plans for this year. 😊 |
@lunaruan I would love to work on this issue. Kindly assign this issue to me. |
Hey, sure you can take a stab at it! |
@DhairyaBahl that would be nice! When do you plan to start working on it? |
To my knowledge, the last time we investigated manifest v3 – there were blockers for our adopting it. I think maybe the |
@mondaychen I will start exploring this issue soon. Since I am a new contributor to React, successful PR may take some time. If this issue needs to be resolved on urgent basis then do let me know. |
@bvaughn haven't tested but at least it's still in the V3 docs https://developer.chrome.com/docs/extensions/mv3/content_scripts/#run_time |
@DhairyaBahl there's a timeline for the migration: https://developer.chrome.com/docs/extensions/mv3/mv2-sunset/ |
@Hanaffi sure :) |
@lunaruan Actually I was working on this issue. 🥲 |
@DhairyaBahl Oh no sorry! We thought you weren't because we hadn't heard from you in awhile (sorry people drop out a lot in OSS!). I'll assign this to you instead 😊 Do you know when you'd get around to it, just so we know when to reassign this if needed? |
Actually @lunaruan I was going through this issue and 've been reading the contributor docs and lots of other docs just to have bit more clarity on this issue coz I am contributing to React for the first time. So, it may take a while before I can make a PR but 'll try to make a PR within a week or two. Hope you understand. Thanks 🙂 |
@DhairyaBahl That works for us! Thanks so much for volunteering to help out! |
@lunaruan @mondaychen I am facing problem in building react in Windows. Everything is working perfectly in Linux but even the yarn command is not working on windows and is showing this error. Kindly help me out with this one. Thanks 🙂 |
@DhairyaBahl are you working on Windows because you no longer have access to your Linux machine? Just wanna make sure because you only need to build it on one OS. |
sorry, hanaffi was not active, I submitted the PR. Hope no one is angry as It's my first contribution. @mondaychen |
Hi all, |
@mondaychen Hi Mondy, But there is an issue here that im trying to solve which isnt directly related to the manifest upgrade. Firstly in order to test the changes you need to build the extension locally. Although there is a readme in the package extension rep. , there are still several issues when building the extension locally which I already opened issues for, and 1 got accepted and they changed the readme for, but there arw still more. If you want I can give you an exact timeline tomorrow as I would like to work on it, but the extension repo is giving me a lot of problems currently. |
@SijaanX |
@mondaychen I understand you completely and its not a good sign when people just get busy and don't give a notice, and when stuck don't try to get help (which will definitely help a lot of others). I will do my best now to try and do the upgrade locally. It would be nice if I succeed anyway :D |
@mondaychen Issues: #1: When building the extension locally, you have to run: This results in the following:
I guess the solution to this is to change |
@SijaanX if you are having issues with basic bash commands like cp you will encounter the same issue with other commands too. I don’t have a lot of experience developing on Windows, but to my knowledge you probably need to set up a Linux-like command line environment such as WSL https://docs.microsoft.com/en-us/windows/wsl/setup/environment |
@mondaychen Managed to solve it as I used xcopy with the recursive flags. |
is this error:
related to the fact that I have to change the This is the relevant part from the manifest.json:
|
Yes, looks like we'll need to either use a different policy or change how we implement |
I'm almost done with the updates but I'm not able to test the extension, even though I followed the readme file. any suggestions are highly appreciated. thank you |
@AnmolBansalDEV Can you describe the issue you are having? Which step did you get stuck with? |
@mondaychen I managed to change how we inject the code. Any idea? |
@SijaanX can you push your code somewhere? I'll take a look |
@SijaanX I have a Windows machine and I have git installed so I use the git bash terminal and I don't have to change any of the commands to build. |
## Summary resolves #24522 To upgrade to Manifest V3, one of the biggest issue is that we are no longer allowed to add a script element with code in textContent so that it would run synchronously. It's necessary for us because we need to inject a global hook for react reconciler to detect whether devtools exist. To do that, we'll leverage a new API `chrome.scripting.registerContentScripts` in V3. Particularly, we rely on the "world" option (added in Chrome v102 [commit](https://chromium.googlesource.com/chromium/src/+/e5ad3451c17b21341b0b9019b074801c44c92c9f)) to run it in the "main world" on the page. This PR also renames a few content script files so that it's easier to tell them apart from other extension scripts and understand the purpose of each of them. Manifest V3 is not yet ready for Firefox, so we need to keep some code for compatibility. ## How did you test this change? `yarn build:chrome && yarn test:chrome` `yarn build:edge && yarn test:edge` `yarn build:firefox && yarn test:firefox`
@mondaychen It's been a couple weeks since the Manifest V3 update was added. What is the timeframe for getting the updated extension into the Chrome webstore? |
@pomack we've released it to some users within Meta. If nothing goes wrong in the following a few weeks, we will release it to Chrome Web Store |
## Summary resolves #24522 To upgrade to Manifest V3, one of the biggest issue is that we are no longer allowed to add a script element with code in textContent so that it would run synchronously. It's necessary for us because we need to inject a global hook for react reconciler to detect whether devtools exist. To do that, we'll leverage a new API `chrome.scripting.registerContentScripts` in V3. Particularly, we rely on the "world" option (added in Chrome v102 [commit](https://chromium.googlesource.com/chromium/src/+/e5ad3451c17b21341b0b9019b074801c44c92c9f)) to run it in the "main world" on the page. This PR also renames a few content script files so that it's easier to tell them apart from other extension scripts and understand the purpose of each of them. Manifest V3 is not yet ready for Firefox, so we need to keep some code for compatibility. ## How did you test this change? `yarn build:chrome && yarn test:chrome` `yarn build:edge && yarn test:edge` `yarn build:firefox && yarn test:firefox`
There are still warnings when using React Devtools with the latest Electron (v22):
And:
Somehow the ID is messed up, I don't know what electron (or my electron install provider) does with this, but it's definitely the React Devtools:
|
Apparently, this is a Electron issue (only): electron/electron#36545 But, isn't the EDIT: Oh, I see it was changed recently, 4b09b0a, but it's not released like this yet... |
That's still happening for me :c is there any solution or workaround for this issue? |
Website or app
https://developer.chrome.com/blog/mv2-transition/
Repro steps
Use latest React DevTools with Electron (Chromium) (18.2.0 / Chromium 100)
How often does this bug happen?
Every time
DevTools package (automated)
No response
DevTools version (automated)
No response
Error message (automated)
No response
Error call stack (automated)
No response
Error component stack (automated)
No response
GitHub query string (automated)
No response
The text was updated successfully, but these errors were encountered: