fix: crash (#700)

Fix crash on startup after updating via OTA bundle
This commit is contained in:
Ritesh Shukla
2025-11-21 00:43:45 +05:30
committed by GitHub
parent 85d6848df0
commit 7ec8880569
5 changed files with 18 additions and 8 deletions

View File

@@ -142,6 +142,10 @@ jobs:
echo "\"dsn\": \"${{ secrets.GLITCHTIP_DSN }}\"" >> glitchtip.json
echo "}" >> glitchtip.json
- name: 📝 Output Glitchip secrets to .env
run: |
echo "GLITCHTIP_DSN=${{ secrets.GLITCHTIP_DSN }}" >> .env
- name: ✅ Validate Config Files
run: |
node -e "JSON.parse(require('fs').readFileSync('telemetrydeck.json'))"
@@ -214,6 +218,10 @@ jobs:
echo "\"dsn\": \"${{ secrets.GLITCHTIP_DSN }}\"" >> glitchtip.json
echo "}" >> glitchtip.json
- name: 📝 Output Glitchip secrets to .env
run: |
echo "GLITCHTIP_DSN=${{ secrets.GLITCHTIP_DSN }}" >> .env
- name: ✅ Validate Config Files
run: |
node -e "JSON.parse(require('fs').readFileSync('telemetrydeck.json'))"

View File

@@ -12,7 +12,7 @@ PODS:
- hermes-engine (0.82.1):
- hermes-engine/Pre-built (= 0.82.1)
- hermes-engine/Pre-built (0.82.1)
- NitroModules (0.31.3):
- NitroModules (0.31.8):
- boost
- DoubleConversion
- fast_float
@@ -2720,7 +2720,7 @@ PODS:
- React
- RNFS (2.20.0):
- React-Core
- RNGestureHandler (2.28.0):
- RNGestureHandler (2.29.1):
- boost
- DoubleConversion
- fast_float
@@ -3384,7 +3384,7 @@ SPEC CHECKSUMS:
glog: 5683914934d5b6e4240e497e0f4a3b42d1854183
google-cast-sdk: 1fb6724e94cc5ff23b359176e0cf6360586bb97a
hermes-engine: 273e30e7fb618279934b0b95ffab60ecedb7acf5
NitroModules: ca848159e82a7e9ae956ffe26c34a11631e6176b
NitroModules: 54a650fd5533accfe10e85ce037bf06f1e70640c
NitroOta: b4f7cdbe660e8f07f80f5eb9f169d70f698ea284
NitroOtaBundleManager: 5e7c0f8c3f76cc06f9fe07a63879fe35496c27c7
PromisesObjC: f5707f49cb48b9636751c5b2e7d227e43fba9f47
@@ -3471,7 +3471,7 @@ SPEC CHECKSUMS:
RNDeviceInfo: bcce8752b5043a623fe3c26789679b473f705d3c
RNDnsLookup: db4a89381b80ec1a5153088518d2c4f8e51f2521
RNFS: 89de7d7f4c0f6bafa05343c578f61118c8282ed8
RNGestureHandler: f1dd7f92a0faa2868a919ab53bb9d66eb4ebfcf5
RNGestureHandler: e1cf8ef3f11045536eed6bd4f132b003ef5f9a5f
RNReactNativeHapticFeedback: be4f1b4bf0398c30b59b76ed92ecb0a2ff3a69c6
RNReanimated: 732e7d1662f8cc0e533fa32791800de5b5934726
RNScreens: d821082c6dd1cb397cc0c98b026eeafaa68be479

View File

@@ -10,7 +10,6 @@ import {
useTelemetryDeck,
} from '@typedigital/telemetrydeck-react'
import telemetryDeckConfig from '../../telemetrydeck.json'
import glitchtipConfig from '../../glitchtip.json'
import * as Sentry from '@sentry/react-native'
import { getToken, Theme, useTheme } from 'tamagui'
import Toast from 'react-native-toast-message'
@@ -20,6 +19,7 @@ import { CarPlayProvider } from '../providers/CarPlay'
import { StorageProvider } from '../providers/Storage'
import { useSelectPlayerEngine } from '../stores/player/engine'
import { useSendMetricsSetting, useThemeSetting } from '../stores/settings/app'
import { GLITCHTIP_DSN } from '../configs/config'
/**
* The main component for the Jellify app. Children are wrapped in the {@link JellifyProvider}
* @returns The {@link Jellify} component
@@ -54,8 +54,8 @@ function JellifyLoggingWrapper({ children }: { children: React.ReactNode }): Rea
const telemetrydeck = createTelemetryDeck(telemetryDeckConfig)
// only initialize Sentry when we actually have a valid DSN and are sending metrics
if (sendMetrics && glitchtipConfig.dsn) {
Sentry.init({ ...glitchtipConfig, enableNative: !__DEV__ })
if (sendMetrics && GLITCHTIP_DSN) {
Sentry.init({ dsn: GLITCHTIP_DSN, enableNative: !__DEV__ })
}
return <TelemetryDeckProvider telemetryDeck={telemetrydeck}>{children}</TelemetryDeckProvider>

View File

@@ -2,8 +2,9 @@ import Config from 'react-native-config'
const OTA_UPDATE_ENABLED = Config.OTA_UPDATE_ENABLED === 'true'
const IS_MAESTRO_BUILD = Config.IS_MAESTRO_BUILD === 'true'
const GLITCHTIP_DSN = Config.GLITCHTIP_DSN
export { OTA_UPDATE_ENABLED, IS_MAESTRO_BUILD }
export { OTA_UPDATE_ENABLED, IS_MAESTRO_BUILD, GLITCHTIP_DSN }
export const MONOCHROME_ICON_URL =
'https://raw.githubusercontent.com/Jellify-Music/App/refs/heads/main/assets/monochrome-logo.svg'

View File

@@ -2,6 +2,7 @@ declare module 'react-native-config' {
export interface NativeConfig {
OTA_UPDATE_ENABLED?: string
IS_MAESTRO_BUILD?: string
GLITCHTIP_DSN?: string
}
export const Config: NativeConfig