Fork me on GitHub
#cljsrn
<
2019-11-19
>
conan18:11:08

hi native people, i've been following this excellent guide to get started: https://github.com/PEZ/rn-rf-shadow this means i'm running react native with expo and shadow-cljs. problem is, shadow-cljs keeps shutting down its workers on me, and when it does it kills internet access for my entire machine. i have to go an terminate a couple of processes simply called "init" to get things back again. any clues as to why? i'm running with shadow-cljs watch app and expo start. i'm running in WSL/Ubuntu shadow-cljs cli version: 2.8.67 expo 3.8.0 node: v12.13.1

thheller18:11:36

@conan can you define "shadow-cljs keeps shutting down its workers on me"? that is definitely not normal?

conan18:11:15

I keep trying to grab a stack trace and losing it. It says “worker shutting down” or similar and dumps a socket connect error stack trace. I’ll get one and post back, but I’m not doing anything intentional to trigger the shutdown

thheller18:11:47

maybe try upgrading to the latest version. that no longer does the socket tests

thheller18:11:05

2.8.72 that is

conan18:11:14

Oh I didn’t realise I wasn’t on it, yeah I’ll try

conan18:11:20

:man-facepalming:

thheller18:11:54

to be clear though this shouldn't have happened on earlier versions either

thheller19:11:14

but others have reported this error happening recently

thheller19:11:49

but I was never able to reproduce

thheller19:11:07

nobody has reported such drastic effects before though

conan08:11:52

I know right, I'm amazed it's even possible. Must be killing something that handles networking.

conan09:11:08

I haven't been able to get the same exit stack trace, but compilation still stops at some point, and as before, if I try to run shadow-cljs watch app again I get this error:

$ shadow-cljs watch app
shadow-cljs - config: /c/Users/conan/dev/rn-rf-shadow/shadow-cljs.edn  cli version: 2.8.67  node: v12.13.1
shadow-cljs - starting via "clojure"
node-server err Error: listen EINVAL: invalid argument 0.0.0.0
    at Server.setupListenHandle [as _listen2] (net.js:1284:19)
    at listenInCluster (net.js:1349:12)
    at Server.listen (net.js:1437:7)
    at Sn (/c/Users/conan/dev/rn-rf-shadow/node_modules/shadow-cljs/cli/dist/shadow.cljs.npm.cli.js:98:105)
    at lp (/c/Users/conan/dev/rn-rf-shadow/node_modules/shadow-cljs/cli/dist/shadow.cljs.npm.cli.js:124:334)
    at Object.main (/c/Users/conan/dev/rn-rf-shadow/node_modules/shadow-cljs/cli/dist/shadow.cljs.npm.cli.js:182:399)
    at Object.<anonymous> (/usr/local/lib/node_modules/shadow-cljs/cli/runner.js:48:7)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
    at Module.load (internal/modules/cjs/loader.js:815:32) {
  code: 'EINVAL',
  errno: 'EINVAL',
  syscall: 'listen',
  address: '0.0.0.0'
}
I have to terminate all the init processes before I can run this again (or indeed, to get my internet back).

conan09:11:31

just gonna try updating shadow-cljs now

thheller09:11:19

very strange indeed. but yeah in the newer version that entire code running there doesn't exist anymore

conan12:11:45

haven't seen this happening randomly since an upgrade, but the EINVAL error does now happen when i ctrl+c to shutdown. that doesn't really matter though