diff --git a/metadata/com.standardnotes.yml b/metadata/com.standardnotes.yml index b613d8210e..d41564618c 100644 --- a/metadata/com.standardnotes.yml +++ b/metadata/com.standardnotes.yml @@ -1999,6 +1999,7 @@ Builds: | sha256sum -c - - tar xf node.tar.gz - cp -a node-v*-linux-x64/. /usr/local/ + - rm -rf node-v*-linux-x64/ - npm -g install yarn init: - cd ../.. @@ -2018,6 +2019,7 @@ Builds: - sed -i -e "s/versionName appVersionName/versionName \"$$VERSION$$\"/" -e "s/versionCode appVersionCode/versionCode $$VERCODE$$/" build.gradle - sed -i -e "/appVersionName/d" -e "/appVersionCode/d" build.gradle + - sed -i -e "/@bugsnag\/react-native/d" -e "/bugsnag-sourcemaps/d" ../../package.json scanignore: - android/build.gradle - node_modules/hermes-engine @@ -2054,6 +2056,7 @@ Builds: | sha256sum -c - - tar xf node.tar.gz - cp -a node-v*-linux-x64/. /usr/local/ + - rm -rf node-v*-linux-x64/ - npm -g install yarn init: - cd ../.. @@ -2073,6 +2076,7 @@ Builds: - sed -i -e "s/versionName appVersionName/versionName \"$$VERSION$$\"/" -e "s/versionCode appVersionCode/versionCode $$VERCODE$$/" build.gradle - sed -i -e "/appVersionName/d" -e "/appVersionCode/d" build.gradle + - sed -i -e "/@bugsnag\/react-native/d" -e "/bugsnag-sourcemaps/d" ../../package.json scanignore: - android/build.gradle - node_modules/hermes-engine diff --git a/metadata/com.standardnotes/bugsnag-3.9.4.patch b/metadata/com.standardnotes/bugsnag-3.9.4.patch index 77426035a6..8360cc40e9 100644 --- a/metadata/com.standardnotes/bugsnag-3.9.4.patch +++ b/metadata/com.standardnotes/bugsnag-3.9.4.patch @@ -44,7 +44,7 @@ index 69c4085..bff7fc2 100644 @@ -74,23 +71,8 @@ public class MainApplication extends Application implements ReactApplication { rebuildOkHtttp(); - + - Configuration config = Configuration.load(this); - config.setEnabledBreadcrumbTypes(new HashSet() {{ - add(BreadcrumbType.NAVIGATION); @@ -66,6 +66,64 @@ index 69c4085..bff7fc2 100644 SoLoader.init(this, /* native exopackage */ false); +diff --git a/index.js b/index.js +index 25f59b8..6a781f2 100644 +--- a/index.js ++++ b/index.js +@@ -1,6 +1,5 @@ + import 'react-native-gesture-handler'; + import 'react-native-url-polyfill/auto'; +-import Bugsnag from '@bugsnag/react-native'; + import { enableScreens } from 'react-native-screens'; + import { SNLog } from '@standardnotes/snjs'; + +@@ -12,15 +11,12 @@ import { enableAndroidFontFix } from './src/style/android_text_fix'; + enableScreens(); + + if (__DEV__ === false) { +- console.log = () => {}; +- console.warn = () => {}; +- console.error = () => {}; +- SNLog.onError = Bugsnag.notify; +- SNLog.onLog = Bugsnag.leaveBreadcrumb; +-} else { +- SNLog.onLog = console.log; +- SNLog.onError = console.error; ++ console.log = () => { }; ++ console.warn = () => { }; ++ console.error = () => { }; + } ++SNLog.onLog = console.log; ++SNLog.onError = console.error; + + enableAndroidFontFix(); + +diff --git a/src/App.tsx b/src/App.tsx +index 8a7492f..f4ae6e4 100644 +--- a/src/App.tsx ++++ b/src/App.tsx +@@ -1,4 +1,3 @@ +-import Bugsnag from '@bugsnag/react-native'; + import { ActionSheetProvider } from '@expo/react-native-action-sheet'; + import { MobileApplication } from '@Lib/application'; + import { ApplicationGroup } from '@Lib/application_group'; +@@ -132,16 +131,6 @@ export const App = (props: { env: 'prod' | 'dev'; bugsnagOptOut: boolean }) => { + MobileApplication | undefined + >(); + +- useEffect(() => { +- if (!__DEV__ && !props.bugsnagOptOut) { +- try { +- Bugsnag.start(); +- } catch { +- console.error('Bugnsag failed to start'); +- } +- } +- }, [props.bugsnagOptOut]); +- + useEffect(() => { + const removeAppChangeObserver = applicationGroupRef.current.addApplicationChangeObserver( + () => { diff --git a/src/lib/interface.ts b/src/lib/interface.ts index 7d20717..44f5950 100644 --- a/src/lib/interface.ts