diff --git a/package-lock.json b/package-lock.json index 993cb2c3..c8f68e2a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24084,10 +24084,10 @@ }, "packages/browser": { "name": "@backtrace/browser", - "version": "0.6.2", + "version": "0.6.3", "license": "MIT", "dependencies": { - "@backtrace/sdk-core": "0.8.3 || 0.8.4-rc" + "@backtrace/sdk-core": "0.8.4" }, "devDependencies": { "@reduxjs/toolkit": "^1.9.5", @@ -24292,10 +24292,10 @@ }, "packages/node": { "name": "@backtrace/node", - "version": "0.8.3", + "version": "0.8.4", "license": "MIT", "dependencies": { - "@backtrace/sdk-core": "^0.8.3 || 0.8.4-rc", + "@backtrace/sdk-core": "^0.8.4", "form-data": "^4.0.0" }, "devDependencies": { @@ -24353,10 +24353,10 @@ }, "packages/react": { "name": "@backtrace/react", - "version": "0.5.1", + "version": "0.5.2", "license": "MIT", "dependencies": { - "@backtrace/browser": "0.6.2" + "@backtrace/browser": "0.6.3" }, "devDependencies": { "@rollup/plugin-commonjs": "^26.0.1", @@ -24380,10 +24380,10 @@ }, "packages/react-native": { "name": "@backtrace/react-native", - "version": "0.2.3-rc", + "version": "0.2.3", "license": "MIT", "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" @@ -25357,7 +25357,7 @@ }, "packages/sdk-core": { "name": "@backtrace/sdk-core", - "version": "0.8.4-rc", + "version": "0.8.4", "license": "MIT", "devDependencies": { "@rollup/plugin-typescript": "^11.1.6", @@ -25405,10 +25405,10 @@ }, "packages/session-replay": { "name": "@backtrace/session-replay", - "version": "0.2.1", + "version": "0.2.2", "license": "MIT", "dependencies": { - "@backtrace/sdk-core": "0.8.3 || 0.8.4-rc", + "@backtrace/sdk-core": "0.8.4", "rrweb": "^2.0.0-alpha.15" }, "devDependencies": { diff --git a/packages/browser/CHANGELOG.md b/packages/browser/CHANGELOG.md index 650e4687..a9393a6d 100644 --- a/packages/browser/CHANGELOG.md +++ b/packages/browser/CHANGELOG.md @@ -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) diff --git a/packages/browser/package.json b/packages/browser/package.json index a0e1b566..de350b7a 100644 --- a/packages/browser/package.json +++ b/packages/browser/package.json @@ -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", @@ -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", diff --git a/packages/node/CHANGELOG.md b/packages/node/CHANGELOG.md index 5f4d1263..89d4884b 100644 --- a/packages/node/CHANGELOG.md +++ b/packages/node/CHANGELOG.md @@ -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) diff --git a/packages/node/package.json b/packages/node/package.json index c924cb8b..dc2240b4 100644 --- a/packages/node/package.json +++ b/packages/node/package.json @@ -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", @@ -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" } } diff --git a/packages/react-native/CHANGELOG.md b/packages/react-native/CHANGELOG.md index b62d423c..c0abda49 100644 --- a/packages/react-native/CHANGELOG.md +++ b/packages/react-native/CHANGELOG.md @@ -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 diff --git a/packages/react-native/README.md b/packages/react-native/README.md index 99afaf85..7b4fe88b 100644 --- a/packages/react-native/README.md +++ b/packages/react-native/README.md @@ -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: @@ -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 @@ -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` | @@ -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 diff --git a/packages/react-native/package.json b/packages/react-native/package.json index 66671158..23f6c2df 100644 --- a/packages/react-native/package.json +++ b/packages/react-native/package.json @@ -1,6 +1,6 @@ { "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", @@ -8,7 +8,6 @@ "react-native": "src/index", "source": "src/index", "files": [ - "RELEASE_CANDIDATE.md", "src", "lib", "android", @@ -23,6 +22,7 @@ "!android/gradlew", "!android/gradlew.bat", "!android/local.properties", + "!android/src/test", "!**/__tests__", "!**/__fixtures__", "!**/__mocks__", @@ -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": { diff --git a/packages/react-native/src/common/agentVersion.ts b/packages/react-native/src/common/agentVersion.ts index 7f5632a2..b259b511 100644 --- a/packages/react-native/src/common/agentVersion.ts +++ b/packages/react-native/src/common/agentVersion.ts @@ -1,2 +1,2 @@ // Generated from package.json; do not edit. -export const agentVersion = '0.2.3-rc'; +export const agentVersion = '0.2.3'; diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 59b6952d..08e65603 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -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` diff --git a/packages/react/package.json b/packages/react/package.json index 9ebe23eb..1fea4b01 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -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", @@ -40,7 +40,7 @@ "/lib" ], "dependencies": { - "@backtrace/browser": "0.6.2" + "@backtrace/browser": "0.6.3" }, "devDependencies": { "@rollup/plugin-commonjs": "^26.0.1", diff --git a/packages/sdk-core/CHANGELOG.md b/packages/sdk-core/CHANGELOG.md index 9673926b..70861cab 100644 --- a/packages/sdk-core/CHANGELOG.md +++ b/packages/sdk-core/CHANGELOG.md @@ -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: ` -- 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 diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index dedbb831..19a72c07 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -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", @@ -47,7 +47,6 @@ "typescript": "^5.0.4" }, "publishConfig": { - "access": "public", - "tag": "rc" + "access": "public" } } diff --git a/packages/session-replay/CHANGELOG.md b/packages/session-replay/CHANGELOG.md index f7f14a1f..1ae445a4 100644 --- a/packages/session-replay/CHANGELOG.md +++ b/packages/session-replay/CHANGELOG.md @@ -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` diff --git a/packages/session-replay/package.json b/packages/session-replay/package.json index 835f97f1..c9484f5b 100644 --- a/packages/session-replay/package.json +++ b/packages/session-replay/package.json @@ -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", @@ -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",