Fork me on GitHub
#cljsrn
<
2020-04-17
>
Michaël Salihi08:04:20

@dnolen Hi, I just tried the Krell/Reagent tutorial and nothing happens after "Searching for devices...". I use Android emulator, the app launch and it display "Waiting for Krell to load files.". Maybe Metro log can help

[Fri Apr 17 2020 10:00:06.583]  BUNDLE  ./index.js 

[Fri Apr 17 2020 10:00:08.154]  LOG      Running "AwesomeProject" with {"rootTag":141}
[Fri Apr 17 2020 10:00:08.159]  LOG      Scan started
[Fri Apr 17 2020 10:00:08.161]  LOG      Service resolved: {"txt":{},"port":5003,"fullName":"192.168.232.2._http._tcp","addresses":["192.168.232.2"],"host":"192.168.232.2","name":"krell.replAwesomeProject goldfish_x86"}
[Fri Apr 17 2020 10:00:08.162]  LOG      Service resolved: {"txt":{},"port":5003,"fullName":"192.168.232.2._http._tcp","addresses":["192.168.232.2"],"host":"192.168.232.2","name":"krell.replAwesomeProject goldfish_x86"}
[Fri Apr 17 2020 10:00:08.163]  LOG      An error ocurred with the server bind failed: EADDRINUSE (Address already in use)

Michaël Salihi08:04:08

I'll tried on real device later.

Michaël Salihi09:04:35

FYI Same behavior on Android device. I restart the tutorial at the beginning to check if I miss something.

Michaël Salihi09:04:44

Nope, always block. Anyone had success with Android ? Emulator/Real devices ?

dnolen10:04:56

I've tested using Pixel 3, older simulators have issues w/ the mDNS code

dnolen10:04:24

the REPL stuff is really only about dev so it's not a big deal - not going to include that stuff normally

dnolen10:04:41

@admin055 ^ what simulator are you using?

dnolen10:04:10

Also it's important even with a newer simulator for a reasonably fast connect to start the REPL first, then launch the build

dnolen10:04:33

@admin055 also maybe that port is already taken? there's not a way to choose that at the moment

Michaël Salihi11:04:16

@dnolen Thank you for the clarification. The emulator tested was Nexus 5x, I try the Pixel 3 right now.

Michaël Salihi11:04:01

FYI, the real devices is Xiamo Redmi note 7

Michaël Salihi11:04:54

Nope, failed with the Pixel 3 emulator too. I'll investigated further later. Thx

dnolen12:04:08

@admin055 thanks, any feedback here much appreciated - I'm not Android expert and in general my experience so far is that it's a bit trickier to support

Michaël Salihi12:04:15

@dnolen You're welcome, it's a pleasure to test these new features. Thanks to you. Maybe a track to trying help to debug? The IP address showing in "Service resolved" message must not be pingable, right? Because of the 5003 port forwarding?

dnolen12:04:28

@admin055 the EADDRINUSE seems to indicate the 5003 is already bound by some other service on your machine - you might want to look into that

dnolen12:04:05

I could change the code to randomly bind a port range - will look into that later and let you know

dotemacs12:04:02

Maybe if you run netstat -an | grep 5003 or lsof -i :5003 you can see if that port is taken @admin055. If it is, kill the process that is taking it up…

Michaël Salihi12:04:15

@dnolen @dotemacs I think we can dismiss this track, the 5003 port is definitly free before the adb forward tcp:5003 tcp:5003 I don't have EADDRINUSE message on first start, only when I manually reload the app.

dnolen12:04:28

@admin055 ah k, was missing that information - there are other reasons why mDNS might not work

Michaël Salihi13:04:15

@dnolen Yeah, I will also go in the direction of mDNS. Maybe because my OS is Ubuntu Linux has something to do with it? Normally not, the avahi and Zeronconf services are installed by default.

donavan13:04:05

Has anyone hit a situation where krell.main gets stuck at “searching for devices…” and KrellRoot’s state is never loaded?

donavan14:04:46

