Description
Hi team,
I got the following error when using aws-appsync, and it looks like a bug of redux-offline.
Does "aws-appsync": "^3.0.3" working with expo version 37? Or I have to downgrade to version 36?
Other people have the same issue.
aws-amplify/amplify-js#5359
=========================================================
[Unhandled promise rejection: TypeError: _netinfo.default.getConnectionInfo is not a function. (In '_netinfo.default.getConnectionInfo()', '_netinfo.default.getConnectionInfo' is undefined)]
- node_modules/@redux-offline/redux-offline/lib/defaults/detectNetwork.native.js:96:14 in _callee2$
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:274:30 in invoke
- node_modules/@babel/runtime/helpers/asyncToGenerator.js:2:6 in asyncGeneratorStep
- node_modules/@babel/runtime/helpers/asyncToGenerator.js:24:6 in _next
- node_modules/promise/setimmediate/core.js:45:7 in tryCallTwo
- node_modules/promise/setimmediate/core.js:200:23 in doResolve
- node_modules/promise/setimmediate/core.js:66:12 in Promise
- node_modules/@babel/runtime/helpers/asyncToGenerator.js:20:15 in
- http://127.0.0.1:19001/index.bundle?platform=ios&dev=true&minify=false&hot=false:225972:17 in DetectNetwork
- node_modules/@redux-offline/redux-offline/lib/defaults/detectNetwork.native.js:224:24 in _default
- node_modules/@redux-offline/redux-offline/lib/index.js:70:17 in
- node_modules/redux/lib/applyMiddleware.js:37:30 in
- node_modules/aws-appsync/lib/store.js:82:4 in newStore
- node_modules/aws-appsync/lib/client.js:189:120 in AWSAppSyncClient
- App.js:433:0 in
- node_modules/metro/src/lib/polyfills/require.js:322:6 in loadModuleImplementation
- index.js:3:0 in
- node_modules/metro/src/lib/polyfills/require.js:322:6 in loadModuleImplementation
- node_modules/metro/src/lib/polyfills/require.js:201:45 in guardedLoadModule
- http://127.0.0.1:19001/index.bundle?platform=ios&dev=true&minify=false&hot=false:749114:4 in global code
[Unhandled promise rejection: TypeError: undefined is not an object (evaluating 'netinfo_1.default.isConnected.fetch')]
- http://127.0.0.1:19001/index.bundle?platform=ios&dev=true&minify=false&hot=false:229789:55 in
- http://127.0.0.1:19001/index.bundle?platform=ios&dev=true&minify=false&hot=false:229724:25 in step
- node_modules/aws-appsync-react/lib/rehydrated-rn.js:18:40 in fulfilled
- node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
- node_modules/promise/setimmediate/core.js:123:25 in setImmediate$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:146:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:194:17 in _callImmediatesPass
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:458:30 in callImmediates
- [native code]:null in callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:407:6 in __callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:143:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:142:17 in __guard$argument_0
- [native code]:null in flushedQueue
- [native code]:null in callFunctionReturnFlushedQueue
[Unhandled promise rejection: TypeError: handler is not a function. (In 'handler(nextState)', 'handler' is "connectionChange")]
- node_modules/@react-native-community/netinfo/src/internal/state.ts:65:9 in State#_handleInternetReachabilityUpdate
- [native code]:null in forEach
- http://127.0.0.1:19001/index.bundle?platform=ios&dev=true&minify=false&hot=false:226208:35 in
- http://127.0.0.1:19001/index.bundle?platform=ios&dev=true&minify=false&hot=false:226371:22 in
- node_modules/@react-native-community/netinfo/src/internal/internetReachability.ts:119:36 in Promise.race.then.then._catch$argument_0
- node_modules/promise/setimmediate/core.js:37:14 in tryCallOne
- node_modules/promise/setimmediate/core.js:123:25 in setImmediate$argument_0
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:146:14 in _callTimer
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:194:17 in _callImmediatesPass
- node_modules/react-native/Libraries/Core/Timers/JSTimers.js:458:30 in callImmediates
- [native code]:null in callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:407:6 in __callImmediates
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:143:6 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:142:17 in __guard$argument_0
- [native code]:null in flushedQueue
- [native code]:null in callFunctionReturnFlushedQueue
I am using
"expo": "~37.0.3",
"aws-appsync": "^3.0.3",
"aws-appsync-react": "^3.0.3",
"react-apollo": "2.5.8",
"@react-native-community/netinfo": "5.5.0".