DevTools: fix backend activation#26779
Merged
hoxyq merged 2 commits intofacebook:mainfrom May 4, 2023
Merged
Conversation
hoxyq
commented
May 4, 2023
Comment on lines
-67
to
-70
| // skip if already attached | ||
| if (renderer.attached) { | ||
| return; | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Frontend side of devtools needs renderer-attached event to be emitted. With this check this will never happen and agent will not receive operations from hook.
Contributor
Author
There was a problem hiding this comment.
cc @mondaychen
Are there any cases I am missing where we really need this check?
Contributor
There was a problem hiding this comment.
Ah yes, I think this was something I missed. Let's remove it now.
hoxyq
added a commit
that referenced
this pull request
May 4, 2023
List of changes: * DevTools: fix backend activation ([hoxyq](https://github.com/hoxyq) in [#26779](#26779)) * fix[dynamic-scripts-injection]: unregister content scripts before registration ([hoxyq](https://github.com/hoxyq) in [#26765](#26765))
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
May 5, 2023
Summary: List of changes: * DevTools: fix backend activation ([hoxyq](https://github.com/hoxyq) in [#26779](facebook/react#26779)) * fix[dynamic-scripts-injection]: unregister content scripts before registration ([hoxyq](https://github.com/hoxyq) in [#26765](facebook/react#26765)) DiffTrain build for commit facebook/react@783e7fc. Changelog: [Internal] << DO NOT EDIT BELOW THIS LINE >> Reviewed By: sammy-SC Differential Revision: D45575104 Pulled By: tyao1 fbshipit-source-id: c065eb8f1f200170f611b5becc0332109f22ef71
acdlite
added a commit
to acdlite/next.js
that referenced
this pull request
May 7, 2023
Fixes a bug where `useFormStatus` crashed during SSR. Includes the following upstream changes: - [16d053d59](https://github.com/facebook/react/commits/16d053d59) Add useFormStatus to server rendering stub ([vercel#26788](facebook/react#26788)) (Andrew Clark) - [efb381bbf](https://github.com/facebook/react/commits/efb381bbf) [Release Script] Print a hint where to get the token ([vercel#26783](facebook/react#26783)) (dan) - [b00e27342](https://github.com/facebook/react/commits/b00e27342) Use native scheduler if defined in global scope ([vercel#26554](facebook/react#26554)) (Samuel Susla) - [783e7fcfa](https://github.com/facebook/react/commits/783e7fcfa) React DevTools 4.27.6 -> 4.27.7 ([vercel#26780](facebook/react#26780)) (Ruslan Lesiutin) - [377c5175f](https://github.com/facebook/react/commits/377c5175f) DevTools: fix backend activation ([vercel#26779](facebook/react#26779)) (Ruslan Lesiutin)
jeongshin
pushed a commit
to jeongshin/react-native
that referenced
this pull request
May 7, 2023
Summary: List of changes: * DevTools: fix backend activation ([hoxyq](https://github.com/hoxyq) in [facebook#26779](facebook/react#26779)) * fix[dynamic-scripts-injection]: unregister content scripts before registration ([hoxyq](https://github.com/hoxyq) in [facebook#26765](facebook/react#26765)) DiffTrain build for commit facebook/react@783e7fc. Changelog: [Internal] << DO NOT EDIT BELOW THIS LINE >> Reviewed By: sammy-SC Differential Revision: D45575104 Pulled By: tyao1 fbshipit-source-id: c065eb8f1f200170f611b5becc0332109f22ef71
acdlite
added a commit
to acdlite/next.js
that referenced
this pull request
May 7, 2023
Fixes a bug where `useFormStatus` crashed during SSR. Includes the following upstream changes: - [16d053d59](https://github.com/facebook/react/commits/16d053d59) Add useFormStatus to server rendering stub ([vercel#26788](facebook/react#26788)) (Andrew Clark) - [efb381bbf](https://github.com/facebook/react/commits/efb381bbf) [Release Script] Print a hint where to get the token ([vercel#26783](facebook/react#26783)) (dan) - [b00e27342](https://github.com/facebook/react/commits/b00e27342) Use native scheduler if defined in global scope ([vercel#26554](facebook/react#26554)) (Samuel Susla) - [783e7fcfa](https://github.com/facebook/react/commits/783e7fcfa) React DevTools 4.27.6 -> 4.27.7 ([vercel#26780](facebook/react#26780)) (Ruslan Lesiutin) - [377c5175f](https://github.com/facebook/react/commits/377c5175f) DevTools: fix backend activation ([vercel#26779](facebook/react#26779)) (Ruslan Lesiutin)
acdlite
added a commit
to acdlite/next.js
that referenced
this pull request
May 7, 2023
Fixes a bug where `useFormStatus` crashed during SSR. Includes the following upstream changes: - [16d053d59](https://github.com/facebook/react/commits/16d053d59) Add useFormStatus to server rendering stub ([vercel#26788](facebook/react#26788)) (Andrew Clark) - [efb381bbf](https://github.com/facebook/react/commits/efb381bbf) [Release Script] Print a hint where to get the token ([vercel#26783](facebook/react#26783)) (dan) - [b00e27342](https://github.com/facebook/react/commits/b00e27342) Use native scheduler if defined in global scope ([vercel#26554](facebook/react#26554)) (Samuel Susla) - [783e7fcfa](https://github.com/facebook/react/commits/783e7fcfa) React DevTools 4.27.6 -> 4.27.7 ([vercel#26780](facebook/react#26780)) (Ruslan Lesiutin) - [377c5175f](https://github.com/facebook/react/commits/377c5175f) DevTools: fix backend activation ([vercel#26779](facebook/react#26779)) (Ruslan Lesiutin)
kodiakhq bot
pushed a commit
to vercel/next.js
that referenced
this pull request
May 7, 2023
Fixes a bug where `useFormStatus` crashed during SSR. Includes the following upstream changes: - [16d053d59](https://github.com/facebook/react/commits/16d053d59) Add useFormStatus to server rendering stub ([#26788](facebook/react#26788)) (Andrew Clark) - [efb381bbf](https://github.com/facebook/react/commits/efb381bbf) [Release Script] Print a hint where to get the token ([#26783](facebook/react#26783)) (dan) - [b00e27342](https://github.com/facebook/react/commits/b00e27342) Use native scheduler if defined in global scope ([#26554](facebook/react#26554)) (Samuel Susla) - [783e7fcfa](https://github.com/facebook/react/commits/783e7fcfa) React DevTools 4.27.6 -> 4.27.7 ([#26780](facebook/react#26780)) (Ruslan Lesiutin) - [377c5175f](https://github.com/facebook/react/commits/377c5175f) DevTools: fix backend activation ([#26779](facebook/react#26779)) (Ruslan Lesiutin)
hoxyq
added a commit
that referenced
this pull request
May 12, 2023
…erers (#26807) ## Summary Initially reported in #26797. Was not able to reproduce the exact same problem, but found this case: 1. Open corresponding codepen from the issue in debug mode 2. Open components tab of the extension 3. Refresh the page Received multiple errors: - Warning in the Console tab: Invalid renderer id "2". - Error in the Components tab: Uncaught Error: Cannot add node "3" because a node with that id is already in the Store. This problem has occurred after landing a fix in #26779. Looks like Chrome is keeping the injected scripts (the backend in this case) and we start backend twice.
facebook-github-bot
pushed a commit
to facebook/react-native
that referenced
this pull request
May 16, 2023
…erers (#26807) Summary: ## Summary Initially reported in facebook/react#26797. Was not able to reproduce the exact same problem, but found this case: 1. Open corresponding codepen from the issue in debug mode 2. Open components tab of the extension 3. Refresh the page Received multiple errors: - Warning in the Console tab: Invalid renderer id "2". - Error in the Components tab: Uncaught Error: Cannot add node "3" because a node with that id is already in the Store. This problem has occurred after landing a fix in facebook/react#26779. Looks like Chrome is keeping the injected scripts (the backend in this case) and we start backend twice. DiffTrain build for commit facebook/react@67a05d0. Reviewed By: javache Differential Revision: D45815160 Pulled By: hoxyq fbshipit-source-id: 99f3c45009b07a0fb89f0674ccfb24f170cdb29d
EdisonVan
pushed a commit
to EdisonVan/react
that referenced
this pull request
Apr 15, 2024
## Summary We have a case: 1. Open components tab 2. Close Chrome / Firefox devtools window completely 3. Reopen browser devtools panel 4. Open components tab Currently, in version 4.27.6, we cannot load the components tree. This PR contains two changes: - non-functional refactoring in `react-devtools-shared/src/devtools/store.js`: removed some redundant type castings. - fixed backend manager logic (introduced in facebook#26615) to activate already registered backends. Looks like frontend of devtools also depends on `renderer-attached` event, without it component tree won't load. ## How did you test this change? This fixes the case mentioned prior. Currently in 4.27.6 version it is not working, we need to refresh the page to make it work. I've tested this in several environments: chrome, firefox, standalone with RN application.
EdisonVan
pushed a commit
to EdisonVan/react
that referenced
this pull request
Apr 15, 2024
List of changes: * DevTools: fix backend activation ([hoxyq](https://github.com/hoxyq) in [facebook#26779](facebook#26779)) * fix[dynamic-scripts-injection]: unregister content scripts before registration ([hoxyq](https://github.com/hoxyq) in [facebook#26765](facebook#26765))
EdisonVan
pushed a commit
to EdisonVan/react
that referenced
this pull request
Apr 15, 2024
…erers (facebook#26807) ## Summary Initially reported in facebook#26797. Was not able to reproduce the exact same problem, but found this case: 1. Open corresponding codepen from the issue in debug mode 2. Open components tab of the extension 3. Refresh the page Received multiple errors: - Warning in the Console tab: Invalid renderer id "2". - Error in the Components tab: Uncaught Error: Cannot add node "3" because a node with that id is already in the Store. This problem has occurred after landing a fix in facebook#26779. Looks like Chrome is keeping the injected scripts (the backend in this case) and we start backend twice.
bigfootjon
pushed a commit
that referenced
this pull request
Apr 18, 2024
## Summary We have a case: 1. Open components tab 2. Close Chrome / Firefox devtools window completely 3. Reopen browser devtools panel 4. Open components tab Currently, in version 4.27.6, we cannot load the components tree. This PR contains two changes: - non-functional refactoring in `react-devtools-shared/src/devtools/store.js`: removed some redundant type castings. - fixed backend manager logic (introduced in #26615) to activate already registered backends. Looks like frontend of devtools also depends on `renderer-attached` event, without it component tree won't load. ## How did you test this change? This fixes the case mentioned prior. Currently in 4.27.6 version it is not working, we need to refresh the page to make it work. I've tested this in several environments: chrome, firefox, standalone with RN application. DiffTrain build for commit 377c517.
Akshato07
pushed a commit
to Akshato07/-Luffy
that referenced
this pull request
Feb 20, 2025
List of changes: * DevTools: fix backend activation ([hoxyq](https://github.com/hoxyq) in [#26779](facebook/react#26779)) * fix[dynamic-scripts-injection]: unregister content scripts before registration ([hoxyq](https://github.com/hoxyq) in [#26765](facebook/react#26765)) DiffTrain build for commit facebook/react@783e7fc.
Akshato07
pushed a commit
to Akshato07/-Luffy
that referenced
this pull request
Feb 20, 2025
…erers (#26807) ## Summary Initially reported in facebook/react#26797. Was not able to reproduce the exact same problem, but found this case: 1. Open corresponding codepen from the issue in debug mode 2. Open components tab of the extension 3. Refresh the page Received multiple errors: - Warning in the Console tab: Invalid renderer id "2". - Error in the Components tab: Uncaught Error: Cannot add node "3" because a node with that id is already in the Store. This problem has occurred after landing a fix in facebook/react#26779. Looks like Chrome is keeping the injected scripts (the backend in this case) and we start backend twice. DiffTrain build for commit facebook/react@67a05d0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
We have a case:
Currently, in version 4.27.6, we cannot load the components tree.
This PR contains two changes:
react-devtools-shared/src/devtools/store.js: removed some redundant type castings.renderer-attachedevent, without it component tree won't load.How did you test this change?
This fixes the case mentioned prior. Currently in 4.27.6 version it is not working, we need to refresh the page to make it work.
I've tested this in several environments: chrome, firefox, standalone with RN application.