QUESTION: wrap the measure function with promise works perfect on debug but crashes on release build #16584
Labels
Stale
There has been a lack of activity on this issue and it may be closed soon.
Is this a bug report?
NO
Have you read the Contributing Guidelines?
YES
Environment
Environment:
OS: macOS High Sierra 10.13
Node: 6.6.0
Yarn: 0.19.1
npm: 3.10.3
Watchman: 4.3.0
Xcode: Xcode 9.0.1 Build version 9A1004
Android Studio: 2.3 AI-162.4069837
Packages: (wanted => installed)
react: 16.0.0-alpha.6 => 16.0.0-alpha.12
react-native: ^0.49.0 => 0.49.3
Steps to Reproduce
Add this function:
Add the call:
let res = await measureView(this.refs[``].measure.bind(this));
-- ON DEBUG --
-- ON RELEASE --
:47:41.651 4219-4256/? E/UncaughtException: com.facebook.react.bridge.NativeArgumentsParseException: TypeError: expected dynamic type
double', but had typenull' (constructing arguments for UIManager.measure at argument index 0) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:357) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) at android.os.Looper.loop(Looper.java:154) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) at java.lang.Thread.run(Thread.java:761) Caused by: com.facebook.react.bridge.UnexpectedNativeTypeException: TypeError: expected dynamic type
double', but had typenull' at com.facebook.react.bridge.ReadableNativeArray.getDouble(Native Method) at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:66) at com.facebook.react.bridge.JavaMethodWrapper$4.extractArgument(JavaMethodWrapper.java:62) at com.facebook.react.bridge.JavaMethodWrapper.invoke(JavaMethodWrapper.java:350) at com.facebook.react.bridge.JavaModuleWrapper.invoke(JavaModuleWrapper.java:162) at com.facebook.react.bridge.queue.NativeRunnable.run(Native Method) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at com.facebook.react.bridge.queue.MessageQueueThreadHandler.dispatchMessage(MessageQueueThreadHandler.java:31) at android.os.Looper.loop(Looper.java:154) at com.facebook.react.bridge.queue.MessageQueueThreadImpl$3.run(MessageQueueThreadImpl.java:194) at java.lang.Thread.run(Thread.java:761)
Expected Behavior
To behave as running on debug.
Actual Behavior
Crashes.
The text was updated successfully, but these errors were encountered: