diff --git a/.buildkite/expo-pipeline.yml b/.buildkite/expo-pipeline.yml index 2ddd1c48e..00014fde8 100644 --- a/.buildkite/expo-pipeline.yml +++ b/.buildkite/expo-pipeline.yml @@ -114,7 +114,6 @@ steps: - --a11y-locator - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -139,7 +138,6 @@ steps: - --appium-version=1.16.0 - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -171,7 +169,6 @@ steps: - --retry=2 - --appium-version=1.18.0 - --capabilities={"appWaitForLaunch":"false"} - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -200,7 +197,6 @@ steps: - --a11y-locator - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -227,7 +223,6 @@ steps: - --a11y-locator - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -254,7 +249,6 @@ steps: - --a11y-locator - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -280,7 +274,6 @@ steps: - --appium-version=1.16.0 - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager @@ -305,7 +298,6 @@ steps: - --a11y-locator - --fail-fast - --retry=2 - - --resilient concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index b137b71d0..efa85be09 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -7,6 +7,8 @@ steps: timeout_in_minutes: 20 agents: queue: opensource-mac-cocoa-11 + env: + DEVELOPER_DIR: "/Applications/Xcode12.app" command: scripts/license_finder.sh # diff --git a/.buildkite/react-native-cli-pipeline.yml b/.buildkite/react-native-cli-pipeline.yml index 50dcfb39e..bea1031aa 100644 --- a/.buildkite/react-native-cli-pipeline.yml +++ b/.buildkite/react-native-cli-pipeline.yml @@ -28,8 +28,9 @@ steps: run: react-native-cli-tool-maze-runner use-aliases: true command: - - "features/cli-tests" - - "--fail-fast" + - --fail-fast + - --retry=2 + - features/cli-tests env: REACT_NATIVE_VERSION: "rn0_60" @@ -44,8 +45,9 @@ steps: run: react-native-cli-tool-maze-runner use-aliases: true command: - - "features/cli-tests" - - "--fail-fast" + - --fail-fast + - --retry=2 + - features/cli-tests env: REACT_NATIVE_VERSION: "rn0_61" @@ -60,8 +62,9 @@ steps: run: react-native-cli-tool-maze-runner use-aliases: true command: - - "features/cli-tests" - - "--fail-fast" + - --fail-fast + - --retry=2 + - features/cli-tests env: REACT_NATIVE_VERSION: "rn0_62" @@ -76,8 +79,9 @@ steps: run: react-native-cli-tool-maze-runner use-aliases: true command: - - "features/cli-tests" - - "--fail-fast" + - --fail-fast + - --retry=2 + - features/cli-tests env: REACT_NATIVE_VERSION: "rn0_63" @@ -92,8 +96,9 @@ steps: run: react-native-cli-tool-maze-runner use-aliases: true command: - - "features/cli-tests" - - "--fail-fast" + - --fail-fast + - --retry=2 + - features/cli-tests env: REACT_NATIVE_VERSION: "rn0_63_expo_ejected" @@ -108,8 +113,9 @@ steps: run: react-native-cli-tool-maze-runner use-aliases: true command: - - "features/cli-tests" - - "--fail-fast" + - --fail-fast + - --retry=2 + - features/cli-tests env: REACT_NATIVE_VERSION: "rn0_64" @@ -243,7 +249,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/rn0_60.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_60 @@ -256,7 +262,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/rn0_61.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_61 @@ -269,7 +275,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/rn0_62.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_62 @@ -282,7 +288,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/rn0_63.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_63 @@ -295,6 +301,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/rn0_63_expo_ejected.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_63_expo_ejected @@ -307,6 +314,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/rn0_64.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_64 @@ -319,6 +327,7 @@ steps: env: DEBUG: true LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/rn0_64_hermes.ipa commands: - test/react-native-cli/scripts/init-and-build-test.sh rn0_64_hermes diff --git a/.buildkite/react-native-pipeline.yml b/.buildkite/react-native-pipeline.yml index f61a92385..c597737a7 100644 --- a/.buildkite/react-native-pipeline.yml +++ b/.buildkite/react-native-pipeline.yml @@ -39,7 +39,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.60 LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/rn0.60.ipa commands: - npm run test:build-react-native-ios @@ -65,6 +65,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.63 LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/rn0.63.ipa commands: - npm run test:build-react-native-ios @@ -90,6 +91,7 @@ steps: env: REACT_NATIVE_VERSION: rn0.64-hermes LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/rn0.64-hermes.ipa commands: - npm run test:build-react-native-ios @@ -121,7 +123,7 @@ steps: JS_SOURCE_DIR: "react_navigation_js" ARTEFACT_NAME: "r_navigation_0.60" LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/r_navigation_0.60.ipa commands: - npm run test:build-react-native-ios @@ -141,9 +143,7 @@ steps: artifact_paths: - build/r_navigation_0.63.apk - # See: PLAT-5173 - label: ':ios: Build react-navigation 0.63 ipa' - skip: "See PLAT-5173" key: "react-navigation-0-63-ipa" timeout_in_minutes: 60 agents: @@ -153,6 +153,7 @@ steps: JS_SOURCE_DIR: "react_navigation_js" ARTEFACT_NAME: "r_navigation_0.63" LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/r_navigation_0.63.ipa commands: - npm run test:build-react-native-ios @@ -184,7 +185,7 @@ steps: JS_SOURCE_DIR: "react_native_navigation_js" ARTEFACT_NAME: "r_native_navigation_0.60" LANG: "en_US.UTF-8" - DEVELOPER_DIR: "/Applications/Xcode11.7.app" + DEVELOPER_DIR: "/Applications/Xcode11.app" artifact_paths: build/r_native_navigation_0.60.ipa commands: - npm run test:build-react-native-ios @@ -216,6 +217,7 @@ steps: JS_SOURCE_DIR: "react_native_navigation_js" ARTEFACT_NAME: "r_native_navigation_0.63" LANG: "en_US.UTF-8" + DEVELOPER_DIR: "/Applications/Xcode12.app" artifact_paths: build/r_native_navigation_0.63.ipa commands: - npm run test:build-react-native-ios @@ -223,7 +225,7 @@ steps: # # End-to-end tests # - - label: ':android: RN 0.60 Android 9 end-to-end tests' + - label: ':android: RN 0.60 Android 11 end-to-end tests' depends_on: "rn-0-60-apk" timeout_in_minutes: 60 plugins: @@ -237,10 +239,9 @@ steps: command: - --app=build/rn0.60.apk - --farm=bs - - --device=ANDROID_9_0 + - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient env: SKIP_NAVIGATION_SCENARIOS: "true" concurrency: 9 @@ -265,14 +266,13 @@ steps: - --a11y-locator - --appium-version=1.18.0 - --fail-fast - - --resilient env: SKIP_NAVIGATION_SCENARIOS: "true" concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':android: RN 0.63 Android 9 end-to-end tests' + - label: ':android: RN 0.63 Android 11 end-to-end tests' depends_on: "rn-0-63-apk" timeout_in_minutes: 60 plugins: @@ -286,10 +286,9 @@ steps: command: - --app=build/rn0.63.apk - --farm=bs - - --device=ANDROID_9_0 + - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient env: SKIP_NAVIGATION_SCENARIOS: "true" concurrency: 9 @@ -313,7 +312,6 @@ steps: - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient env: SKIP_NAVIGATION_SCENARIOS: "true" concurrency: 9 @@ -338,7 +336,6 @@ steps: - --a11y-locator - --appium-version=1.18.0 - --fail-fast - - --resilient env: SKIP_NAVIGATION_SCENARIOS: "true" concurrency: 9 @@ -363,14 +360,13 @@ steps: - --a11y-locator - --appium-version=1.18.0 - --fail-fast - - --resilient env: SKIP_NAVIGATION_SCENARIOS: "true" concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':android: react-navigation 0.60 Android 9 end-to-end tests' + - label: ':android: react-navigation 0.60 Android 11 end-to-end tests' depends_on: "react-navigation-0-60-apk" timeout_in_minutes: 60 plugins: @@ -384,10 +380,9 @@ steps: command: - --app=build/r_navigation_0.60.apk - --farm=bs - - --device=ANDROID_9_0 + - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' @@ -413,13 +408,12 @@ steps: - --a11y-locator - --appium-version=1.18.0 - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':android: react-navigation 0.63 Android 9 end-to-end tests' + - label: ':android: react-navigation 0.63 Android 11 end-to-end tests' depends_on: "react-navigation-0-63-apk" timeout_in_minutes: 60 plugins: @@ -433,18 +427,15 @@ steps: command: - --app=build/r_navigation_0.63.apk - --farm=bs - - --device=ANDROID_9_0 + - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager - # See: PLAT-5173 - - label: ':ios: react-navigation 0.63 iOS 13 end-to-end tests' - skip: "See PLAT-5173" + - label: ':ios: react-navigation 0.63 iOS 14 end-to-end tests' depends_on: "react-navigation-0-63-ipa" timeout_in_minutes: 60 plugins: @@ -458,17 +449,16 @@ steps: command: - --app=build/r_navigation_0.63.ipa - --farm=bs - - --device=IOS_13 + - --device=IOS_14 - --a11y-locator - - --appium-version=1.18.0 + - --appium-version=1.21.0 - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':android: react-native-navigation 0.60 Android 9 end-to-end tests' + - label: ':android: react-native-navigation 0.60 Android 11 end-to-end tests' depends_on: "react-native-navigation-0-60-apk" timeout_in_minutes: 60 plugins: @@ -482,10 +472,9 @@ steps: command: - --app=build/r_native_navigation_0.60.apk - --farm=bs - - --device=ANDROID_9_0 + - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' @@ -511,13 +500,12 @@ steps: - --appium-version=1.18.0 - --a11y-locator - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' concurrency_method: eager - - label: ':android: react-native-navigation 0.63 Android 9 end-to-end tests' + - label: ':android: react-native-navigation 0.63 Android 11 end-to-end tests' depends_on: "react-native-navigation-0-63-apk" timeout_in_minutes: 60 plugins: @@ -531,10 +519,9 @@ steps: command: - --app=build/r_native_navigation_0.63.apk - --farm=bs - - --device=ANDROID_9_0 + - --device=ANDROID_11_0 - --a11y-locator - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' @@ -560,7 +547,6 @@ steps: - --a11y-locator - --appium-version=1.18.0 - --fail-fast - - --resilient - features/navigation.feature concurrency: 9 concurrency_group: 'browserstack-app' diff --git a/CHANGELOG.md b/CHANGELOG.md index bce89446e..a782036b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,27 @@ # Changelog +### 7.16.1 (2022-02-02) + +### Fixed + +- (react-native) Handle circular references in metadata before it's sent to the native notifier layer [#1673](https://github.com/bugsnag/bugsnag-js/pull/1673) + +### Changed +- (react-native) Update bugsnag-android to v5.19.2 + - New APIs to support forthcoming feature flag and experiment functionality. For more information, please see https://docs.bugsnag.com/product/features-experiments. + - Explicitly define Kotlin api/language versions + [bugsnag-android#1564](https://github.com/bugsnag/bugsnag-android/pull/1564) + - Build project with Kotlin 1.4, maintain compat with Kotlin 1.3 + [bugsnag-android#1565](https://github.com/bugsnag/bugsnag-android/pull/1565) + - Discarded unhandled exceptions are propagated to any previously registered handlers + [bugsnag-android#1584](https://github.com/bugsnag/bugsnag-android/pull/1584) + - Fix SIGABRT crashes caused by race conditions in the NDK layer + [bugsnag-android#1585](https://github.com/bugsnag/bugsnag-android/pull/1585) + - Fixed an issue where feature-flags were not always sent if an OnSendCallback was configured + [bugsnag-android#1589](https://github.com/bugsnag/bugsnag-android/pull/1589) + - Fix a bug where api keys set in React Native callbacks were ignored + [bugsnag-android#1592](https://github.com/bugsnag/bugsnag-android/pull/1592) + ## 7.16.0 (2022-01-25) ### Added diff --git a/examples/reactnative/rn060example/package.json b/examples/reactnative/rn060example/package.json index 65555a98e..ecc156a28 100644 --- a/examples/reactnative/rn060example/package.json +++ b/examples/reactnative/rn060example/package.json @@ -7,7 +7,7 @@ "test": "jest" }, "dependencies": { - "@bugsnag/react-native": "^7.3.5", + "@bugsnag/react-native": "^7.16.0", "react": "16.8.6", "react-native": "0.60.0" }, diff --git a/examples/reactnative/rn063example/ios/Podfile b/examples/reactnative/rn063example/ios/Podfile index 009c1a473..716d520f4 100644 --- a/examples/reactnative/rn063example/ios/Podfile +++ b/examples/reactnative/rn063example/ios/Podfile @@ -8,12 +8,4 @@ target 'rn063example' do use_react_native!(:path => config["reactNativePath"]) - # Enables Flipper. - # - # Note that if you have use_frameworks! enabled, Flipper will not work and - # you should disable these next few lines. - use_flipper! - post_install do |installer| - flipper_post_install(installer) - end end diff --git a/examples/reactnative/rn063example/ios/Podfile.lock b/examples/reactnative/rn063example/ios/Podfile.lock index 460c57913..d88581391 100644 --- a/examples/reactnative/rn063example/ios/Podfile.lock +++ b/examples/reactnative/rn063example/ios/Podfile.lock @@ -1,9 +1,7 @@ PODS: - boost-for-react-native (1.63.0) - - BugsnagReactNative (7.3.0-alpha.1): - - React - - CocoaAsyncSocket (7.6.4) - - CocoaLibEvent (1.0.0) + - BugsnagReactNative (7.16.0): + - React-Core - DoubleConversion (1.1.6) - FBLazyVector (0.63.0) - FBReactNativeSpec (0.63.0): @@ -13,52 +11,6 @@ PODS: - React-Core (= 0.63.0) - React-jsi (= 0.63.0) - ReactCommon/turbomodule/core (= 0.63.0) - - Flipper (0.41.5): - - Flipper-Folly (~> 2.2) - - Flipper-RSocket (~> 1.1) - - Flipper-DoubleConversion (1.1.7) - - Flipper-Folly (2.2.0): - - boost-for-react-native - - CocoaLibEvent (~> 1.0) - - Flipper-DoubleConversion - - Flipper-Glog - - OpenSSL-Universal (= 1.0.2.19) - - Flipper-Glog (0.3.6) - - Flipper-PeerTalk (0.0.4) - - Flipper-RSocket (1.1.0): - - Flipper-Folly (~> 2.2) - - FlipperKit (0.41.5): - - FlipperKit/Core (= 0.41.5) - - FlipperKit/Core (0.41.5): - - Flipper (~> 0.41.5) - - FlipperKit/CppBridge - - FlipperKit/FBCxxFollyDynamicConvert - - FlipperKit/FBDefines - - FlipperKit/FKPortForwarding - - FlipperKit/CppBridge (0.41.5): - - Flipper (~> 0.41.5) - - FlipperKit/FBCxxFollyDynamicConvert (0.41.5): - - Flipper-Folly (~> 2.2) - - FlipperKit/FBDefines (0.41.5) - - FlipperKit/FKPortForwarding (0.41.5): - - CocoaAsyncSocket (~> 7.6) - - Flipper-PeerTalk (~> 0.0.4) - - FlipperKit/FlipperKitHighlightOverlay (0.41.5) - - FlipperKit/FlipperKitLayoutPlugin (0.41.5): - - FlipperKit/Core - - FlipperKit/FlipperKitHighlightOverlay - - FlipperKit/FlipperKitLayoutTextSearchable - - YogaKit (~> 1.18) - - FlipperKit/FlipperKitLayoutTextSearchable (0.41.5) - - FlipperKit/FlipperKitNetworkPlugin (0.41.5): - - FlipperKit/Core - - FlipperKit/FlipperKitReactPlugin (0.41.5): - - FlipperKit/Core - - FlipperKit/FlipperKitUserDefaultsPlugin (0.41.5): - - FlipperKit/Core - - FlipperKit/SKIOSNetworkPlugin (0.41.5): - - FlipperKit/Core - - FlipperKit/FlipperKitNetworkPlugin - Folly (2020.01.13.00): - boost-for-react-native - DoubleConversion @@ -69,9 +21,6 @@ PODS: - DoubleConversion - glog - glog (0.3.5) - - OpenSSL-Universal (1.0.2.19): - - OpenSSL-Universal/Static (= 1.0.2.19) - - OpenSSL-Universal/Static (1.0.2.19) - RCTRequired (0.63.0) - RCTTypeSafety (0.63.0): - FBLazyVector (= 0.63.0) @@ -299,33 +248,12 @@ PODS: - React-cxxreact (= 0.63.0) - React-jsi (= 0.63.0) - Yoga (1.14.0) - - YogaKit (1.18.1): - - Yoga (~> 1.14) DEPENDENCIES: - "BugsnagReactNative (from `../node_modules/@bugsnag/react-native`)" - DoubleConversion (from `../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec`) - FBLazyVector (from `../node_modules/react-native/Libraries/FBLazyVector`) - FBReactNativeSpec (from `../node_modules/react-native/Libraries/FBReactNativeSpec`) - - Flipper (~> 0.41.1) - - Flipper-DoubleConversion (= 1.1.7) - - Flipper-Folly (~> 2.2) - - Flipper-Glog (= 0.3.6) - - Flipper-PeerTalk (~> 0.0.4) - - Flipper-RSocket (~> 1.1) - - FlipperKit (~> 0.41.1) - - FlipperKit/Core (~> 0.41.1) - - FlipperKit/CppBridge (~> 0.41.1) - - FlipperKit/FBCxxFollyDynamicConvert (~> 0.41.1) - - FlipperKit/FBDefines (~> 0.41.1) - - FlipperKit/FKPortForwarding (~> 0.41.1) - - FlipperKit/FlipperKitHighlightOverlay (~> 0.41.1) - - FlipperKit/FlipperKitLayoutPlugin (~> 0.41.1) - - FlipperKit/FlipperKitLayoutTextSearchable (~> 0.41.1) - - FlipperKit/FlipperKitNetworkPlugin (~> 0.41.1) - - FlipperKit/FlipperKitReactPlugin (~> 0.41.1) - - FlipperKit/FlipperKitUserDefaultsPlugin (~> 0.41.1) - - FlipperKit/SKIOSNetworkPlugin (~> 0.41.1) - Folly (from `../node_modules/react-native/third-party-podspecs/Folly.podspec`) - glog (from `../node_modules/react-native/third-party-podspecs/glog.podspec`) - RCTRequired (from `../node_modules/react-native/Libraries/RCTRequired`) @@ -355,17 +283,6 @@ DEPENDENCIES: SPEC REPOS: trunk: - boost-for-react-native - - CocoaAsyncSocket - - CocoaLibEvent - - Flipper - - Flipper-DoubleConversion - - Flipper-Folly - - Flipper-Glog - - Flipper-PeerTalk - - Flipper-RSocket - - FlipperKit - - OpenSSL-Universal - - YogaKit EXTERNAL SOURCES: BugsnagReactNative: @@ -425,22 +342,12 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost-for-react-native: 39c7adb57c4e60d6c5479dd8623128eb5b3f0f2c - BugsnagReactNative: fece4d7d3a89238ee829db9b362927ed723f52db - CocoaAsyncSocket: 694058e7c0ed05a9e217d1b3c7ded962f4180845 - CocoaLibEvent: 2fab71b8bd46dd33ddb959f7928ec5909f838e3f + BugsnagReactNative: eee8e62a0d5b7ee72bba1ffa0eb3353c5d0b43bf DoubleConversion: cde416483dac037923206447da6e1454df403714 FBLazyVector: 6f1045c66f816849b33c4ff28930b611e89059a0 FBReactNativeSpec: e856d5103d749483f86f53afafd8df4ed8a776bd - Flipper: 33585e2d9810fe5528346be33bcf71b37bb7ae13 - Flipper-DoubleConversion: 38631e41ef4f9b12861c67d17cb5518d06badc41 - Flipper-Folly: c12092ea368353b58e992843a990a3225d4533c3 - Flipper-Glog: 1dfd6abf1e922806c52ceb8701a3599a79a200a6 - Flipper-PeerTalk: 116d8f857dc6ef55c7a5a75ea3ceaafe878aadc9 - Flipper-RSocket: 64e7431a55835eb953b0bf984ef3b90ae9fdddd7 - FlipperKit: bc68102cd4952a258a23c9c1b316c7bec1fecf83 Folly: b73c3869541e86821df3c387eb0af5f65addfab4 glog: 40a13f7840415b9a77023fbcae0f1e6f43192af3 - OpenSSL-Universal: 8b48cc0d10c1b2923617dfe5c178aa9ed2689355 RCTRequired: e46bb77db03887b3e200d34b08515c804669db99 RCTTypeSafety: 270fed6675c42f80fb87b47d626ef3cede1505e6 React: e008906ff1328f9bccb345ff4f7826397ad223fc @@ -462,8 +369,7 @@ SPEC CHECKSUMS: React-RCTVibration: 77ab1cf4a5eb854b88ad5ed3e9d8509ed124525e ReactCommon: f63556ee9e41e9802257228237e5e660451a03cf Yoga: 7d2edc5b410474191962e6dee88ee67f9b328b6b - YogaKit: f782866e155069a2cca2517aafea43200b01fd5a -PODFILE CHECKSUM: 319323b8d177d79ec5aeb00f40cc636cb97a9ac0 +PODFILE CHECKSUM: 636b51edcba25212266678231c0300447c079a96 -COCOAPODS: 1.9.3 +COCOAPODS: 1.11.2 diff --git a/examples/reactnative/rn063example/package.json b/examples/reactnative/rn063example/package.json index 49b6b51a6..affa6c852 100644 --- a/examples/reactnative/rn063example/package.json +++ b/examples/reactnative/rn063example/package.json @@ -10,9 +10,9 @@ "lint": "eslint ." }, "dependencies": { + "@bugsnag/react-native": "^7.16.0", "react": "16.13.1", - "react-native": "0.63.0", - "@bugsnag/react-native": "7.3.0-alpha.12" + "react-native": "0.63.0" }, "devDependencies": { "@babel/core": "^7.10.4", diff --git a/package.json b/package.json index 124b0f6c4..b692e4846 100644 --- a/package.json +++ b/package.json @@ -98,6 +98,6 @@ "local-npm:start": "verdaccio --config test/electron/local-npm-config.yml --listen 0.0.0.0:5539", "local-npm:publish-all": "lerna publish \"$VERSION_IDENTIFIER\" --yes --force-publish --exact --no-push --no-git-reset --no-git-tag-version --registry 'http://0.0.0.0:5539'", "local-npm:publish-all-win32": "lerna publish %VERSION_IDENTIFIER% --yes --force-publish --exact --no-push --no-git-reset --no-git-tag-version --registry 'http://0.0.0.0:5539'", - "test:electron": "xvfb-maybe --auto-servernum -- cucumber-js test/electron/features" + "test:electron": "xvfb-maybe --auto-servernum -- cucumber-js test/electron/features --retry 3 --retry-tag-filter @flaky" } } diff --git a/packages/core/lib/derecursify.js b/packages/core/lib/derecursify.js new file mode 100644 index 000000000..9c8938eba --- /dev/null +++ b/packages/core/lib/derecursify.js @@ -0,0 +1,82 @@ +const isArray = require('./es-utils/is-array') + +const isSafeLiteral = (obj) => ( + typeof obj === 'string' || obj instanceof String || + typeof obj === 'number' || obj instanceof Number || + typeof obj === 'boolean' || obj instanceof Boolean +) + +const isError = o => ( + o instanceof Error || /^\[object (Error|(Dom)?Exception)]$/.test(Object.prototype.toString.call(o)) +) + +const throwsMessage = err => '[Throws: ' + (err ? err.message : '?') + ']' + +const safelyGetProp = (obj, propName) => { + try { + return obj[propName] + } catch (err) { + return throwsMessage(err) + } +} + +/** + * Similar to `safe-json-stringify` this function rebuilds an object graph without any circular references. + * This requirement is different to `JSON.parse(safeJsonStringify(data))` in three key ways: + * - `toJSON` methods are not called + * - there is no redaction or fixed depth limit + * + * @param data the value to be made safe for the ReactNative bridge + * @returns a safe version of the given `data` + */ +module.exports = function (data) { + const seen = [] + + const visit = (obj) => { + if (obj === null || obj === undefined) return obj + + if (isSafeLiteral(obj)) { + return obj + } + + if (isError(obj)) { + return visit({ name: obj.name, message: obj.message }) + } + + if (obj instanceof Date) { + return obj.toISOString() + } + + if (seen.includes(obj)) { + // circular references are replaced and marked + return '[Circular]' + } + + // handle arrays, and all iterable non-array types (such as Set) + if (isArray(obj) || obj[Symbol.iterator]) { + seen.push(obj) + const safeArray = [] + try { + for (const value of obj) { + safeArray.push(visit(value)) + } + } catch (err) { + // if retrieving the Iterator fails + return throwsMessage(err) + } + seen.pop() + return safeArray + } + + seen.push(obj) + const safeObj = {} + for (const propName in obj) { + safeObj[propName] = visit(safelyGetProp(obj, propName)) + } + seen.pop() + + return safeObj + } + + return visit(data) +} diff --git a/packages/core/lib/test/derecursify.test.ts b/packages/core/lib/test/derecursify.test.ts new file mode 100644 index 000000000..5e6cf12ae --- /dev/null +++ b/packages/core/lib/test/derecursify.test.ts @@ -0,0 +1,126 @@ +import derecursift from '../derecursify' + +describe('delivery: react native makeSafe', () => { + it('leaves simple types intact', () => { + const symbol = Symbol('symbol_field') + const date = new Date() + const data: any = { + string: 'hello', + number: -15.321, + bool: true, + date, + array: [ + 1, 2, 3, + 'string', + { nestedObject: true } + ], + nestedData: { + string: 'hello', + number: -15.321, + bool: true + }, + [symbol]: 'some value', + map: new Map([['key', 'value']]), + _null: null, + _undefined: undefined + } + + const result = derecursift(data) + + /* eslint-disable-next-line @typescript-eslint/no-dynamic-delete */ + delete data[symbol] // we don't copy Symbol keys over + expect(result).toStrictEqual({ + ...data, + // dates are converted to ISO strings + date: date.toISOString(), + // maps iterate as arrays of arrays + map: [ + ['key', 'value'] + ] + }) + }) + + describe('handles errors', () => { + it('when reading properties', () => { + const object: any = {} + Object.defineProperty(object, 'badProperty', { + get () { + throw new Error('failure') + }, + enumerable: true + }) + + const result = derecursift(object) + expect(result).toStrictEqual({ badProperty: '[Throws: failure]' }) + }) + + it('when they are properties', () => { + const value = { errorProp: new Error('something wrong') } + const result = derecursift(value) + expect(result).toStrictEqual({ errorProp: { name: 'Error', message: 'something wrong' } }) + }) + }) + + describe('handles circular references', () => { + it('when directly in objects', () => { + const object: { self?: any } = {} + object.self = object + + const result = derecursift(object) + expect(result).toStrictEqual({ self: '[Circular]' }) + }) + + it('when nested in objects', () => { + const outer: any = { + inner: {} + } + + outer.inner.parent = outer + + const result = derecursift(outer) + expect(result).toStrictEqual({ inner: { parent: '[Circular]' } }) + }) + + it('when in arrays', () => { + const array: any[] = [{}, {}] + array[0].circularRef = array + + const result = derecursift(array) + expect(result).toStrictEqual([{ circularRef: '[Circular]' }, {}]) + }) + + it('when in non-array iterables', () => { + const object: any = {} + const values = new Set() + values.add(object) + + object.container = values + + const result = derecursift(values) + expect(result).toStrictEqual([{ container: '[Circular]' }]) + }) + + it('when nested in objects within arrays', () => { + const metaData: any = { + from: 'javascript' + } + + // ensure that circular references are safely handled + metaData.circle = metaData + + const array = [{ + someObject: metaData + }] + + const result = derecursift(array) + expect(result).toStrictEqual([ + { + someObject: { + from: 'javascript', + circle: '[Circular]' + } + } + ]) + }) + }) +}) diff --git a/packages/delivery-react-native/delivery.js b/packages/delivery-react-native/delivery.js index 0a34d16c1..044fa48af 100644 --- a/packages/delivery-react-native/delivery.js +++ b/packages/delivery-react-native/delivery.js @@ -1,3 +1,5 @@ +const derecursify = require('@bugsnag/core/lib/derecursify') + module.exports = (client, NativeClient) => ({ sendEvent: (payload, cb = () => {}) => { const event = payload.events[0] @@ -17,10 +19,10 @@ module.exports = (client, NativeClient) => ({ app: event.app, device: event.device, threads: event.threads, - breadcrumbs: event.breadcrumbs, + breadcrumbs: derecursify(event.breadcrumbs), context: event.context, user: event._user, - metadata: event._metadata, + metadata: derecursify(event._metadata), groupingHash: event.groupingHash, apiKey: event.apiKey, featureFlags: event.toJSON().featureFlags, diff --git a/packages/delivery-react-native/test/delivery.test.ts b/packages/delivery-react-native/test/delivery.test.ts index 8b8655562..6abf877e4 100644 --- a/packages/delivery-react-native/test/delivery.test.ts +++ b/packages/delivery-react-native/test/delivery.test.ts @@ -46,8 +46,16 @@ describe('delivery: react native', () => { } } const c = new Client({ apiKey: 'api_key' }) + + const metaData: any = { + from: 'javascript' + } + + // ensure that circular references in metadata are safely handled + metaData.circle = metaData + c._setDelivery(client => delivery(client, NativeClient)) - c.leaveBreadcrumb('hi') + c.leaveBreadcrumb('hi', metaData, 'state') c.setContext('test screen') c.setUser('123') c.notify(new Error('oh no'), (e) => { @@ -65,6 +73,10 @@ describe('delivery: react native', () => { expect(sent[0].threads).toEqual([]) expect(sent[0].breadcrumbs.length).toBe(1) expect(sent[0].breadcrumbs[0].message).toBe('hi') + expect(sent[0].breadcrumbs[0].metadata).toStrictEqual({ + from: 'javascript', + circle: '[Circular]' + }) expect(sent[0].context).toBe('test screen') expect(sent[0].user).toEqual({ id: '123', email: undefined, name: undefined }) expect(sent[0].metadata).toEqual({}) diff --git a/packages/plugin-electron-client-state-manager/README.md b/packages/plugin-electron-client-state-manager/README.md index a4d5df3e0..c7031656b 100644 --- a/packages/plugin-electron-client-state-manager/README.md +++ b/packages/plugin-electron-client-state-manager/README.md @@ -1,4 +1,4 @@ -# @bugsnag/plugin-client-state-manager +# @bugsnag/plugin-electron-client-state-manager This plugin provides a wrapper around the parts of state that need to be synchronised, providing a way for listeners to be notified of changes. diff --git a/packages/plugin-electron-renderer-client-state-updates/README.md b/packages/plugin-electron-renderer-client-state-updates/README.md index 9a4fff4f6..e022ccbcc 100644 --- a/packages/plugin-electron-renderer-client-state-updates/README.md +++ b/packages/plugin-electron-renderer-client-state-updates/README.md @@ -1,4 +1,4 @@ -# @bugsnag/plugin-electron-renderer-client-sync +# @bugsnag/plugin-electron-renderer-client-state-updates This plugin interacts with the IPC layer injected to the browser environment by `@bugsnag/plugin-electron-ipc`. diff --git a/packages/plugin-node-in-project/package.json b/packages/plugin-node-in-project/package.json index b8cfa6dc5..9a4a1b054 100644 --- a/packages/plugin-node-in-project/package.json +++ b/packages/plugin-node-in-project/package.json @@ -2,7 +2,7 @@ "name": "@bugsnag/plugin-node-in-project", "version": "7.16.0", "main": "in-project.js", - "description": "@bugsnag/js plugin to mark wether stackframes are 'in-project'", + "description": "@bugsnag/js plugin to mark whether stackframes are 'in-project'", "homepage": "https://www.bugsnag.com/", "repository": { "type": "git", diff --git a/packages/plugin-react-native-client-sync/client-sync.js b/packages/plugin-react-native-client-sync/client-sync.js index d2498a3eb..5bb026bff 100644 --- a/packages/plugin-react-native-client-sync/client-sync.js +++ b/packages/plugin-react-native-client-sync/client-sync.js @@ -1,4 +1,5 @@ const { DeviceEventEmitter, NativeEventEmitter, NativeModules, Platform } = require('react-native') +const derecursify = require('@bugsnag/core/lib/derecursify') module.exports = (NativeClient) => ({ load: (client) => { @@ -7,7 +8,7 @@ module.exports = (NativeClient) => ({ // to JSON() method doesn't get called before passing the object over the // bridge. This happens in the remote debugger and means the "message" // property is incorrectly named "name" - NativeClient.leaveBreadcrumb({ ...breadcrumb }) + NativeClient.leaveBreadcrumb(derecursify(breadcrumb)) }, true) const origSetUser = client.setUser @@ -28,9 +29,9 @@ module.exports = (NativeClient) => ({ client.addMetadata = function (section, key, value) { const ret = origAddMetadata.apply(this, arguments) if (typeof key === 'object') { - NativeClient.addMetadata(section, key) + NativeClient.addMetadata(section, derecursify(key)) } else { - NativeClient.addMetadata(section, { [key]: value }) + NativeClient.addMetadata(section, { [key]: derecursify(value) }) } return ret } diff --git a/packages/react-native/android/build.gradle b/packages/react-native/android/build.gradle index 3a0f0dd8e..a9836c542 100644 --- a/packages/react-native/android/build.gradle +++ b/packages/react-native/android/build.gradle @@ -39,8 +39,8 @@ android { } dependencies { - api "com.bugsnag:bugsnag-android:5.19.0" - api "com.bugsnag:bugsnag-plugin-react-native:5.19.0" + api "com.bugsnag:bugsnag-android:5.19.2" + api "com.bugsnag:bugsnag-plugin-react-native:5.19.2" implementation 'com.facebook.react:react-native:+' testImplementation "junit:junit:4.12" diff --git a/packages/react-native/prepare-android-vendor.config b/packages/react-native/prepare-android-vendor.config index b26043318..9feb8fa84 100644 --- a/packages/react-native/prepare-android-vendor.config +++ b/packages/react-native/prepare-android-vendor.config @@ -1,2 +1,2 @@ version -5.19.0 +5.19.2 diff --git a/test/electron/features/performance.feature b/test/electron/features/performance.feature index 5f4d61dbf..5a28a3d9d 100644 --- a/test/electron/features/performance.feature +++ b/test/electron/features/performance.feature @@ -1,5 +1,5 @@ +@flaky Feature: Startup performance - Scenario Outline: Notifier starts in a reasonable time frame Given I launch an app with configuration: | bugsnag | | diff --git a/test/react-native/features/api-key-ios.feature b/test/react-native/features/api-key-override.feature similarity index 91% rename from test/react-native/features/api-key-ios.feature rename to test/react-native/features/api-key-override.feature index 7aef56f59..c30af411e 100644 --- a/test/react-native/features/api-key-ios.feature +++ b/test/react-native/features/api-key-override.feature @@ -1,5 +1,4 @@ -@ios_only -Feature: iOS API key override +Feature: API key override Scenario: Handled JS error overrides API key When I run "EventApiKeyOverrideScenario" diff --git a/test/react-native/features/fixtures/app/react_navigation_js/app/scenarios/ReactNavigationBreadcrumbsDisabledScenario.js b/test/react-native/features/fixtures/app/react_navigation_js/app/scenarios/ReactNavigationBreadcrumbsDisabledScenario.js index e68322ad7..d721f34ec 100644 --- a/test/react-native/features/fixtures/app/react_navigation_js/app/scenarios/ReactNavigationBreadcrumbsDisabledScenario.js +++ b/test/react-native/features/fixtures/app/react_navigation_js/app/scenarios/ReactNavigationBreadcrumbsDisabledScenario.js @@ -7,7 +7,7 @@ import { createStackNavigator } from '@react-navigation/stack' export class ReactNavigationBreadcrumbsDisabledScenario extends Scenario { constructor (configuration, _jsConfig) { super() - configuration.enabledBreadcrumbTypes = [] + configuration.enabledBreadcrumbTypes = ['process', 'request', 'log'] } view () { diff --git a/test/react-native/features/fixtures/app/react_navigation_js/install.sh b/test/react-native/features/fixtures/app/react_navigation_js/install.sh index 62c82aa3e..ee8da7c74 100755 --- a/test/react-native/features/fixtures/app/react_navigation_js/install.sh +++ b/test/react-native/features/fixtures/app/react_navigation_js/install.sh @@ -1,9 +1,19 @@ -npm i @bugsnag/plugin-react-navigation@$BUGSNAG_VERSION --registry=$REGISTRY_URL +npm install @bugsnag/plugin-react-navigation@$BUGSNAG_VERSION --registry=$REGISTRY_URL -npm i @react-native-community/masked-view@^0.1 --registry=$REGISTRY_URL -npm i @react-navigation/native@^5.9 --registry=$REGISTRY_URL -npm i @react-navigation/stack@^5.14 --registry=$REGISTRY_URL -npm i react-native-gesture-handler@^1.10 --registry=$REGISTRY_URL -npm i react-native-reanimated@^1.13 --registry=$REGISTRY_URL -npm i react-native-safe-area-context@^3.1 --registry=$REGISTRY_URL -npm i react-native-screens@^2.18 --registry=$REGISTRY_URL +if [ "$REACT_NATIVE_VERSION" = "rn0.60" ]; then + npm install @react-native-community/masked-view@^0.1 --registry=$REGISTRY_URL + npm install @react-navigation/native@^5.9 --registry=$REGISTRY_URL + npm install @react-navigation/stack@^5.14 --registry=$REGISTRY_URL + npm install react-native-gesture-handler@^1.10 --registry=$REGISTRY_URL + npm install react-native-reanimated@^1.13 --registry=$REGISTRY_URL + npm install react-native-safe-area-context@^3.1 --registry=$REGISTRY_URL + npm install react-native-screens@^2.18 --registry=$REGISTRY_URL +else + npm install @react-native-community/masked-view@^0.1 --registry=$REGISTRY_URL + npm install @react-navigation/native@^6.0 --registry=$REGISTRY_URL + npm install @react-navigation/stack@^6.0 --registry=$REGISTRY_URL + npm install react-native-gesture-handler@^2.2 --registry=$REGISTRY_URL + npm install react-native-reanimated@^1.13 --registry=$REGISTRY_URL + npm install react-native-safe-area-context@3.3 --registry=$REGISTRY_URL + npm install react-native-screens@3.10 --registry=$REGISTRY_URL +fi diff --git a/test/react-native/features/fixtures/app/scenario_js/app/scenarios/BreadcrumbsJsManualScenario.js b/test/react-native/features/fixtures/app/scenario_js/app/scenarios/BreadcrumbsJsManualScenario.js index ab9ac32d3..1e4543894 100644 --- a/test/react-native/features/fixtures/app/scenario_js/app/scenarios/BreadcrumbsJsManualScenario.js +++ b/test/react-native/features/fixtures/app/scenario_js/app/scenarios/BreadcrumbsJsManualScenario.js @@ -6,6 +6,10 @@ export class BreadcrumbsJsManualScenario extends Scenario { const metaData = { from: 'javascript' } + + // ensure that circular references are safely handled + metaData.circle = metaData + Bugsnag.leaveBreadcrumb('oh crumbs', metaData, 'state') Bugsnag.notify(new Error('BreadcrumbsJsManualScenario')) } diff --git a/test/react-native/features/fixtures/app/scenario_js/app/scenarios/MetadataJsScenario.js b/test/react-native/features/fixtures/app/scenario_js/app/scenarios/MetadataJsScenario.js index afcee417b..198da2e3a 100644 --- a/test/react-native/features/fixtures/app/scenario_js/app/scenarios/MetadataJsScenario.js +++ b/test/react-native/features/fixtures/app/scenario_js/app/scenarios/MetadataJsScenario.js @@ -13,8 +13,13 @@ export class MetadataJsScenario extends Scenario { } run () { + const recursiveMetadata = {} + recursiveMetadata.data = 'some valid data' + recursiveMetadata.circle = recursiveMetadata + Bugsnag.addMetadata('jsdata', 'some_more_data', 'set via client') Bugsnag.addMetadata('jsdata', 'redacted_data', 'not present') + Bugsnag.addMetadata('jsdata', 'recursive', recursiveMetadata) Bugsnag.notify(new Error('MetadataJsScenario'), (event) => { event.addMetadata('jsdata', 'even_more_data', 'set via event') event.addMetadata('jsarraydata', 'items', ['a', 'b', 'c']) diff --git a/test/react-native/features/fixtures/expected_breadcrumbs/JsManualScenario.json b/test/react-native/features/fixtures/expected_breadcrumbs/JsManualScenario.json index e90f8012b..7c9246f4f 100644 --- a/test/react-native/features/fixtures/expected_breadcrumbs/JsManualScenario.json +++ b/test/react-native/features/fixtures/expected_breadcrumbs/JsManualScenario.json @@ -3,6 +3,7 @@ "name": "oh crumbs", "timestamp": "^\\d{4}\\-\\d{2}\\-\\d{2}T\\d{2}:\\d{2}:[\\d\\.]+Z?$", "metaData": { - "from": "javascript" + "from": "javascript", + "circle": "[Circular]" } -} \ No newline at end of file +} diff --git a/test/react-native/features/fixtures/ios-module/BugsnagModule.m b/test/react-native/features/fixtures/ios-module/BugsnagModule.m index 08c250f57..7daaf03c2 100644 --- a/test/react-native/features/fixtures/ios-module/BugsnagModule.m +++ b/test/react-native/features/fixtures/ios-module/BugsnagModule.m @@ -62,7 +62,29 @@ @implementation BugsnagModule [config setEnabledReleaseStages:[NSSet setWithArray:options[@"enabledReleaseStages"]]]; } if (options[@"enabledBreadcrumbTypes"] && ![options[@"enabledBreadcrumbTypes"] isEqual:[NSNull null]]) { - [config setEnabledBreadcrumbTypes:[NSSet setWithArray:options[@"enabledBreadcrumbTypes"]]]; + BSGEnabledBreadcrumbType types = BSGEnabledBreadcrumbTypeNone; + + for (NSString *const type in options[@"enabledBreadcrumbTypes"]) { + NSString *lcType = [type lowercaseString]; + NSLog(@"Enabling breadcrumb type: %@", lcType); + + if ([lcType isEqualToString:@"navigation"]) { + types |= BSGEnabledBreadcrumbTypeNavigation; + } else if ([lcType isEqualToString:@"request"]) { + types |= BSGEnabledBreadcrumbTypeRequest; + } else if ([lcType isEqualToString:@"process"]) { + types |= BSGEnabledBreadcrumbTypeProcess; + } else if ([lcType isEqualToString:@"log"]) { + types |= BSGEnabledBreadcrumbTypeLog; + } else if ([lcType isEqualToString:@"user"]) { + types |= BSGEnabledBreadcrumbTypeUser; + } else if ([lcType isEqualToString:@"state"]) { + types |= BSGEnabledBreadcrumbTypeState; + } else if ([lcType isEqualToString:@"error"]) { + types |= BSGEnabledBreadcrumbTypeError; + } + } + [config setEnabledBreadcrumbTypes:types]; } if (options[@"configMetaData"] != nil) { NSDictionary *configMetaData = options[@"configMetaData"]; diff --git a/test/react-native/features/fixtures/reactnative/module/BugsnagModule.java b/test/react-native/features/fixtures/reactnative/module/BugsnagModule.java index f3e6ab053..68be17fe2 100644 --- a/test/react-native/features/fixtures/reactnative/module/BugsnagModule.java +++ b/test/react-native/features/fixtures/reactnative/module/BugsnagModule.java @@ -138,7 +138,10 @@ else if (options.hasKey("endpoints")) { } else { Set enabledBreadcrumbTypes = new HashSet(); ReadableArray ar = options.getArray("enabledBreadcrumbTypes"); - for (int i = 0; i < ar.size(); i++) enabledBreadcrumbTypes.add(BreadcrumbType.valueOf(ar.getString(i))); + for (int i = 0; i < ar.size(); i++) { + BreadcrumbType type = BreadcrumbType.valueOf(ar.getString(i).toUpperCase()); + enabledBreadcrumbTypes.add(type); + } config.setEnabledBreadcrumbTypes(enabledBreadcrumbTypes); } } diff --git a/test/react-native/features/metadata.feature b/test/react-native/features/metadata.feature index 5ebb95b7f..fb098da2d 100644 --- a/test/react-native/features/metadata.feature +++ b/test/react-native/features/metadata.feature @@ -9,6 +9,8 @@ Scenario: Setting metadata (JS) And the event "metaData.jsdata.some_more_data" equals "set via client" And the event "metaData.jsdata.even_more_data" equals "set via event" And the event "metaData.jsdata.redacted_data" equals "[REDACTED]" + And the event "metaData.jsdata.recursive.data" equals "some valid data" + And the event "metaData.jsdata.recursive.circle" equals "[Circular]" And the error payload field "events.0.metaData.jsarraydata.items" is an array with 3 elements Scenario: Setting metadata (native handled) diff --git a/test/react-native/features/support/env.rb b/test/react-native/features/support/env.rb index 7d80ccc8c..51dc95353 100644 --- a/test/react-native/features/support/env.rb +++ b/test/react-native/features/support/env.rb @@ -1,5 +1,6 @@ BeforeAll do - Maze.config.receive_no_requests_wait = 15 if Maze.config.respond_to? :receive_no_requests_wait= + Maze.config.receive_no_requests_wait = 30 + Maze.config.receive_requests_wait = 30 end Before('@android_only') do |scenario|