You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Scanning folders for symlinks in /Users/tadeusz/Projects/kdv/parent-mobile-app/client/node_modules (35ms)
Environment:
OS: OS X El Capitan 10.11.6
Node: 10.5.0
Yarn: 1.2.1
npm: 6.1.0
Watchman: Not Found
Xcode: Not Found
Android Studio: 3.0 AI-171.4408382
Packages: (wanted => installed)
react: 16.3.1 => 16.3.1
react-native: https://github.com/expo/react-native/archive/sdk-28.0.0.tar.gz => 0.55.4
Description
We believe there is a bug somewhere in NativeModules or MessageQueue modules from BatchedBridge library.
In our application we are using Expo SDK v. 28.0.0 which maps to React Native 0.55.4. We run into a bug when calling Expo.FileSystem.downloadAsync which is indirectly calling genMethod from NativeModules of React Native BatchedBridge library. We are getting a Promise back and we are assigning then and catch callbacks to the returned promise. Neither of the callbacks is called.
We have been able to trace the calls down to genMethod function of NativeModules module from react-native package and it seems that the problem is rooted there, or more likely somewhere in BatchedBridge and MessageQueue modules that are being used there:
Here enqueueNativeCall method is called and executes without any apparent error, but neither of the callbacks set in enqueueNativeCall of NativeModules are ever called, which in consequence leaves the Promise never resolved.
We suspect that we have a bug in our code, specifically we do not ask for permissions to access native API. This however should result in some meaningful error. Instead our async logic flow is just lost without a trace. We believe this is a bug in React Native code rather than Expo.
Reproducible Demo
Application code sample:
Promise.resolve(null).then(()=>{console.log("Promise chain started");constpromise=FileSystem.downloadAsync(target,FileSystem.cacheDirectory)console.log(require('util').inspect(promise,{depth: null}));// We see the promise objectreturnpromise// We are silently loosing our flow here}).catch((error)=>{// this is never calledconsole.log("Error caught");console.log(require('util').inspect(error,{depth: null}));}).then((downloaded)=>{// this is never called either})
The text was updated successfully, but these errors were encountered:
This sounds like an error with the native code for this method not calling the appropriate callbacks on error. If so, that would mean it is an issue in Expo's native module code.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
stalebot
added
the
Stale
There has been a lack of activity on this issue and it may be closed soon.
label
Oct 31, 2018
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.
Environment
Description
We believe there is a bug somewhere in
NativeModules
orMessageQueue
modules fromBatchedBridge
library.In our application we are using Expo SDK v. 28.0.0 which maps to React Native 0.55.4. We run into a bug when calling
Expo.FileSystem.downloadAsync
which is indirectly callinggenMethod
fromNativeModules
of React NativeBatchedBridge
library. We are getting a Promise back and we are assigningthen
andcatch
callbacks to the returned promise. Neither of the callbacks is called.We have been able to trace the calls down to
genMethod
function ofNativeModules
module fromreact-native
package and it seems that the problem is rooted there, or more likely somewhere inBatchedBridge
andMessageQueue
modules that are being used there:Here
enqueueNativeCall
method is called and executes without any apparent error, but neither of the callbacks set inenqueueNativeCall
ofNativeModules
are ever called, which in consequence leaves the Promise never resolved.We suspect that we have a bug in our code, specifically we do not ask for permissions to access native API. This however should result in some meaningful error. Instead our async logic flow is just lost without a trace. We believe this is a bug in React Native code rather than Expo.
Reproducible Demo
Application code sample:
The text was updated successfully, but these errors were encountered: