fix(dev-middleware): respond with status code 200 when launching RNDT#46814
Closed
byCedric wants to merge 5 commits into
Closed
fix(dev-middleware): respond with status code 200 when launching RNDT#46814byCedric wants to merge 5 commits into
200 when launching RNDT#46814byCedric wants to merge 5 commits into
Conversation
200 when launching RNDT
Contributor
|
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
byCedric
commented
Oct 3, 2024
| */ | ||
| export async function fetchLocal( | ||
| url: string, | ||
| options?: Parameters<typeof fetch>[1] & {dispatcher?: mixed}, |
Contributor
Author
There was a problem hiding this comment.
I had to add options?: Partial<...>, without this it required me to add all request options as second parameter, while I just want to do:
const response = await fetchLocal('..', {method: 'POST'})
Contributor
|
@huntie has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Contributor
Collaborator
|
This pull request was successfully merged by @byCedric in eeb6122 When will my fix make it into a release? | How to file a pick request? |
blakef
pushed a commit
that referenced
this pull request
Oct 7, 2024
…DT (#46814) Summary: This fixes an issue where `POST /open-debugger?appId&device&target` does not return a proper status code, meaning that the request will never be answered and clients might hang until the request timeout is hit. ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [GENERAL] [FIXED] - Respond with status code `200` when successfully launching RNDT Pull Request resolved: #46814 Test Plan: - `curl -v -X POST "<deviceUrl>"` - This should show a proper response for the request. before | after --- | ---  |  Reviewed By: NickGerleman Differential Revision: D63837025 Pulled By: huntie fbshipit-source-id: ac72fc793e015f0eec498f4a35b4fb9e301c5b32
3 tasks
byCedric
added a commit
to expo/expo
that referenced
this pull request
Oct 29, 2024
…quests (#32451) # Why Fixes ENG-13977 Originally, there was an issue where the middleware responding to the "open React Native DevTools" requests never responded with a proper response. This would cause the terminal become unresponsive as it waited for the response, or the default timeout was hit. We've fixed this in facebook/react-native#46814 Unfortunately, that same middleware has another issue. The [`browserLauncher.launchDebuggerAppWindow`](https://github.com/facebook/react-native/blob/7090b790c6febed048203ea5f5a4f7116d1206cf/packages/dev-middleware/src/middleware/openDebuggerMiddleware.js#L133-L140) async method never completes. Meaning, we still have that endpoint not responding to the request properly. # How - Added a timeout of 1s to the open debugger request # Test Plan - `bun create expo ./test-rndt --template default@next` - `cd ./test-rndt` - `bun expo start --ios` - Press `j` in terminal once the app is started - Terminal should become responsive again after maximum of 1s Also added debug logging to check if users run into this timeout state. You can see this logging with: - `DEBUG="expo:start:server:middleware:inspector:jsInspector" bun expo start` # Checklist <!-- Please check the appropriate items below if they apply to your diff. This is required for changes to Expo modules. --> - [x] Documentation is up to date to reflect these changes (eg: https://docs.expo.dev and README.md). - [ ] Conforms with the [Documentation Writing Style Guide](https://github.com/expo/expo/blob/main/guides/Expo%20Documentation%20Writing%20Style%20Guide.md) - [ ] This diff will work correctly for `npx expo prebuild` & EAS Build (eg: updated a module plugin). --------- Co-authored-by: Expo Bot <34669131+expo-bot@users.noreply.github.com>
This was referenced Apr 1, 2025
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:
This fixes an issue where
POST /open-debugger?appId&device&targetdoes not return a proper status code, meaning that the request will never be answered and clients might hang until the request timeout is hit.Changelog:
[GENERAL] [FIXED] - Respond with status code
200when successfully launching RNDTTest Plan:
curl -v -X POST "<deviceUrl>"