-
-
Notifications
You must be signed in to change notification settings - Fork 338
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into kw-fix-normalize-context-before-native
- Loading branch information
Showing
16 changed files
with
255 additions
and
86 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
name: "🐞 Bug Report" | ||
description: "Tell us about something that's not working the way we (probably) intend." | ||
labels: ["Platform: React-Native", "Type: 🪲 Bug"] | ||
body: | ||
- type: dropdown | ||
id: environment | ||
validations: | ||
required: true | ||
attributes: | ||
label: "What React Native libraries do you use?" | ||
description: "Select all options that describe your application." | ||
multiple: true | ||
options: | ||
- "React Native without Frameworks" | ||
- "React Navigation" | ||
- "Hermes" | ||
- "RN New Architecture" | ||
- "Expo Application Services (EAS)" | ||
- "Expo (mobile only)" | ||
- "Expo Web" | ||
- "Expo Router" | ||
- "React Native Web" | ||
- "React Native Navigation by Wix" | ||
|
||
- type: dropdown | ||
id: sentry | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Are you using sentry.io or on-premise?" | ||
description: "Select exactly one option." | ||
options: | ||
- "sentry.io (SaS)" | ||
- "on-premise (Self-Hosted)" | ||
|
||
- type: input | ||
id: version | ||
validations: | ||
required: true | ||
attributes: | ||
label: "@sentry/react-native SDK Version" | ||
description: "If the issue started after the SDK upgrade, please input both old and new versions." | ||
placeholder: "5.33.1 ← should look like this" | ||
|
||
- type: textarea | ||
id: doctor | ||
validations: | ||
required: true | ||
attributes: | ||
label: "How does your development environment look like?" | ||
description: "Output of the command `npx react-native@latest info` or manully describe your development environment?" | ||
placeholder: |- | ||
info Fetching system and libraries information... | ||
OS: OS version | ||
Node: Your version | ||
Yarn: Yarn version | ||
Expo SDK: Expo SDK version | ||
react: React version | ||
react-native: React Native version | ||
hermesEnabled: bool | ||
newArchEnabled: bool | ||
- type: textarea | ||
id: init | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Sentry.init()" | ||
description: "Code snipped of Sentry initialization from your application." | ||
placeholder: |- | ||
Sentry.init({ | ||
dsn: 'https://[email protected]/...' | ||
// other options | ||
}); | ||
- type: textarea | ||
id: repro | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Steps to Reproduce" | ||
description: "How can we see what you're seeing? Specific is terrific." | ||
placeholder: |- | ||
1. Build Android using `npx react-native run-android --mode Debug` | ||
2. Start Metro Dev server using `npx react-native start` | ||
3. Click on button executing `Sentry.capture(new Error("This is not captured :("))` | ||
- type: textarea | ||
id: expected | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Expected Result" | ||
|
||
- type: textarea | ||
id: actual | ||
validations: | ||
required: true | ||
attributes: | ||
label: "Actual Result" | ||
description: "JS Console? iOS Console? Logcat? Screenshots? Yes, please." | ||
|
||
- type: markdown | ||
attributes: | ||
value: |- | ||
## Thank you 🙏 | ||
Check our [triage docs](https://open.sentry.io/triage/) for what to expect next. |
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
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
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
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
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
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
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
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
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
71 changes: 71 additions & 0 deletions
71
samples/react-native/src/Screens/HeavyNavigationScreen.tsx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import * as React from 'react'; | ||
import { Button, View, StyleSheet, Text, ScrollView } from 'react-native'; | ||
|
||
import * as Sentry from '@sentry/react-native'; | ||
import { StackNavigationProp } from '@react-navigation/stack'; | ||
|
||
interface Props { | ||
navigation: StackNavigationProp<any, 'HeavyNatigavionScreen'>; | ||
route?: { | ||
params?: { | ||
manualTrack: boolean; | ||
}; | ||
}; | ||
} | ||
const buttonTitles = Array.from( | ||
{ length: 500 }, | ||
(_, index) => `Sample button ${index + 1}`, | ||
); | ||
|
||
/** | ||
* this page takes around 300ms to initially display, we navigate to another page in 100ms. | ||
* The time to initial display will never be finished on this page. | ||
*/ | ||
const HeavyNavigationScreen = (props: Props) => { | ||
const content = ( | ||
<ScrollView style={styles.screen}> | ||
<View style={styles.titleContainer}> | ||
<Text style={styles.title}> | ||
Heavy page only intended for navigating to another page while the page | ||
is loading. | ||
</Text> | ||
</View> | ||
{buttonTitles.map((title, index) => ( | ||
<Button key={index} title={title} /> | ||
))} | ||
</ScrollView> | ||
); | ||
|
||
React.useEffect(() => { | ||
setTimeout(() => { | ||
props.navigation.goBack(); | ||
}, 1); | ||
}); | ||
return ( | ||
<> | ||
{props.route?.params?.manualTrack ? ( | ||
<Sentry.TimeToInitialDisplay record={true}> | ||
{content} | ||
</Sentry.TimeToInitialDisplay> | ||
) : ( | ||
content | ||
)} | ||
</> | ||
); | ||
}; | ||
|
||
export default Sentry.withProfiler(HeavyNavigationScreen); | ||
|
||
const styles = StyleSheet.create({ | ||
screen: { | ||
flex: 1, | ||
padding: 16, | ||
}, | ||
titleContainer: { | ||
paddingBottom: 12, | ||
}, | ||
title: { | ||
fontSize: 24, | ||
fontWeight: '700', | ||
}, | ||
}); |
Oops, something went wrong.