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

Handle source file / source map fetch errors correctly, add tests #41342

Closed
wants to merge 9 commits into from

Conversation

motiz88
Copy link
Contributor

@motiz88 motiz88 commented Nov 6, 2023

Summary:
While rewriting Debugger.getScriptSource messages to fetch code and source map over HTTP, we weren't checking the status code of the fetch calls. This diff fixes that and adds corresponding tests (as well as for the filesystem error case).

Changelog: [Internal]

Differential Revision: D51013054

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Nov 6, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51013054

Copy link

github-actions bot commented Nov 6, 2023

Warnings
⚠️

packages/dev-middleware/src/inspector-proxy/Device.js#L12 - packages/dev-middleware/src/inspector-proxy/Device.js line 12 – Requires should be sorted alphabetically (lint/sort-imports)

Generated by 🚫 dangerJS against 099679d

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51013054

motiz88 added a commit to motiz88/react-native that referenced this pull request Nov 6, 2023
…cebook#41342)

Summary:
Pull Request resolved: facebook#41342

While rewriting `Debugger.getScriptSource` messages to fetch code and source map over HTTP, we weren't checking the status code of the fetch calls. This diff fixes that and adds corresponding tests (as well as for the filesystem error case).

Changelog: [Internal]

Differential Revision: D51013054

fbshipit-source-id: 4b593c0b13d1fb8db9b8a6ed1b123d93349ff5b5
@analysis-bot
Copy link

analysis-bot commented Nov 6, 2023

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 17,641,857 +10
android hermes armeabi-v7a n/a --
android hermes x86 n/a --
android hermes x86_64 n/a --
android jsc arm64-v8a 21,021,612 +3
android jsc armeabi-v7a n/a --
android jsc x86 n/a --
android jsc x86_64 n/a --

Base commit: 47f773e
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51013054

motiz88 added a commit to motiz88/react-native that referenced this pull request Nov 8, 2023
…cebook#41342)

Summary:
Pull Request resolved: facebook#41342

While rewriting `Debugger.getScriptSource` messages to fetch code and source map over HTTP, we weren't checking the status code of the fetch calls. This diff fixes that and adds corresponding tests (as well as for the filesystem error case).

Changelog: [Internal]

Differential Revision: D51013054

fbshipit-source-id: 7b3bfb0ae5d48b2a167ba5852cb093a3035dac73
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51013054

motiz88 added a commit to motiz88/react-native that referenced this pull request Nov 8, 2023
…cebook#41342)

Summary:
Pull Request resolved: facebook#41342

While rewriting `Debugger.getScriptSource` messages to fetch code and source map over HTTP, we weren't checking the status code of the fetch calls. This diff fixes that and adds corresponding tests (as well as for the filesystem error case).

Changelog: [Internal]

Differential Revision: D51013054

fbshipit-source-id: 30a3ec64f35409c715049d82e0eff25560ac3be9
motiz88 and others added 9 commits November 8, 2023 06:01
Differential Revision: D50980467

fbshipit-source-id: 24c9619559cc7fe0173fd59e7b008109aed5e2b4
Differential Revision: D51002263

fbshipit-source-id: aaefde6ab2539eb63966457520b0e668302dfd57
Differential Revision: D51002261

fbshipit-source-id: b4ac12a9567560d07e87f0a0dde2d865cc9a6e68
Differential Revision: D51002262

fbshipit-source-id: e9c05b00e6d30285fa99b33bab4fb15103998456
Differential Revision: D51006835

fbshipit-source-id: 0118c93bb229ab158aecf3ef0c7d3f19f4396e8d
Differential Revision: D51013055

fbshipit-source-id: bde65eb216329b334d058757da2e6a82018f5505
Differential Revision: D51013052

fbshipit-source-id: 6138dffcd66557d26cdeef435986b57c801f442e
Differential Revision: D51013053

fbshipit-source-id: 96e4dc32338831ebfbefd72ae372164df3356623
…cebook#41342)

Summary:
Pull Request resolved: facebook#41342

While rewriting `Debugger.getScriptSource` messages to fetch code and source map over HTTP, we weren't checking the status code of the fetch calls. This diff fixes that and adds corresponding tests (as well as for the filesystem error case).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51013054

fbshipit-source-id: 33959b3de7a17e64de864bc03801e61f27cfc18b
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D51013054

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Nov 8, 2023
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 1bcd286.

Othinn pushed a commit to Othinn/react-native that referenced this pull request Jan 9, 2024
…cebook#41342)

Summary:
Pull Request resolved: facebook#41342

While rewriting `Debugger.getScriptSource` messages to fetch code and source map over HTTP, we weren't checking the status code of the fetch calls. This diff fixes that and adds corresponding tests (as well as for the filesystem error case).

Changelog: [Internal]

Reviewed By: robhogan

Differential Revision: D51013054

fbshipit-source-id: 58e7bb9fcd6a3cf92329b43fb8a139093c80d305
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants