Repository navigation
First general availability release of the Sauce Mobile Beta React Native package, the crashless successor to react-native-testfairy (last legacy release 2.65.0). It bundles the native Sauce Mobile Beta SDKs 2.3.0 for iOS and Android; Backtrace (@backtrace/react-native) reports crashes, and the two run side by side in one app. The JavaScript API stays TestFairy.
Required: server endpoint. The native SDKs' built-in default server is no longer in service, for every package version. Call
TestFairy.setServerEndpoint('<server-endpoint>')with the Server Endpoint from your Mobile App Distribution dashboard (Organization Settings > SDK Settings, formhttps://<host>/services/) beforebeginWithoutCrashHandler(...). An app that skips this call starts no sessions.
Install
npm install @saucelabs/mobile-beta-react-native@3.1.0The same tarball is attached to this release for installs without the npm registry:
npm install https://github.com/testfairy/react-native-testfairy/releases/download/3.1.0/saucelabs-mobile-beta-react-native-3.1.0.tgzimport { BacktraceClient } from '@backtrace/react-native';
import TestFairy from '@saucelabs/mobile-beta-react-native';
BacktraceClient.initialize(backtraceConfiguration); // Backtrace first: sole crash owner
TestFairy.setServerEndpoint('<server-endpoint>');
TestFairy.beginWithoutCrashHandler('<sauce-mobile-beta-token>');- iOS deployment target 13.0. Android consumers get the native artifact from
https://maven.testfairy.com, which the package registers on every Gradle project. @backtrace/react-native0.2.3 or later is required for the SDK-managed attributes to reach native crash reports (0.2.2 never forwardsaddAttributeafterinitialize()); until 0.2.3 is published as stable, install thercdist-tag (^0.2.3-rc). It is declared as an optional peer dependency.- Never keep
react-native-testfairyinstalled next to this package.
Crashless by design
- Renamed to
@saucelabs/mobile-beta-react-native; native dependencies switched to the crashless Sauce Mobile Beta artifacts; the legacy vendored binaries, the bundledTestFairy.handReact-TestFairy.podspecare gone. begin()is crashless and delegates to the newbeginWithoutCrashHandler();enableCrashHandler()anddisableCrashHandler()are retained as native no-ops;isCrashReportingAvailable()returnsfalseby design.- New APIs:
beginWithoutCrashHandler,addSessionStateListener, promise-basedgetSessionUrl,getVersionandattachFile(with MIME type),getIntegrationInfo. - JavaScript rewritten with input validation, safe log serialization and restorable fetch instrumentation; Jest, TypeScript and ESLint coverage.
- Removed: crash reporting and crash uploads.
Backtrace coexistence, owned by the SDK
- The native SDK generates a new
sauce.correlation_idat every session start and the package writes it, withsauce.mobile_beta.session_started,sauce.mobile_beta.session_url,sauce.sdk.coexistence_mode,sauce.releaseandsauce.dist, toBacktraceClient.instance.addAttribute(map)at every session start and on every start response. Nothing to wire;setBacktraceClient(client | null)links a wrapped client explicitly. - Apps that followed the 3.0.0 release-candidate pattern (a UUID per launch, the session URL mirrored by the app) can delete that code and the
uuiddependency. getSessionCorrelationId(), theonSessionCorrelationIdChanged({ correlationId })callback andcorrelationIdin theonSessionStartedpayload.setAttributeon an SDK-managed key is ignored by the native SDK with one warning per key. The package warns once when@backtrace/react-nativeis installed but not initialized at the first session start, and once when it is older than 0.2.3.setServerEndpointrejects an empty value with aTypeError.
Fixes
- iOS bridge: a single process-wide session-state delegate forwards to the active bridge instance; previously every JavaScript reload registered another delegate, which leaked it and duplicated session events.
Docs: React Native, Expo, Migration guide, Using Sauce Mobile Beta with Backtrace. Per-version history: CHANGELOG.md.
Full Changelog (since 2.65.0, which was published from master without a tag): bd8d36e...3.1.0