[Fri Apr 17 2020 15:03:09.140]  LOG      Scan started
[Fri Apr 17 2020 15:03:09.160]  LOG      Service resolved: {"port":5002,"txt":{},"addresses":["127.0.0.1","::1","fe80::1","192.168.10.117","fe80::ce4:2fc2:9893:4314"],"name":"krell.replAwesomeProject iPhone12,1","fullName":"donavan.local._http._tcp.","host":"donavan.local."}
[Fri Apr 17 2020 15:03:09.170]  LOG      An error ocurred with the server Error in bind() function
[Fri Apr 17 2020 15:03:09.180]  LOG      Running "AwesomeProject" with {"rootTag":91,"initialProps":{}}
[Fri Apr 17 2020 15:03:09.950]  WARN     socketDidDisconnect with nil clientDelegate for 0
[Fri Apr 17 2020 15:03:09.191]  LOG      Service resolved: {"port":80,"txt":{},"addresses":["192.168.10.178","fe80::9232:4bff:feba:135f"],"name":"Brother HL-L2350DW series","fullName":"BRW90324BBA135F.local._http._tcp.","host":"BRW90324BBA135F.local."}

donavan14:04:33

Sorry, @admin055 just pointed out he mentioned this above :face_palm:

Michaël Salihi14:04:43

Yes me. You can read the last exchanges about this on this channel https://clojurians.slack.com/archives/C0E1SN0NM/p1587110780149800

Michaël Salihi14:04:09

Seems do you run on Iphone, right?

donavan14:04:22

yeah, but I’m vaguely sure I have something else on 500x

donavan14:04:09

turns out not… was thinking of 700x I’m on MacOS Catalina and iphone simulator

dnolen14:04:40

@admin055 I have a coworker who has a similar problem on Android, will see if I can get to the bottom of this

donavan14:04:25

@dnolen if it helps at all I have the same issue; MacOS, iOS

donavan14:04:25

@dnolen if it helps at all I have the same issue; MacOS, iOS

donavan14:04:51

sudo lsof -nP -iTCP:5002
Password:
COMMAND     PID    USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
AwesomePr 29399 donavan   34u  IPv4 0xbe4674c95bcce237      0t0  TCP *:5002 (LISTEN)
AwesomePr 29399 donavan   35u  IPv6 0xbe4674c960b5a587      0t0  TCP *:5002 (LISTEN)

donavan14:04:27

[Fri Apr 17 2020 15:31:19.440]  LOG      Scan started
[Fri Apr 17 2020 15:31:19.441]  LOG      An error ocurred with the server Error in bind() function
[Fri Apr 17 2020 15:31:19.442]  LOG      Running "AwesomeProject" with {"rootTag":11,"initialProps":{}}
[Fri Apr 17 2020 15:31:19.551]  LOG      Service resolved: {"port":5002,"txt":{},"addresses":["127.0.0.1","::1","fe80::1","192.168.10.117","fe80::ce4:2fc2:9893:4314"],"name":"krell.replAwesomeProject iPhone12,1","fullName":"donavan.local._http._tcp.","host":"donavan.local."}
[Fri Apr 17 2020 15:31:19.616]  LOG      Service resolved: {"port":80,"txt":{},"addresses":["192.168.10.178","fe80::9232:4bff:feba:135f"],"name":"Brother HL-L2350DW series","fullName":"BRW90324BBA135F.local._http._tcp.","host":"BRW90324BBA135F.local."}
[Fri Apr 17 2020 15:31:29.240]  WARN     socketDidDisconnect with nil clientDelegate for 0

donavan14:04:32

Actually it’s not quite the same issue, soz!

donavan14:04:27

OK I got it working. After pressing ‘r’ in the metro terminal krell.main gave me the option of device and after choosing I have a repl and the app loads in the simulator

fabrao16:04:23

Hello all, can I ask a thing about Krell here?

dotemacs16:04:49

@fabrao just ask, don’t ask to ask :)

dnolen16:04:51

@fabrao yep, now that Krell is out out door, I'll be hanging out here keeping a lookout for issues & answering questions

fabrao17:04:57

I didn´t understand this

dotemacs17:04:49

That means, that the line above what you’ve circled, the argument passed to the switch -m should be krell.main.

fabrao17:04:02

oh, I thought about writing krell.main file, sorry about that

dotemacs17:04:36

Basically what that says is: “just copy and paste what I wrote above”

fabrao17:04:20

I´d like to try using it because re-natal is too complex if you want to import some external lib, and if I can help about "lookout for issues & answering questions".

fabrao17:04:14

And I try to use it with #helix , because I want to hire some people from JS React Native, and it works like the original JS React Native and don´t burn his brains out with Clojurescript 🙂

fabrao17:04:49

using reagent

mfikes21:04:06

I discovered that, if Krell is stuck waiting to discover devices in and you have a Krell-enabled app running in the iOS simulator, then turning off WiFi can help discovery.