After finally upgrading my app to SDK 44 and switching from classic build to EAS, I have a strange error in my built apk.
This appears only in the app built by EAS. The app works as it shoud in expo Go.
Whenever I execute a query or mutation with Apollo GraphQL Client, I get this error:
{
graphQLErrors: [],
clientErrors: [],
networkError: {
line: 1316,
column: 190,
sourceURL: "index.android.bundle"
},
message: "Object is not a constructor (evaluating 'new o.Observable')",
line: 826,
column 578:,
sourceURL: "index.android.bundle"
}
I verified the apollo client configuration via sentry messages and could not find any difference to the development app in expo go.
The Stacktrace in sentry lists no files from my project, mainly from expo and apollo client.
So I don’t really have an idea where to start debugging.
I’d be really glad if you’d have any hint or idea where to continue my search for this error.
Stacktrace from sentry:
Error: Object is not a constructor (evaluating 'new o.Observable')
at ApolloError(node_modules/@apollo/client/errors/errors.cjs:34:28)
at call(node_modules/@apollo/client/core/core.cjs:1124:101)
at notifySubscription(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:179:3)
at call(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:240:7)
at notifySubscription(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:179:3)
at value(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:240:7)
at forEach([native code])
at iterateObserversSafely(node_modules/@apollo/client/utilities/utilities.cjs:969:25)
at call(node_modules/@apollo/client/utilities/utilities.cjs:1068:21)
at notifySubscription(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:140:18)
at onNotify(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:179:3)
at error(/home/expo/workingdir/build/node_modules/zen-observable/lib/Observable.js:240:7)
at call(node_modules/@apollo/client/link/retry/retry.cjs:79:38)
at step(/home/expo/workingdir/build/node_modules/tslib/tslib.js:143:27)
at next(/home/expo/workingdir/build/node_modules/tslib/tslib.js:124:57)
at fulfilled(/home/expo/workingdir/build/node_modules/tslib/tslib.js:114:62)
at tryCallOne(/home/expo/workingdir/build/node_modules/promise/setimmediate/core.js:37:12)
at callback(/home/expo/workingdir/build/node_modules/promise/setimmediate/core.js:123:15)
at _callTimer(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:123:7)
at _callImmediatesPass(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:177:5)
at _immediatesCallback(node_modules/react-native/Libraries/Core/Timers/JSTimers.js:437:12)
at __callImmediates(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:388:12)
at fn(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:132:12)
at __guard(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:365:9)
at value(node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:131:10)
at value([native code])
at value([native code])