Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/browser/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 0.6.3

- update `@backtrace/sdk-core` to `0.8.4`
- keep the same user id (`guid`) across sessions, a new session no longer counts as a new user

# Version 0.6.2

- Fix: label unhandled promise rejections as 'Unhandled rejection' (#370)
Expand Down
4 changes: 2 additions & 2 deletions packages/browser/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@backtrace/browser",
"version": "0.6.2",
"version": "0.6.3",
"description": "Backtrace-JavaScript web browser integration",
"main": "lib/bundle.cjs",
"module": "lib/bundle.mjs",
Expand Down Expand Up @@ -39,7 +39,7 @@
"/lib"
],
"dependencies": {
"@backtrace/sdk-core": "0.8.3 || 0.8.4-rc"
"@backtrace/sdk-core": "0.8.4"
},
"devDependencies": {
"@reduxjs/toolkit": "^1.9.5",
Expand Down
5 changes: 5 additions & 0 deletions packages/node/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Version 0.8.4

- update `@backtrace/sdk-core` to `0.8.4`
- crash reports from the previous run keep their breadcrumbs until they are sent

# Version 0.8.3

- Fix: label unhandled promise rejections as 'Unhandled rejection' (#370)
Expand Down
4 changes: 2 additions & 2 deletions packages/node/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@backtrace/node",
"version": "0.8.3",
"version": "0.8.4",
"description": "Backtrace-JavaScript Node.JS integration",
"main": "lib/bundle.cjs",
"module": "lib/bundle.mjs",
Expand Down Expand Up @@ -56,7 +56,7 @@
"typescript": "^5.0.4"
},
"dependencies": {
"@backtrace/sdk-core": "^0.8.3 || 0.8.4-rc",
"@backtrace/sdk-core": "^0.8.4",
"form-data": "^4.0.0"
}
}
64 changes: 38 additions & 26 deletions packages/react-native/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,54 @@
# Version 0.2.3-rc
# Version 0.2.3

Features

- Android: detect ANRs with the new `anr` option, from a main-thread watchdog (`BacktraceAnrType.Threshold`) or from the exit records Android keeps for earlier runs (`BacktraceAnrType.ApplicationExit`)
- Android: deobfuscate unhandled Java exception and ANR reports from R8 and ProGuard builds with the new `proguard` option
- report React render errors that no error boundary catches, with the JavaScript stack and the component stack
- Android: detect app hangs (ANRs) with the new `anr` option, as they happen or on the next launch
- Android: deobfuscate Java crash and ANR reports from minified (R8 or ProGuard) builds with the new `proguard` option
- Android: report fatal Java errors such as out-of-memory and stack overflow, not only exceptions

Improvements

- support React Native 0.81 and React 19, declare `react >=18.0.0` and `react-native >=0.72.0` peer dependencies
- SDK failures no longer crash the app, the failing feature turns off and logs a `Backtrace:` warning
- support React Native up to 0.87 and React 19, require React Native 0.72 or later and React 18 or later
- an internal SDK failure no longer crashes the app, the affected feature turns off and logs a warning
- `BacktraceClient.initialize` returns a disabled client instead of throwing on invalid options or a failed setup
- restore the previous global error handler on `dispose()`, make `dispose()` safe to call more than once
- Android: update `libbacktrace-native.so` to backtrace-android 3.14.0, add `x86_64` support for native crash capture, remove the unused `libnative-lib.so`
- iOS: `ios-sourcemap-upload.sh` skips Debug and `SKIP_BUNDLING` builds, warns instead of failing the Xcode build on missing inputs, can run outside Xcode
- iOS: support `use_frameworks! :linkage => :dynamic`
- `dispose()` restores the app's previous error handlers and is safe to call more than once
- native crash reports use the attributes and attachments of a new client created after `dispose()`, a new submission URL or database path applies only after the app restarts
- release builds give the report of a fatal JavaScript error up to 5 seconds to send before the app closes
- Android: update the native crash handler to backtrace-android 3.14.0, capture native crashes on x86_64, remove an unused native library
- Android: release builds upload source maps without an extra hook in `app/build.gradle`, an existing hook keeps working
- iOS: the source map upload step skips Debug builds and builds without a JavaScript bundle, and warns instead of failing the build on missing files or settings
- iOS: upload source maps from archive builds, existing apps need the updated Xcode build phase from the integration guide
- iOS: support apps built with dynamic frameworks (`use_frameworks!`)
- iOS: support Xcode 27 builds on React Native 0.76 and later, with a Podfile step from the README

Bugfixes

