Fork me on GitHub
#portal
<
2022-01-08
>
Adam Helins20:01:02

Hey! I am a fan of portal and have been using it quite a bit when I was on Linux. But I switched recently to MacOS and noticed that p/openis broken. When trying to open as a tab, nothing seems to happen. When open in a new window (default), a new chrome window opens with a blank page. The CLI works however (a chrome window opens with the proper UI). Any idea? 🙏

djblue20:01:23

Hi there @UCFG3SDFV, are there any errors in the browser console?

djblue20:01:59

I think sometimes bumping a version can cause issues with how some of the resources are loaded

djblue20:01:30

If you are using shadow-cljs, try clearing the .shadow-cljs directory

djblue20:01:07

My e2e tests seem to work on osx on node

Adam Helins21:01:34

No error, it's literally a blank window with a blank console. I didn't bump the version nor change the code, simply executing it from osx. I blew up .shadow-cljsas well as .cpcachejust in case, didn't change anything 😞

djblue21:01:17

Okay, good to know. What version are you using?

Adam Helins21:01:05

Initially 0.18.1, same with 0.19.2

Adam Helins21:01:56

osx 12.1 (M1 Max)

Adam Helins21:01:56

The CLI uses open LINKright? Any reason p/openhas to use Chrome?

djblue21:01:16

If you pass in :portal.launcher/app false, it should open in your default browser

Adam Helins21:01:19

Nope, it opens Chrome whereas my default browser is Brave. And indeed, when I was reading the code, albeit quickly I confess, it was about (find-chome-bin)or something like that :thinking_face:

Adam Helins22:01:42

And the CLI works because it relies on calling open LINK in the shell which does just that, open the default browser At least that was my quick conclusion

Adam Helins22:01:40

Right, on Linux passing false resulted in a tab being opened in my current (and default browser), true But now on osx nothing happens 😕 It must be something silly

Adam Helins22:01:35

What node version are you using?

djblue22:01:35

I'm running v16.13.0 of node

djblue22:01:24

Is (.-platform js/process) for m1 macs still "darwin" ?

Adam Helins22:01:09

Yes, that was my hunch too but it's still "darwin"`

Adam Helins22:01:15

An earlier node version works

Adam Helins22:01:29

But v17.3.0 doesn't

djblue22:01:48

Okay, I'll try that version and see what happens :thumbsup:

Adam Helins22:01:03

I knew it was something silly! But I've been installing stuff whole day, i didn't consider node could misbehave on something like that Thanks for your help 👌

djblue23:01:27

Ohh, I see the issue. The url being generated is http://::1:49587?fa260c66-f2c4-453c-8df5-9eea6db5262c . Not sure why the node http server is returning ::1 instead of 127.0.0.1

Adam Helins23:01:21

Ah yes, makes sense 🙂

djblue23:01:08

Thanks again for the bug report!

Adam Helins08:01:23

And thanks for the fix!

Adam Helins20:01:45

(running on node)