@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)
I'll tried on real device later.
FYI Same behavior on Android device. I restart the tutorial at the beginning to check if I miss something.
Nope, always block. Anyone had success with Android ? Emulator/Real devices ?
I've tested using Pixel 3, older simulators have issues w/ the mDNS code
the REPL stuff is really only about dev so it's not a big deal - not going to include that stuff normally
@admin055 ^ what simulator are you using?
Also it's important even with a newer simulator for a reasonably fast connect to start the REPL first, then launch the build
@admin055 also maybe that port is already taken? there's not a way to choose that at the moment
@dnolen Thank you for the clarification. The emulator tested was Nexus 5x, I try the Pixel 3 right now.
FYI, the real devices is Xiamo Redmi note 7
Nope, failed with the Pixel 3 emulator too. I'll investigated further later. Thx
@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
@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?
@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
I could change the code to randomly bind a port range - will look into that later and let you know
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…
@admin055 ah k, was missing that information - there are other reasons why mDNS might not work
@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.
Has anyone hit a situation where krell.main gets stuck at “searching for devices…” and KrellRoot’s state is never loaded?
[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."}
Sorry, @admin055 just pointed out he mentioned this above :face_palm:
Yes me. You can read the last exchanges about this on this channel https://clojurians.slack.com/archives/C0E1SN0NM/p1587110780149800
Seems do you run on Iphone, right?
yeah, but I’m vaguely sure I have something else on 500x
turns out not… was thinking of 700x I’m on MacOS Catalina and iphone simulator
@admin055 I have a coworker who has a similar problem on Android, will see if I can get to the bottom of this
@dnolen if it helps at all I have the same issue; MacOS, iOS
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)
[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
Actually it’s not quite the same issue, soz!
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
k great
Hello all, can I ask a thing about Krell here?
@fabrao just ask, don’t ask to ask :)
@fabrao yep, now that Krell is out out door, I'll be hanging out here keeping a lookout for issues & answering questions
I didn´t understand this
That means, that the line above what you’ve circled, the argument passed to the switch -m
should be krell.main
.
oh, I thought about writing krell.main
file, sorry about that
Basically what that says is: “just copy and paste what I wrote above”
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".
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 🙂
using reagent
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.