Skip to content

@saucelabs/mobile-beta-react-native 3.1.0

Latest

Choose a tag to compare

@github-actions github-actions released this 27 Oct 20:42
· 0 commits to master since this release

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, form https://<host>/services/) before beginWithoutCrashHandler(...). An app that skips this call starts no sessions.

Install

npm install @saucelabs/mobile-beta-react-native@3.1.0

The 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.tgz
import { 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-native 0.2.3 or later is required for the SDK-managed attributes to reach native crash reports (0.2.2 never forwards addAttribute after initialize()); until 0.2.3 is published as stable, install the rc dist-tag (^0.2.3-rc). It is declared as an optional peer dependency.
  • Never keep react-native-testfairy installed 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 bundled TestFairy.h and React-TestFairy.podspec are gone.
  • begin() is crashless and delegates to the new beginWithoutCrashHandler(); enableCrashHandler() and disableCrashHandler() are retained as native no-ops; isCrashReportingAvailable() returns false by design.
  • New APIs: beginWithoutCrashHandler, addSessionStateListener, promise-based getSessionUrl, getVersion and attachFile (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_id at every session start and the package writes it, with sauce.mobile_beta.session_started, sauce.mobile_beta.session_url, sauce.sdk.coexistence_mode, sauce.release and sauce.dist, to BacktraceClient.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 uuid dependency.
  • getSessionCorrelationId(), the onSessionCorrelationIdChanged({ correlationId }) callback and correlationId in the onSessionStarted payload.
  • setAttribute on an SDK-managed key is ignored by the native SDK with one warning per key. The package warns once when @backtrace/react-native is installed but not initialized at the first session start, and once when it is older than 0.2.3.
  • setServerEndpoint rejects an empty value with a TypeError.

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