Skip to content

stacktrace-parser: move require further up in the file#30345

Closed
pvinis wants to merge 1 commit intofacebook:mainfrom
pvinis:patch-3
Closed

stacktrace-parser: move require further up in the file#30345
pvinis wants to merge 1 commit intofacebook:mainfrom
pvinis:patch-3

Conversation

@pvinis
Copy link
Contributor

@pvinis pvinis commented Nov 9, 2020

Summary

When running jest tests on 0.63.3, for some reason we kept getting the following error on CircleCI:

#!/bin/bash -eo pipefail
ls test-results.json || yarn jest --outputFile test-results.json --json --ci --forceExit --runInBand

ls: cannot access 'test-results.json': No such file or directory
yarn run v1.22.4
$ /home/circleci/project/node_modules/.bin/jest --outputFile test-results.json --json --ci --forceExit --runInBand
 PASS  src/lib/utils/ArtworkFilter/__tests__/ArtworkFiltersStore-tests.tsx
 PASS  src/lib/Components/Bidding/Screens/__tests__/ConfirmBid-tests.tsx (20.415s)
 PASS  src/lib/navigation/__tests__/routes-tests.tsx
 PASS  src/lib/Components/Bidding/Screens/__tests__/Registration-tests.tsx
/home/circleci/project/node_modules/react-native/Libraries/Core/Devtools/parseErrorStack.js:55
  var stack = Array.isArray(e.stack) ? e.stack : global.HermesInternal ? convertHermesStack(parseHermesStack(e.stack)) : stacktraceParser.parse(e.stack).map(function (frame) {
                                                                                                                                          ^

TypeError: stacktraceParser.parse is not a function
    at parse (/home/circleci/project/node_modules/react-native/Libraries/Core/Devtools/parseErrorStack.js:60:24)
    at parseErrorStack (/home/circleci/project/node_modules/react-native/Libraries/Core/ExceptionsManager.js:63:19)
    at Object.reportException (/home/circleci/project/node_modules/react-native/Libraries/Core/ExceptionsManager.js:171:5)
    at handleException (/home/circleci/project/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:108:21)
    at Immediate.reportLogBoxError (/home/circleci/project/node_modules/react-native/Libraries/LogBox/Data/LogBoxData.js:217:7)
    at processImmediate (internal/timers.js:456:21)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Exited with code exit status 1

This TypeError: stacktraceParser.parse is not a function kept appearing at random tests.

After we moved the require higher up in the file, it never appeared again.

Changelog

[Internal] [Fixed] - stacktrack-parser import fix

Test Plan

@facebook-github-bot 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 Nov 9, 2020
@pvinis pvinis changed the title move require further up stacktrace-parser: move require further up in the file Nov 9, 2020
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: b6362c2

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,524,913 -20
android hermes armeabi-v7a 7,109,842 -27
android hermes x86 7,964,995 -16
android hermes x86_64 7,876,320 -16
android jsc arm64-v8a 8,989,553 +0
android jsc armeabi-v7a 8,557,603 +0
android jsc x86 8,991,132 +0
android jsc x86_64 9,542,715 +0

Base commit: b6362c2

@github-actions
Copy link

github-actions bot commented Sep 8, 2023

This PR is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the Stale There has been a lack of activity on this issue and it may be closed soon. label Sep 8, 2023
@github-actions
Copy link

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Stale There has been a lack of activity on this issue and it may be closed soon.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants