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

fix: Flipper DevTools error on PUSH, POP & GO_BACK actions (fix: issue #9975) #10006

Merged

Conversation

react-one
Copy link
Contributor

Fix: issue #9975

The problem as stated in the issue was hermes stack format being different and thus bad parsing.

To fix that we adapted the react native stack parsing files from:

https://github.com/facebook/react-native/blob/main/Libraries/Core/Devtools/parseErrorStack.js

https://github.com/facebook/react-native/blob/main/Libraries/Core/Devtools/parseHermesStack.js

Converted them to typescript and as pointed by this comment #9975 (comment)

Getting the frames became:

const frames = parseErrorStack(stack)
   .slice(2)
   .filter((frame) => frame.file !== '[native code]');

Now all works well:

(In the illustration bellow hermes was in use)

image

@netlify
Copy link

netlify bot commented Oct 3, 2021

✔️ Deploy Preview for react-navigation-example ready!

🔨 Explore the source changes: 4338700

🔍 Inspect the deploy log: https://app.netlify.com/sites/react-navigation-example/deploys/615ac9051d26670008746f74

😎 Browse the preview: https://deploy-preview-10006--react-navigation-example.netlify.app

@react-one
Copy link
Contributor Author

@satya164 Why the circleci integration tests keep failing randomly. with a server timeout error.

I experienced that before where pushing again had the check pass just ok.

image

Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. The PR looks good. Can you change the file extensions to .tsx? As a convention, we use .tsx for all the TypeScript files in this repo.

@satya164
Copy link
Member

satya164 commented Oct 4, 2021

Not sure about what's going on with tests but I wouldn't worry about it for now since it's unrelated to the PR.

@@ -0,0 +1,52 @@
import * as stacktraceParser from 'stacktrace-parser';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this code is vendored from React Native repository, please also include the copyright header.

@@ -0,0 +1,110 @@
interface HermesStackLocationNative {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also needs the copyright header from original file

@react-one react-one force-pushed the flipper-nav-plugin-hermes-stack branch from 997341c to 4338700 Compare October 4, 2021 09:27
Copy link
Member

@satya164 satya164 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@satya164 satya164 merged commit 83296ff into react-navigation:main Oct 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants