JaneaSystems / nodejs-mobile

Full-fledged Node.js on Android and iOS
https://code.janeasystems.com/nodejs-mobile
Other
2.58k stars 182 forks source link

Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c #261

Open cdn34 opened 4 years ago

cdn34 commented 4 years ago

When I try to run gradlew build or gradlew assembleRelease. Most of the times I get either Assertion failed: (!uv__is_closing(handle)), function uv_close, file ../deps/uv/src/unix/core.c, line 120. or Assertion failed: (0), function uv_close, file ../deps/uv/src/unix/core.c, line 187.. Only a small minority of the times I run this, does it complete successfully.

I was also getting this when running the react-native app in dev mode (react-native run-android), but doing what's described here seemed to fix the issue. https://github.com/JaneaSystems/nodejs-mobile/issues/60#issuecomment-378088756

Does anyone have any idea how to fix this ?

jaimecbernardo commented 4 years ago

Hi @cdn34 , Looks like some script error while building. Since adding to ignoreAssetsPattern fixes the issue it's probably something related to a file your project is including. Might be something inside the nodejs-project node_modules. Have you got the actual log of the build?

cdn34 commented 4 years ago

Hey @jaimecbernardo, it's a bit weird that it doesn't fail all the time, it seems that if I don't try to build it for some it time it works, but when doing consecutive builds it starts to fail much more often to the point where running gradlew assembleRelease may take more than one hour to get a successful build.

Here is the log when it fails: Terminal Output - [Fail].txt npm log.txt

jaimecbernardo commented 4 years ago

It might be that some file is being locked by another process or that there's a part of the build that's asynchronous and you're running into a race condition. This looks like it might be specific to your project, but I'm not seeing what might be causing it.

Sushmagangaiah commented 4 years ago

this issue is sorted? even I am facing the same issue. Any fix for this?

jaimecbernardo commented 4 years ago

Hi @Sushmagangaiah , Is it replicated in a reliable manner. I haven't been able to reproduce this issue.

cdn34 commented 4 years ago

@Sushmagangaiah I no longer have the issue described here, my issue seemed to be related to my watchman installation. Doing a clean install fixed the issue for me.