The Expo app React JS Exception
amitsrivastava78 opened this issue · comments
Dear @cyrildiagne ,
I have downloaded your project on my Ubuntu laptop version Ubuntu 18.04.4 LTS.
I have been able to do following things successfully
- I have started the Basenet web service (on my Local Ubuntu Laptop)
- I was able to start your Server(on my Local Ubuntu Laptop) and connect to the Basenet web service successfully
- I made the app run and started the Android App (on My Honor Device) , I can see that 200 ok comes both in server and Basenet Web server ensuring the connection is ok.
But on the Android App , there is only dark screen with white dots, I can see following exception in react JS.
[Unhandled promise rejection: Error: Preview is paused - resume it before taking a picture.]
- node_modules/react-native/Libraries/BatchedBridge/NativeModules.js:99:50 in fn
- node_modules/@unimodules/react-native-adapter/build/NativeModulesProxy.js:15:46 in moduleName.methodInfo.name
- http://192.168.1.11:19003/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:125673:76 in takePictureAsync$
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:274:30 in invoke
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:135:28 in invoke
- node_modules/regenerator-runtime/runtime.js:170:17 in PromiseImpl$argument_0
- 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/regenerator-runtime/runtime.js:169:31 in PromiseImpl$argument_0
- node_modules/regenerator-runtime/runtime.js:192:38 in enqueue
- node_modules/regenerator-runtime/runtime.js:219:8 in exports.async
- http://192.168.1.11:19003/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:125667:42 in takePictureAsync
- App.tsx:65:2 in cut
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:274:30 in invoke
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:135:28 in invoke
- node_modules/regenerator-runtime/runtime.js:170:17 in PromiseImpl$argument_0
- 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/regenerator-runtime/runtime.js:169:31 in PromiseImpl$argument_0
- node_modules/regenerator-runtime/runtime.js:192:38 in enqueue
- node_modules/regenerator-runtime/runtime.js:219:8 in exports.async
- http://192.168.1.11:19003/node_modules/expo/AppEntry.bundle?platform=android&dev=true&minify=false&hot=false:124988:40 in cut
- App.tsx:135:2 in onPressIn
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:274:30 in invoke
- node_modules/regenerator-runtime/runtime.js:45:44 in tryCatch
- node_modules/regenerator-runtime/runtime.js:135:28 in invoke
- node_modules/regenerator-runtime/runtime.js:170:17 in PromiseImpl$argument_0
- 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/regenerator-runtime/runtime.js:169:31 in PromiseImpl$argument_0
- node_modules/regenerator-runtime/runtime.js:192:38 in enqueue
- node_modules/regenerator-runtime/runtime.js:219:8 in exports.async
- App.tsx:135:2 in onPressIn
- node_modules/react-native/Libraries/Components/Touchable/TouchableWithoutFeedback.js:217:49 in createReactClass$argument_0.touchableHandleActivePressIn
- [native code]:null in touchableHandleActivePressIn
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:894:75 in TouchableMixin._startHighlight
- [native code]:null in _startHighlight
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:858:27 in TouchableMixin._performSideEffectsForTransition
- [native code]:null in _performSideEffectsForTransition
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:779:44 in TouchableMixin._receiveSignal
- [native code]:null in _receiveSignal
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:718:24 in TouchableMixin._handleDelay
- [native code]:null in _handleDelay
- node_modules/react-native/Libraries/Components/Touchable/Touchable.js:471:24 in TouchableMixin.touchableHandleResponderGrant
- [native code]:null in touchableHandleResponderGrant
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:814:48 in executeDirectDispatch
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2274:49 in setResponderAndExtractTransfer
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2404:10 in ResponderEventPlugin.extractEvents
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:1071:8 in extractPluginEvents
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:1091:4 in runExtractedPluginEventsInBatch
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2796:6 in batchedUpdates$argument_0
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18791:14 in batchedUpdates$1
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2709:30 in batchedUpdates
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2794:17 in batchedUpdates$argument_0
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2870:28 in receiveTouches
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:436:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:111:26 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:110:17 in __guard$argument_0
- [native code]:null in callFunctionReturnFlushedQueue
Since i have no understanding of ReactJS , would be great to get help to resolve this issue.
Regards
Amit
One more thing if i comment line 138 and 142 then exception does not occur
https://github.com/cyrildiagne/ar-cutpaste/blob/master/app/App.tsx#L138
https://github.com/cyrildiagne/ar-cutpaste/blob/master/app/App.tsx#L142
but still functionality of taking image does not work. Hope to get some help in this regards
Regards
Amit
I also take the same problems , hope reslove.
@luorixiangyang thanks, could you please let me know, which machine and mobile you are using?