TypeError: global.nativeTraceBeginSection is not a function (Systrace)
See original GitHub issueIs this a bug report?
Yes
Have you read the Bugs section of the Contributing to React Native Guide?
Yes
Environment
react-native -v
: react-native-cli: 2.0.1, react-native: 0.46.1node -v
: v7.10.0npm -v
: 4.6.1yarn --version
(if you use Yarn): Not used in this bug
Then, specify:
-
Target Platform: iOS
-
Development Operating System: macOS Sierra v 10.12
-
Build tools: Xcode Version 8.3.3 (8E3004b)
I’m running react-native run-ios
deploying to iOS emulator Version 10.0 (SimulatorApp-745.10), running iOS 10.3 in an iphone 6.
Steps to Reproduce
(Write your steps here:)
- Run
react-native run-ios
with Systrace enabled
-
Reload your app (manually or with live/hot reload)
-
Check the logs
Expected Behavior
The app should reload normally.
Actual Behavior
The error TypeError:global.nativeTraceBeginSection
gets launched into the console:
And in the UI:
After that, the whole emulator crashes and the only way to restore it is running react-native run-ios
again.
One temporary workaround to get rid of this error is disabling Systrace
in the DevMenu, but this is less than ideal.
Reproducible Demo
https://snack.expo.io/ryCtYZHrZ
Observation: Even though I included a snack, I’m afraid you can’t fully reproduce this problem without a Mac and an iOS emulator, the reason being that the Systrace
is not an Expo function.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:46
- Comments:70 (36 by maintainers)
Top GitHub Comments
Following steps help me:
Cmd+D
(orshake the device
)to show the Dev menu.Stop Systrace
option.I’ve brought it up internally, and there’s a person who planned to look into fixing this either in December on January. If it’s not fixed by the end of January please ping me in person (e.g. on Twitter DM) and I’ll try to see what’s the status on this.