- forward attributes and file attachments added after `initialize()` to native crash reports
- attach breadcrumb files and `breadcrumbs.lastId` to native crash reports
- apply `maximumBreadcrumbs` to the breadcrumb files written with the offline database on
- a failure while reporting an unhandled error or rejection no longer surfaces as a new unhandled rejection
- report the package version in `agentVersion` and `backtrace.version` instead of `0.0.1`
- fix the SDK init crash on React Native 0.72
- fix `TypeError: Cannot read property 'prototype' of undefined` under Metro `experimentalImportSupport`
- Android: capture native crashes from release builds minified with R8 or ProGuard, ship the keep rules the crash handler needs
- Android: wait up to 5 seconds for the unhandled Java exception report to send before the process exits
- Android: fix autolinking builds under Expo and React Native 0.82+
- Android: fix the source map upload on Gradle 9, upload each release variant's own map, add the `backtraceUploadSourceMaps` property to turn uploads off
- iOS: skip the duplicate native crash report for fatal unhandled JavaScript errors
- native crash reports include attributes and attachments added or changed after the SDK starts
- native crash reports include breadcrumbs
- apply the `maximumBreadcrumbs` limit to breadcrumbs saved by the offline database
- reports saved offline or during a crash are sent on the next launch with their breadcrumbs
- a fatal JavaScript error produces one report instead of two
- a failure while reporting an unhandled error or rejection no longer shows up as a new unhandled promise rejection
- reports show the SDK version instead of `0.0.1`
- fix a crash at startup on React Native 0.72
- fix a startup `TypeError` when Metro's `experimentalImportSupport` is on
- Android: capture native crashes in minified (R8 or ProGuard) release builds without extra keep rules
- Android: capture native crashes in apps installed from Google Play app bundles
- Android: give the report of a Java crash up to 5 seconds to send before the app closes
- Android: after `dispose()`, Java crashes go to the previous crash handler again, a new client or a JavaScript reload turns reporting back on
- Android: fix failed uploads when a breadcrumb is added while a report is being sent
- Android: fix builds under Expo and on React Native 0.82 and later
- Android: fix the source map upload on Gradle 9, upload the right map for each build variant, add a `backtraceUploadSourceMaps` Gradle property to turn uploads off

Packaging

- update `@backtrace/sdk-core` to `0.8.4-rc`
- declare `promise` and `pretty-format` as dependencies, add `@backtrace/sourcemap-tools` and `metro` as optional peer dependencies
- ship the `scripts` folder with the Metro serializer and the iOS source map upload script
- fix the `repository` field and remove the self-dependency in `package.json`
- raise `web-streams-polyfill` to `^4.3.0`
- update `@backtrace/sdk-core` to `0.8.4`
- iOS: require PLCrashReporter 1.12.0, run `pod update PLCrashReporter` once when upgrading
- fix missing dependencies in the package, `@backtrace/sourcemap-tools` and `metro` are optional and used for source maps
- include the source map scripts (Metro serializer, iOS upload script) in the package
- fix the package metadata
- update `web-streams-polyfill` to 4.3.0

# Version 0.2.2

Expand Down
17 changes: 12 additions & 5 deletions packages/react-native/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ $ cd ios
$ pod install
```

When upgrading from an earlier version of the package, run this once instead of `pod install`:

```
$ cd ios
$ pod update PLCrashReporter
```

Xcode 27 requires a minimum deployment target of iOS 15.0. Add the following inside the existing `post_install` block
of `ios/Podfile`, then run `pod install` again:

Expand Down Expand Up @@ -103,12 +110,14 @@ const options = {
// Initialize the client with the options
const client = BacktraceClient.initialize(options);

// By default, Backtrace will send an error for Uncaught Exceptions and Unhandled Promise Rejections

// Manually send an error
client.send(new Error('Something broke!'));
```

Once initialized, the client automatically reports JavaScript errors that are not caught by the application and
promise rejections without a handler. A fatal error is reported before the app closes. Use `client.send()` for errors
your code catches.

### Upload Source Maps

