https://kotlinlang.org logo
Title
r

Raphael TEYSSANDIER

05/15/2023, 9:50 PM
I have an app in
compose-multiplatform
in
Android
,
iOS
&
Desktop
. The app works in
Android
&
iOS
but in
Desktop
I get:
java.net.ConnectException: Failed to connect to localhost/127.0.0.1:80
c

Casey Brooks

05/15/2023, 10:00 PM
There’s very little info to go on here, what are you trying to do that’s making the failing network call? What libraries are you using to make the call? And is there any difference in the configuration of your network client across the 3 targets? The only thing I could guess from this message is that maybe you meant to use port
8080
instead of
80
?
r

Raphael TEYSSANDIER

05/15/2023, 10:07 PM
I don’t use port, I use a plain url. I’m trying to do the same process as Android & iOS. Nothing change. I use
ktor
with
OkHttp
for both Android & Desktop.
I don’t know where localhost/127.0.0.1:80 comes from
c

Casey Brooks

05/15/2023, 10:09 PM
What URL are you hitting on Android that’s working? Could you share a code snippet of how you’re making the call?
r

Raphael TEYSSANDIER

05/15/2023, 10:10 PM
Nevermind, forgot to setup a little thing on desktop side. Now correct url is called, but I need to enable cookies for desktop with
ktor