Skip to content

Commit

Permalink
Merge branch 'main' into kw-fix-normalize-context-before-native
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich authored Oct 15, 2024
2 parents 718ad07 + d7800c3 commit d217886
Show file tree
Hide file tree
Showing 16 changed files with 255 additions and 86 deletions.
71 changes: 0 additions & 71 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.md

This file was deleted.

108 changes: 108 additions & 0 deletions .github/ISSUE_TEMPLATE/BUG_REPORT.yml
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://...@sentry.io/...'
// 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.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

### Fixes

- TimetoTisplay correctly warns about not supporting the new React Native architecture ([#4160](https://github.com/getsentry/sentry-react-native/pull/4160))

## 5.34.0

### Fixes

- Handles error with string cause ([#4163](https://github.com/getsentry/sentry-react-native/pull/4163))
- Use `appLaunchedInForeground` to determine invalid app start data on Android ([#4146](https://github.com/getsentry/sentry-react-native/pull/4146))
- Upload source maps for all release variants on Android (not only the last found) ([#4125](https://github.com/getsentry/sentry-react-native/pull/4125))
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sentry/react-native",
"homepage": "https://github.com/getsentry/sentry-react-native",
"repository": "https://github.com/getsentry/sentry-react-native",
"version": "5.33.2",
"version": "5.34.0",
"description": "Official Sentry SDK for react-native",
"typings": "dist/js/index.d.ts",
"types": "dist/js/index.d.ts",
Expand Down
6 changes: 3 additions & 3 deletions samples/expo/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"slug": "sentry-react-native-expo-sample",
"jsEngine": "hermes",
"scheme": "sentry-expo-sample",
"version": "5.33.2",
"version": "5.34.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
Expand All @@ -19,15 +19,15 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "io.sentry.expo.sample",
"buildNumber": "24"
"buildNumber": "25"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "io.sentry.expo.sample",
"versionCode": 24
"versionCode": 25
},
"web": {
"bundler": "metro",
Expand Down
2 changes: 1 addition & 1 deletion samples/expo/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentry-react-native-expo-sample",
"version": "5.33.2",
"version": "5.34.0",
"main": "expo-router/entry",
"scripts": {
"start": "expo start",
Expand Down
4 changes: 2 additions & 2 deletions samples/react-native/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ android {
applicationId "io.sentry.reactnative.sample"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 27
versionName "5.33.2"
versionCode 28
versionName "5.34.0"
}

signingConfigs {
Expand Down
4 changes: 2 additions & 2 deletions samples/react-native/ios/sentryreactnativesample/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>5.33.2</string>
<string>5.34.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>31</string>
<string>32</string>
<key>LSRequiresIPhoneOS</key>
<true />
<key>NSAppTransportSecurity</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>5.33.2</string>
<string>5.34.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>31</string>
<string>32</string>
</dict>
</plist>
2 changes: 1 addition & 1 deletion samples/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentry-react-native-sample",
"version": "5.33.2",
"version": "5.34.0",
"private": true,
"scripts": {
"postinstall": "patch-package",
Expand Down
5 changes: 5 additions & 0 deletions samples/react-native/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import { HttpClient } from '@sentry/integrations';
import Ionicons from 'react-native-vector-icons/Ionicons';
import PlaygroundScreen from './Screens/PlaygroundScreen';
import { logWithoutTracing } from './utils';
import HeavyNavigationScreen from './Screens/HeavyNavigationScreen';

LogBox.ignoreAllLogs();

Expand Down Expand Up @@ -168,6 +169,10 @@ const TabTwoStack = Sentry.withProfiler(
name="ManualTracker"
component={ManualTrackerScreen}
/>
<Stack.Screen
name="HeavyNavigation"
component={HeavyNavigationScreen}
/>
<Stack.Screen
name="PerformanceTiming"
component={PerformanceTimingScreen}
Expand Down
71 changes: 71 additions & 0 deletions samples/react-native/src/Screens/HeavyNavigationScreen.tsx
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',
},
});
Loading

0 comments on commit d217886

Please sign in to comment.