devtools icon indicating copy to clipboard operation
devtools copied to clipboard

Need to connect from another machine

Open AcnodeLabs opened this issue 6 years ago • 9 comments

it works on local machine but not connectable from another machine

e.g from PC on same network trying

http://192.168.100.255:49787

AcnodeLabs avatar May 02 '19 04:05 AcnodeLabs

Do you have a running flutter app connected to both machines? If you have two different runs (one on each machine), the URI will also be different.

How are you running your Flutter app (i.e. InteilliJ, VS Code, command line)?

kenzieschmoll avatar May 02 '19 15:05 kenzieschmoll

My suspicion is that you'd have to set up ssh tunneling for this use case.

devoncarew avatar May 02 '19 15:05 devoncarew

Is there a way to configure the IP address on which the server is bound , as I see 127.0.0.1 is hardcoded , it should be flexible so user could change IP and port of the server

On Thu, May 2, 2019, 20:54 Devon Carew [email protected] wrote:

My suspicion is that you'd have to set up ssh tunneling for this use case.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flutter/devtools/issues/637#issuecomment-488728623, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAFIZ3WHMOPOOUV3NNC4CDPTMFBTANCNFSM4HJ3MTIA .

AcnodeLabs avatar May 02 '19 16:05 AcnodeLabs

The Dart VM Service currently only accepts connections that are coming from "localhost". Now that we have added a security token to the URLS the VM service accepts we may be able to relax this restriction. Stay tuned!

jacob314 avatar May 03 '19 02:05 jacob314

Thanks for your email. Is there a feature to visually build your UI ?

On Fri, May 3, 2019, 07:05 Jacob Richman [email protected] wrote:

The Dart VM Service currently only accepts connections that are coming from "localhost". Now that we have added a security token to the URLS the VM service accepts we may be able to relax this restriction. Stay tuned!

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/flutter/devtools/issues/637#issuecomment-488893104, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAFIZ5ALGTLB4SQBNZ7GYTPTOMXLANCNFSM4HJ3MTIA .

AcnodeLabs avatar May 03 '19 02:05 AcnodeLabs

Now that we have added a security token to the URLS the VM service accepts we may be able to relax this restriction. Stay tuned!

Is it possible to use devtools on chromeOS otherwise? ref

mockturtl avatar Dec 12 '19 17:12 mockturtl

Looks like my use case match this issue. I use flutter web, and the flutter web access a third party server that doesn't support cors. So my flutter web app cannot just run standalone it need some self server support to workaround cors. So I created my own node.js server that proxy to that third party. Now, in development, I start my web flutter from visual studio code and give it a fix port like 8080, and instead of pointing directly to this, I point to my node.js server that will forward the third party api and also the index.html to that live flutter app hosted on port 8080, so that I can pick-up fast changes to the flutter app. I run node.js server in docker, and so it's a different network, and so I end-up not able to connect from docker container to host ip (which is not localhost), at least on Mac.

SebTardif avatar Apr 17 '20 20:04 SebTardif

@DanTup does the recent work you've done to support remote workflows address this issue?

kenzieschmoll avatar Oct 17 '24 20:10 kenzieschmoll

I'm not sure I understand whether the request here is "be able to access DevTools that is hosted on another machine" or "connect a local DevTools to a VM service on another machine".

I think the first may by possible by using something like dart devtools --host=0.0.0.0 which instructs the DevTools server to bind to all IP addresses instead of only localhost, however for the latter I'm not sure is possible to Flutter (I don't see any flags on flutter run to control which IP the forwarding applies for).. For Dart it can be done with dart run --observe which also takes an IP/hostname.

The work I did recently was a little different, it was to support when there are two different IP addresses/hostnames for a service (eg. in a cloud IDE or VS Code remoting session, where localhost or a private IP address is not accessible to the end user, but there is an API provided by the IDE that can create a tunnel).

DanTup avatar Oct 18 '24 10:10 DanTup

Just had the same problem, and figured out a solution:

You only need a reverse proxy Localhost to local network port redirection on Windows

Krysl avatar Feb 22 '25 02:02 Krysl