Client-side error reports are based on minified code. Upload source maps and source code to resolve minified code to
Expand Down Expand Up @@ -420,7 +429,6 @@ const client = BacktraceClient.initialize({
| `autoSend` | Boolean | Sends stored reports at startup and then every `retryInterval`. With `false`, stored reports wait for `client.database?.send()` or `client.database?.flush()`. New reports are still sent when they are created. | `true` |
| `maximumNumberOfRecords` | Number | The maximum number of reports stored in the offline database. When the limit is reached, the oldest reports are removed. With `0`, stored reports from earlier sessions are deleted at startup. | `8` |
| `retryInterval` | Number | Time in ms between retries when sending stored reports fails. | `60000` |
| `maximumNumberOfAttachmentRecords` | Number | The maximum number of attachments stored in the offline database. When the limit is reached, the oldest attachments are removed. | `10` |
| `maximumRetries` | Number | Send attempts per session. An attempt stops at the first report that fails. Reports that still fail are retried on the next launch. | `3` |
| `maximumOldSessions` | Number | The number of previous sessions whose files, such as breadcrumbs, are kept on disk. | `1` |
| `captureNativeCrashes` | Boolean | Capture crashes in the native layer. Requires `enable: true`. Android sends the report at crash time. iOS sends it on the next launch. See [Native Crash Support](#native-crash-support). | `false` |
Expand Down Expand Up @@ -490,8 +498,7 @@ Pass these options to `BacktraceClient.initialize`. Only `url` is required.

### Manually Send an Error

There are several ways to send an error to Backtrace. For more details on the definition of `client.send()` see
methods below.
`client.send()` accepts a string, an `Error`, or a `BacktraceReport`:

```ts
// send as a string
Expand Down
9 changes: 4 additions & 5 deletions packages/react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
{
"name": "@backtrace/react-native",
"version": "0.2.3-rc",
"version": "0.2.3",
"description": "Backtrace-Javascript React-Native integration",
"main": "lib/commonjs/index",
"module": "lib/module/index",
"types": "lib/typescript/index.d.ts",
"react-native": "src/index",
"source": "src/index",
"files": [
"RELEASE_CANDIDATE.md",
"src",
"lib",
"android",
Expand All @@ -23,6 +22,7 @@
"!android/gradlew",
"!android/gradlew.bat",
"!android/local.properties",
"!android/src/test",
"!**/__tests__",
"!**/__fixtures__",
"!**/__mocks__",
Expand Down Expand Up @@ -101,14 +101,13 @@
"typescript": "^5.0.2"
},
"dependencies": {
"@backtrace/sdk-core": "0.8.4-rc",
"@backtrace/sdk-core": "0.8.4",
"pretty-format": "^29.7.0",
"promise": "^8.3.0",
"web-streams-polyfill": "^4.3.0"
},
"publishConfig": {
"access": "public",
"tag": "rc"
"access": "public"
},
"peerDependenciesMeta": {
"@backtrace/sourcemap-tools": {
Expand Down
2 changes: 1 addition & 1 deletion packages/react-native/src/common/agentVersion.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Generated from package.json; do not edit.
export const agentVersion = '0.2.3-rc';
export const agentVersion = '0.2.3';
4 changes: 4 additions & 0 deletions packages/react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 0.5.2

- update `@backtrace/browser` to `0.6.3`

# Version 0.5.1

- update `@backtrace/browser` to `0.6.2`
Expand Down
4 changes: 2 additions & 2 deletions packages/react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@backtrace/react",
"version": "0.5.1",
"version": "0.5.2",
"description": "Backtrace-Javascript React integration",
"main": "lib/bundle.cjs",
"module": "lib/bundle.mjs",
Expand Down Expand Up @@ -40,7 +40,7 @@
"/lib"
],
"dependencies": {
"@backtrace/browser": "0.6.2"
"@backtrace/browser": "0.6.3"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
Expand Down
20 changes: 10 additions & 10 deletions packages/sdk-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Version 0.8.4-rc

- build the bundle as ES5 with the `tslib` helpers inlined, fix loading on React Native 0.72
- add `BacktraceReport.symbolication` and the `symbolication` report option (`sourcemap` or `proguard`)
- `send()` never throws or rejects, an exception inside it makes the call resolve with status `Unknown` and message `SDK failure: <ErrorName>`
- skip attribute providers that throw and keep the remaining attributes
- `addBreadcrumb` returns `false` instead of throwing and drops breadcrumbs raised while another breadcrumb is recorded
- log failures to load stored reports and to send metrics instead of leaving unhandled promise rejections
- add the `warnFailure` and `failureType` exports
- `dispose()` clears the shared client instance only when the disposed client is the current one
# Version 0.8.4

- fix loading the package on React Native 0.72
- add a `symbolication` report option to pick source map or ProGuard symbolication
- `send()` no longer throws or rejects, an internal failure returns an `Unknown` result
- an attribute provider that throws no longer blocks the other attributes
- `addBreadcrumb` returns `false` instead of throwing
- failures to load saved reports or send metrics log a warning instead of an unhandled promise rejection
- `dispose()` on an older client no longer clears the current shared client
- reports saved in an earlier session are sent with their breadcrumbs on the next launch

# Version 0.8.3

Expand Down
5 changes: 2 additions & 3 deletions packages/sdk-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@backtrace/sdk-core",
"version": "0.8.4-rc",
"version": "0.8.4",
"description": "Backtrace-JavaScript SDK core library",
"main": "lib/bundle.cjs",
"module": "lib/bundle.mjs",
Expand Down Expand Up @@ -47,7 +47,6 @@
"typescript": "^5.0.4"
},
"publishConfig": {
"access": "public",
"tag": "rc"
"access": "public"
}
}
4 changes: 4 additions & 0 deletions packages/session-replay/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Version 0.2.2

- update `@backtrace/sdk-core` to `0.8.4`

# Version 0.2.1

- update `@backtrace/sdk-core` to `0.8.3`
Expand Down
4 changes: 2 additions & 2 deletions packages/session-replay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@backtrace/session-replay",
"version": "0.2.1",
"version": "0.2.2",
"description": "Backtrace-JavaScript Session Replay module",
"main": "lib/bundle.cjs",
"module": "lib/bundle.mjs",
Expand Down Expand Up @@ -31,7 +31,7 @@
"homepage": "https://github.com/backtrace-labs/backtrace-javascript#readme",
"dependencies": {
"rrweb": "^2.0.0-alpha.15",
"@backtrace/sdk-core": "0.8.3 || 0.8.4-rc"
"@backtrace/sdk-core": "0.8.4"
},
"devDependencies": {
"@rollup/plugin-commonjs": "^26.0.1",
Expand Down
Loading