react-native icon indicating copy to clipboard operation
react-native copied to clipboard

Possible Unhandled Promise Rejectio on android device

Open suhaotian opened this issue 10 years ago • 9 comments

Like #5338, it was closed. but the warn "Possible Unhandled Promise Rejectio" still alive on android device "Red mi" when I save file.

suhaotian avatar Apr 11 '16 18:04 suhaotian

Make sure that everywhere you have a promise chain, you're finalizing the chain by calling the non-standard .done()

e.g. fetch( someurl ).then( processdata ).catch( processerror).done()

If it turns out that EVERYWHERE you have a promise you have resolved the chain in this manner, then it's possible this is an RN bug, but I think it's more likely this warning is working as intended

mangogogos avatar Apr 12 '16 16:04 mangogogos

@mangogogos I run the original init project, it throw the warn message.problem like #5338 . it's closed, but I got same warn message again.

suhaotian avatar Apr 12 '16 16:04 suhaotian

Same here.

Warning Possible Unhandled Promise Rejection occurs in app running on android device whenever hot reloading happens.

Repro steps:

  1. Run react-native init someproject
  2. Ensure physical android device is plugged in
  3. cd someproject && react-native run-android

then on device

  1. Menu > Dev Settings > Debug server host & port for device
  2. Menu > Enable Hot Reloading
  3. Menu > Reload JS

Save file index.android.js and observe the warning.

Environment: react-native-cli: 0.2.0 react-native: 0.24.1 Android version: 4.4.4

xamfoo avatar Apr 28 '16 06:04 xamfoo

Have the same warning when hot reload is enabled even though it still updates the view.

Waning:

Possible Unhandled Promise Rejection (id:0):
Network request failed
onerror@http://10.0.0.1:8081/
index.android.bundle?platform=android&dev=true&hot=true&minfy=false:18405:21
_sendEvent@http://10.0.0.1:8081/
index.android.bundle?platform=android&dev=true&hot=true&minfy=false:17872:9
setReadyStatet@http://10.0.0.1:8081/
index.android.bundle?platform=android&dev=true&hot=true&minfy=false:17858:16
_didCompleteResponse@http://10.0.0.1:8081/
index.android.bundle?platform=android&dev=true&hot=true&minfy=false:17749:19
call@[native code]
@http://10.0.0.1:8081/
index.android.bundle?platform=android&

Environment: OS: Arch Linux Device: Samsung Galaxy S5 react-native-cli: 0.2.0 react-native: 0.25.1 Android SDK Tools 25.1.6 Android SDK Platform-tools: 23.1 Android SDK Build-tools: 23.0.3

otissv avatar May 18 '16 18:05 otissv

Same here.

OS: OSX Device: Huawei react-native-cli: 1.0.0 react-native: 0.27.2

inetfuture avatar Jun 22 '16 05:06 inetfuture

me too: OS: OSX Device: iphone6 react-native-cli: 1.0.0 react-native: 0.27.2&0.28

tonylinyy avatar Jun 22 '16 09:06 tonylinyy

Same here.

OS: OSX Device: Huawei react-native-cli: 1.0.0 react-native: 0.27.2

And it only happens when setting debug server host & port for device, no warning for adb reverse

inetfuture avatar Jun 22 '16 12:06 inetfuture

Hi there! This issue is being closed because it has been inactive for a while.

But don't worry, it will live on with ProductPains! Check out its new home: https://productpains.com/post/react-native/possible-unhandled-promise-rejectio-on-android-device

Product Pains has been very useful in highlighting the top bugs and feature requests: https://productpains.com/product/react-native?tab=top

Also, if this issue is a bug, please consider sending a pull request with a fix.

mkonicek avatar Oct 27 '16 21:10 mkonicek

+1

edwardofclt avatar Jan 06 '17 21:01 edwardofclt