{"action":"created","issue":{"url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/98","repository_url":"https://api.github.com/repos/janeasystems/nodejs-mobile","labels_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/98/comments","events_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/98/events","html_url":"https://github.com/janeasystems/nodejs-mobile/issues/98","id":345270563,"node_id":"MDU6SXNzdWUzNDUyNzA1NjM=","number":98,"title":"Run more than one js file","user":{"login":"pudility","id":13806068,"node_id":"MDQ6VXNlcjEzODA2MDY4","avatar_url":"https://avatars1.githubusercontent.com/u/13806068?v=4","gravatar_id":"","url":"https://api.github.com/users/pudility","html_url":"https://github.com/pudility","followers_url":"https://api.github.com/users/pudility/followers","following_url":"https://api.github.com/users/pudility/following{/other_user}","gists_url":"https://api.github.com/users/pudility/gists{/gist_id}","starred_url":"https://api.github.com/users/pudility/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pudility/subscriptions","organizations_url":"https://api.github.com/users/pudility/orgs","repos_url":"https://api.github.com/users/pudility/repos","events_url":"https://api.github.com/users/pudility/events{/privacy}","received_events_url":"https://api.github.com/users/pudility/received_events","type":"User","site_admin":false},"labels":[{"id":709328575,"node_id":"MDU6TGFiZWw3MDkzMjg1NzU=","url":"https://api.github.com/repos/janeasystems/nodejs-mobile/labels/iOS","name":"iOS","color":"c5def5","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-07-27T15:30:04Z","updated_at":"2018-07-30T07:35:59Z","closed_at":"2018-07-29T20:32:50Z","author_association":"NONE","body":"<!--\r\nThank you for reporting an issue.\r\n\r\nThis issue tracker is for bugs and issues found within Node.js core.\r\nIf you require more general support please file an issue on our help\r\nrepo. https://github.com/nodejs/help\r\n\r\n\r\nPlease fill in as much of the template below as you're able.\r\n\r\nVersion: output of `node -v`\r\nPlatform: output of `uname -a` (UNIX), or version and 32 or 64-bit (Windows)\r\nSubsystem: if known, please specify affected core module name\r\n\r\nIf possible, please provide code that demonstrates the problem, keeping it as\r\nsimple and free of external dependencies as you are able.\r\n-->\r\n\r\n* **Version**: v8.6.0\r\n* **Platform**: iOS 11.4\r\n\r\n<!-- Enter your issue details below this comment. -->\r\n\r\nMy issue / question is how to run more than one script. I would like to be able to run (either at the same time or one after another) two scrips. When I try to simply call `node_start` twice, it runs then gives me the following error:\r\n```\r\nAssertion failed: (handle->flags & UV_CLOSING), function uv__finish_close, file ../deps/uv/src/unix/core.c, line 244.\r\n(lldb) \r\n```\r\n\r\nHere is the full backtrace from lldb:\r\n```\r\n* thread #21, queue = 'com.apple.root.background-qos', stop reason = signal SIGABRT\r\n    frame #0: 0x0000000107da6b6e libsystem_kernel.dylib`__pthread_kill + 10\r\n    frame #1: 0x0000000107de0080 libsystem_pthread.dylib`pthread_kill + 333\r\n    frame #2: 0x0000000107a01c97 libsystem_c.dylib`abort + 127\r\n    frame #3: 0x00000001079cac03 libsystem_c.dylib`__assert_rtn + 320\r\n    frame #4: 0x0000000100d67367 NodeMobile`uv_run + 760\r\n    frame #5: 0x0000000100be8d07 NodeMobile`node::Start(v8::Isolate*, void*, int, char const* const*, int, char const* const*) + 664\r\n    frame #6: 0x0000000100bdcb6d NodeMobile`node::Start(uv_loop_s*, int, char const* const*, int, char const* const*) + 398\r\n    frame #7: 0x0000000100bdc5d6 NodeMobile`node::Start(int, char**) + 827\r\n  * frame #8: 0x00000001002a4d46 node-ios-ide`::+[NodeRunner startEngineWithArguments:](self=NodeRunner, _cmd=\"startEngineWithArguments:\", arguments=2 values) at NodeRunner.mm:57\r\n    frame #9: 0x00000001002a92b5 node-ios-ide`closure #1 in ViewController.runIndex(self=0x00007f9631d0b0e0) at ViewController.swift:124\r\n    frame #10: 0x00000001002ab21d node-ios-ide`partial apply for closure #1 in ViewController.runIndex() at ViewController.swift:0\r\n    frame #11: 0x00000001002a8a4d node-ios-ide`thunk for @escaping @callee_guaranteed () -> () at ViewController.swift:0\r\n    frame #12: 0x00000001078b17ab libdispatch.dylib`_dispatch_call_block_and_release + 12\r\n    frame #13: 0x00000001078b27ec libdispatch.dylib`_dispatch_client_callout + 8\r\n    frame #14: 0x00000001078be61d libdispatch.dylib`_dispatch_root_queue_drain + 1353\r\n    frame #15: 0x00000001078be076 libdispatch.dylib`_dispatch_worker_thread3 + 132\r\n    frame #16: 0x0000000107ddd169 libsystem_pthread.dylib`_pthread_wqthread + 1387\r\n    frame #17: 0x0000000107ddcbe9 libsystem_pthread.dylib`start_wqthread + 13\r\n```\r\n\r\nI don't know much about nodejs-mobile but, after looking into the error message, my guess is that this is because uv_close is being called on a handle that has already been closed (maybe exit wasn't called?)."},"comment":{"url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/comments/408774014","html_url":"https://github.com/janeasystems/nodejs-mobile/issues/98#issuecomment-408774014","issue_url":"https://api.github.com/repos/janeasystems/nodejs-mobile/issues/98","id":408774014,"node_id":"MDEyOklzc3VlQ29tbWVudDQwODc3NDAxNA==","user":{"login":"jaimecbernardo","id":26118718,"node_id":"MDQ6VXNlcjI2MTE4NzE4","avatar_url":"https://avatars2.githubusercontent.com/u/26118718?v=4","gravatar_id":"","url":"https://api.github.com/users/jaimecbernardo","html_url":"https://github.com/jaimecbernardo","followers_url":"https://api.github.com/users/jaimecbernardo/followers","following_url":"https://api.github.com/users/jaimecbernardo/following{/other_user}","gists_url":"https://api.github.com/users/jaimecbernardo/gists{/gist_id}","starred_url":"https://api.github.com/users/jaimecbernardo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaimecbernardo/subscriptions","organizations_url":"https://api.github.com/users/jaimecbernardo/orgs","repos_url":"https://api.github.com/users/jaimecbernardo/repos","events_url":"https://api.github.com/users/jaimecbernardo/events{/privacy}","received_events_url":"https://api.github.com/users/jaimecbernardo/received_events","type":"User","site_admin":false},"created_at":"2018-07-30T07:35:59Z","updated_at":"2018-07-30T07:35:59Z","author_association":"MEMBER","body":"Hi @pudility ,\r\nIt's one of the ways to do it, using streams and pipes for in process communication.\r\nIt's also possible to implement a native code communication channel, like it's implemented in the [nodejs-mobile-react-native](https://github.com/janeasystems/nodejs-mobile-react-native) and [nodejs-mobile-cordova](https://github.com/janeasystems/nodejs-mobile-cordova) plugins. That's one way to get a more flexible communication channel."}}
{"actor":{"display_login":"jaimecbernardo"}}