Fix new debugger detection after #864 #904
Merged
+6
−1
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.
In #864 where we tried to address the debugger listing changes in RN 77 we accidently broke debugger connection on older versions of React Native (in particular expo-router example app).
The reason is that we wrongly assumed that the existence of
reactNative
field in the debugger listing is exclusive to the new debugger entries while it still appears with old version of the debugger and on older versions of React Native. As a consequence, older apps (and expo-router in particular) may select a wrong runtime to connect to (which in case of expo-router was the reanimated runtime).In this PR we partially revert changes from #864 responsible for filtering new debugger entries from debug endpoints list. Instead, for RN 77 specifically we rely on a suffix "[C++ connection]" that has been added to description field: https://github.com/facebook/react-native/blob/main/packages/react-native/ReactCommon/jsinspector-modern/InspectorPackagerConnection.cpp#L167
We likely want to revisit this solution going forward, but for now this PR will unblock the release.
How Has This Been Tested: