-
Notifications
You must be signed in to change notification settings - Fork 24.3k
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
[Errors] Fix Red Box by fixing providesModule parsing #866
Closed
Conversation
This file contains 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
facebook-github-bot
added
the
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
label
Apr 15, 2015
Great catch. Will pull soon. |
An error occurred while trying to display the Red Box since loadSourceMap was not included in the JS bundle. This is because node-haste was treating its docblock as a multiline directive which doesn't make sense for `@providesModule`. In loadSourceMap.js's case, the directive's value was parsed as "loadSourceMap -- disabled flow due to mysterious validation errors --". There are two fixes: add a newline under the `@providesModule` directive, and change the module ID code to look at only the first token of the directive. I opted for the latter so we avoid this class of bugs entirely and AFAIK it's nonsensical to have multiple `@providesModule` values anyway. Test Plan: Run the packager, trigger an error in an app, see the red box now show up again.
ide
force-pushed
the
loadSourceMap-haste
branch
from
April 22, 2015 08:31
5e9a0d4
to
4af9f9e
Compare
sahrens
pushed a commit
to sahrens/react-native
that referenced
this pull request
Apr 22, 2015
Summary: cc @amasad An error occurred while trying to display the Red Box since loadSourceMap was not included in the JS bundle. This is because node-haste was treating its docblock as a multiline directive which doesn't make sense for `@providesModule`. In loadSourceMap.js's case, the directive's value was parsed as "loadSourceMap -- disabled flow due to mysterious validation errors --". There are two fixes: add a newline under the `@providesModule` directive, and change the module ID code to look at only the first token of the directive. I opted for the latter so we avoid this class of bugs entirely and AFAIK it's nonsensical to have multiple `@providesModule` values anyway. Closes facebook#866 Github Author: James Ide <ide@jameside.com> Test Plan: Run the packager, trigger an error in an app, see the red box now show up again.
cpojer
pushed a commit
to facebook/metro
that referenced
this pull request
Jan 26, 2017
Summary: cc @amasad An error occurred while trying to display the Red Box since loadSourceMap was not included in the JS bundle. This is because node-haste was treating its docblock as a multiline directive which doesn't make sense for `@providesModule`. In loadSourceMap.js's case, the directive's value was parsed as "loadSourceMap -- disabled flow due to mysterious validation errors --". There are two fixes: add a newline under the `@providesModule` directive, and change the module ID code to look at only the first token of the directive. I opted for the latter so we avoid this class of bugs entirely and AFAIK it's nonsensical to have multiple `@providesModule` values anyway. Closes facebook/react-native#866 Github Author: James Ide <ide@jameside.com> Test Plan: Run the packager, trigger an error in an app, see the red box now show up again.
ayushjainrksh
pushed a commit
to MLH-Fellowship/react-native
that referenced
this pull request
Jul 2, 2020
it should be surrounded in ``
mganandraj
added a commit
to mganandraj/react-native
that referenced
this pull request
Nov 5, 2021
…ore publish (facebook#866) * Some more changes for bringing up RN64 in devmain Android (facebook#861) * Build & Packaging changes for bringing up RN64 in devmain * Fixing gradle clean * Disable gradle clean in PR builds * Fix for submit button disappearing bug in comments (facebook#862) * Add the missing android folder to files in package.json * Fix for submit button disappear bug in comments Co-authored-by: Mayuresh Gharpure <Mayuresh.Gharpure@microsoft.com> * fix: ensure scripts always have Unix newlines (facebook#860) * Fix for publishing from stable branches * remove workspace info before publishing too * Update rntester lock file when bumping package version * Apply microsoft#875 * Allow newer cocoapod version Co-authored-by: Anandraj <anandrag@microsoft.com> Co-authored-by: Mayuresh Gharpure <gharpuremayuresh@gmail.com> Co-authored-by: Mayuresh Gharpure <Mayuresh.Gharpure@microsoft.com> Co-authored-by: Tommy Nguyen <4123478+tido64@users.noreply.github.com>
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.
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.
cc @amasad
An error occurred while trying to display the Red Box since loadSourceMap was not included in the JS
bundle. This is because node-haste was treating its docblock as a multiline directive which doesn't make sense for
@providesModule
.In loadSourceMap.js's case, the directive's value was parsed as "loadSourceMap -- disabled flow due to mysterious validation errors --".
There are two fixes: add a newline under the
@providesModule
directive, and change the module ID code to look at only the first token of the directive. I opted for the latter so we avoid this class of bugs entirely and AFAIK it's nonsensical to have multiple@providesModule
values anyway.Test Plan: Run the packager, trigger an error in an app, see the red box now show up again.