Skip to content
TypeScript

fix(mobile): the app builds and launches again after the Expo update (#20131)

voida63b99fb2d2114
diff --git a/patches/[email protected] b/patches/[email protected]
index f5ac33c003b..77861841d20 100644
--- a/patches/[email protected]
+++ b/patches/[email protected]
@@ -1,3 +1,64 @@
+diff --git a/android/src/main/java/expo/modules/widgets/WidgetsModule.kt b/android/src/main/java/expo/modules/widgets/WidgetsModule.kt
+index f947f46..d290055 100644
+--- a/android/src/main/java/expo/modules/widgets/WidgetsModule.kt
++++ b/android/src/main/java/expo/modules/widgets/WidgetsModule.kt
+@@ -84,6 +84,11 @@ class WidgetsModule : Module() {
+ }
+
+ Class("CustomNotification", CustomNotification::class) {
++ // A SharedObject class without a constructor fails module registration at launch.
++ Constructor { ->
++ throw UnsupportedOperationException("CustomNotification instances come from CustomNotificationFactory")
++ }
++
+ Function("getId") { notification: CustomNotification ->
+ notification.id
+ }
+diff --git a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt
+index 07eca41..82cabea 100644
+--- a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt
++++ b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationBuilder.kt
+@@ -14,8 +14,8 @@ import android.os.Bundle
+ import androidx.core.app.NotificationCompat
+ import androidx.core.app.NotificationManagerCompat
+ import expo.modules.widgets.R
+-import io.github.jakex7.peek.notification.PeekNotificationViews
+-import io.github.jakex7.peek.notification.setPeekContent
++import io.github.expo.peek.notification.PeekNotificationViews
++import io.github.expo.peek.notification.setPeekContent
+
+ internal object CustomNotificationBuilder {
+ private const val DEFAULT_CHANNEL_ID = "expo_widgets_notifications"
+diff --git a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt
+index 446a39e..e90b09a 100644
+--- a/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt
++++ b/android/src/main/java/expo/modules/widgets/notifications/CustomNotificationRenderer.kt
+@@ -8,9 +8,9 @@ import expo.modules.widgets.WidgetsStorage
+ import expo.modules.widgets.evaluateLayout
+ import expo.modules.widgets.getWidgetEnvironment
+ import expo.modules.widgets.toPeekRoot
+-import io.github.jakex7.peek.emittables.peekEmittableNotificationViews
+-import io.github.jakex7.peek.notification.PeekNotificationSizes
+-import io.github.jakex7.peek.notification.PeekNotificationViews
++import io.github.expo.peek.emittables.peekEmittableNotificationViews
++import io.github.expo.peek.notification.PeekNotificationSizes
++import io.github.expo.peek.notification.PeekNotificationViews
+
+ internal object CustomNotificationRenderer {
+ suspend fun render(context: Context, state: CustomNotificationState): PeekNotificationViews {
+diff --git a/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt b/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt
+index a7b372e..dd001ee 100644
+--- a/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt
++++ b/android/src/main/java/expo/modules/widgets/notifications/CustomNotifications.kt
+@@ -3,7 +3,7 @@ package expo.modules.widgets.notifications
+ import android.annotation.SuppressLint
+ import android.content.Context
+ import androidx.core.app.NotificationManagerCompat
+-import io.github.jakex7.peek.notification.PeekNotificationViews
++import io.github.expo.peek.notification.PeekNotificationViews
+ import kotlinx.coroutines.CancellationException
+ import kotlinx.coroutines.Job
+ import kotlinx.coroutines.coroutineScope
diff --git a/build/Widgets.types.d.ts b/build/Widgets.types.d.ts
index 4c474bb..b0173df 100644
--- a/build/Widgets.types.d.ts
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d5f98a4c8b6..37d4f6d1536 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -87,7 +87,7 @@ catalogs:
overrides:
'@exodus/bytes>@noble/hashes': 1.8.0
- '@react-navigation/core': 7.21.13
+ '@react-navigation/core': 7.24.0
dbus-next>usocket: '-'
'@anthropic-ai/claude-agent-sdk>@anthropic-ai/claude-agent-sdk-darwin-arm64': '-'
'@anthropic-ai/claude-agent-sdk>@anthropic-ai/claude-agent-sdk-darwin-x64': '-'
@@ -165,7 +165,7 @@ patchedDependencies:
[email protected]: d0311b0c0b05bd94393bd9a84653cb42503d5f3c8a19eb2627c34ace08bedf18
[email protected]: f750041c45ab838a3530451dc7b50d6640a79141037a1b0499c5e3412a860c57
[email protected]: d0ca151b2a4eec8bb28df547c8663e4b803acd981ace492c6b401bcb279f524a
- [email protected]: 40806e85c756563935c7368b93d679bd3bb7742bff21d9c7611d9161e1aee602
+ [email protected]: 570c932ecc1caeac5106b76d6be40d33fb00f598b0487af478de8c6d8f559ad1
[email protected]: f2fe901c61cde17986240002d05c172d5d0272d83ffaab8d0ebeb922763be414
[email protected]: abe20e1d1c23549297cbbc818e14fe479b41455930d9663135d6b40fe359b626
[email protected]: f28d08f1233e3cce8b9324b4357d2b10f1ee040b8051bc87235b0fb95069b9bb
@@ -524,7 +524,7 @@ importers:
expo-widgets:
specifier: 58.0.18
react:
specifier: 19.3.0
version: 19.3.0
@@ -5572,8 +5572,8 @@ packages:
'@types/react':
optional: true
- '@react-navigation/[email protected]':
- resolution: {integrity: sha512-d1syMXra7RlJjGsjsIxEA14F6U+awFtQJeOfDc+V7x3y1mPqYQVTYnqnt3PR+fBBouUKaKsgKZsSR3MP5919Xg==}
+ '@react-navigation/[email protected]':
+ resolution: {integrity: sha512-PPMHGSgLB65eqWOBHeD/nGyzGJV3rcZ5sZbsCXlaC37HnLmwTEjB4CaOQn8CBVVv/Sc0Kl/W5dpPLls9Stk2WA==}
peerDependencies:
react: '>= 18.2.0'
@@ -5604,8 +5604,8 @@ packages:
react: '>= 18.2.0'
react-native: '*'
- '@react-navigation/[email protected]':
- resolution: {integrity: sha512-GI7eJm8/KsZUQaYcXvEExikKurRZRgEsSzyZ7faENfi65yqJBCXjDMwyN1pF6pNW1MoLH1ErDwDivFxY6BzD3w==}
+ '@react-navigation/[email protected]':
+ resolution: {integrity: sha512-hpvpVFt6wu3U014F/0Qy45VZCErlUvIV8kN1L6HovN5P9OpbXAzFTaRQmG7VW6czg2tSkUL5S3dZA0HIu5QirQ==}
resolution: {integrity: sha512-huQgNLaCIZfQ9SeLn4q9124uOUd8HbZDYHwwUzNcRgHqCHiHKl2dDxMqJCeWh8cMqZAoWuHR8XnWbDMIf+o7ag==}
@@ -8201,10 +8201,6 @@ packages:
resolution: {integrity: sha512-GtpQYB283KrPp6nRw50q3U9/VfOutZOe103qlN7BPP6Ad27xYnOIWv4lPzo8HCAL+mMZofJ9KEy30fq6MfaK6Q==}
- resolution: {integrity: sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==}
- engines: {node: '>=0.10'}
-
resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==}
engines: {node: '>=10'}
@@ -9103,10 +9099,6 @@ packages:
resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==}
engines: {node: '>=8'}
- resolution: {integrity: sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==}
- engines: {node: '>=0.10.0'}
-
resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==}
engines: {node: '>= 0.8'}
@@ -10930,10 +10922,6 @@ packages:
resolution: {integrity: sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==}
engines: {node: '>=0.6'}
- resolution: {integrity: sha512-hh2WYhq4fi8+b+/2Kg9CEge4fDPvHS534aOOvOZeQ3+Vf2mCFsaFBYj0i+iXcAq6I9Vzp5fjMFBlONvayDC1qg==}
- engines: {node: '>=6'}
-
resolution: {integrity: sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==}
engines: {node: '>=10'}
@@ -11519,10 +11507,6 @@ packages:
resolution: {integrity: sha512-kvzhi7vqKTfkh0PZU+2D2PIllw2ymqJKujUcyPMd9Y75Nv4nPbGJZXNhxsgdQab2BmlDct1YnfQCguEvHr7VsQ==}
- resolution: {integrity: sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==}
- engines: {node: '>=6'}
-
resolution: {integrity: sha512-UcjcJOWknrNkF6PLX83qcHM6KHgVKNkV62Y8a5uYDVv9ydGQVwAHMKqHdJje1VTWpljG0WYpCDhrCdAOYH4TWg==}
engines: {node: '>= 10.x'}
@@ -11590,10 +11574,6 @@ packages:
resolution: {integrity: sha512-vMgjE/GGEPEFnhFub6pa4FmJBRBVOLpIII2hvCZ8Kzb7K0hlHo7mQv6xYrBvCL2LtAIBwFUK8wvuJgTVSQ5MFQ==}
- resolution: {integrity: sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==}
- engines: {node: '>=4'}
-
resolution: {integrity: sha512-cEmp9QeXXRmjj/rVp9oyiqcvyocWab/HaoN4+bwFeZ7QzykJD6L3yD4v12K1x0tHpqRqVpJevN3gW7kyM39Bqg==}
@@ -16284,13 +16264,11 @@ snapshots:
optionalDependencies:
'@types/react': 19.3.0
- '@react-navigation/[email protected]([email protected])':
+ '@react-navigation/[email protected]([email protected])':
dependencies:
- '@react-navigation/routers': 7.6.4
+ '@react-navigation/routers': 7.6.5
escape-string-regexp: 4.0.0
fast-deep-equal: 3.1.3
- nanoid: 3.3.19
- query-string: 7.1.3
react: 19.3.0
react-is: 19.2.7
use-latest-callback: 0.2.6([email protected])
@@ -16324,7 +16302,7 @@ snapshots:
dependencies:
- '@react-navigation/core': 7.21.13([email protected])
+ '@react-navigation/core': 7.24.0([email protected])
escape-string-regexp: 4.0.0
fast-deep-equal: 3.1.3
nanoid: 3.3.19
@@ -16333,7 +16311,7 @@ snapshots:
standard-navigation: 0.0.8([email protected])
use-latest-callback: 0.2.6([email protected])
- '@react-navigation/[email protected]':
+ '@react-navigation/[email protected]':
dependencies:
nanoid: 3.3.19
@@ -18181,7 +18159,7 @@ snapshots:
optionalDependencies:
'@babel/runtime': 7.29.7
expo: 58.0.11(0279ba067f3e563cec3a046cc8b71592)
transitivePeerDependencies:
- '@babel/core'
- supports-color
@@ -18877,8 +18855,6 @@ snapshots:
dependencies:
character-entities: 2.0.2
-
dependencies:
mimic-response: 3.1.0
@@ -19636,7 +19612,7 @@ snapshots:
expo: 58.0.11(0279ba067f3e563cec3a046cc8b71592)
dependencies:
'@expo/plist': 0.10.1
@@ -19820,8 +19796,6 @@ snapshots:
dependencies:
to-regex-range: 5.0.1
-
dependencies:
debug: 2.6.9
@@ -22191,13 +22165,6 @@ snapshots:
es-define-property: 1.0.1
side-channel: 1.1.1
- dependencies:
- decode-uri-component: 0.2.2
- filter-obj: 1.1.0
- split-on-first: 1.1.0
- strict-uri-encode: 2.0.0
-
@@ -23030,8 +22997,6 @@ snapshots:
memory-pager: 1.5.0
optional: true
-
optional: true
@@ -23087,8 +23052,6 @@ snapshots:
optional: true
-
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 3722de98c15..d3061cc2fd1 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -215,7 +215,9 @@ overrides:
# Keep jsdom's optional peer consistent so Vite+ has one test-runner instance.
"@exodus/bytes>@noble/hashes": "1.8.0"
# Earlier React Navigation declarations create a circular type alias in TypeScript 7.
- "@react-navigation/core": 7.21.13
+ # Move this with @react-navigation/native: an older core than it requires crashes
+ # every native stack at launch.
+ "@react-navigation/core": 7.24.0
# The dbus-next patch drops usocket from the package, but pnpm resolves from the
# registry manifest, so the edge has to be cut here as well.
"dbus-next>usocket": "-"