The preview app on Android won't connect to the server

After I run a fuse preview, I get this:

Preview detected an unhandled exception: Outracks.Simulator.FailedToConnectToProxy: Failed to connect to proxy:
03-26 16:24:18.596 32242 32242 I Pair    :     127.0.0.1:12124: Connection refused
03-26 16:24:18.596 32242 32242 I Pair    :     192.168.0.101:12124: No route to host
03-26 16:24:18.596 32242 32242 I Pair    :    at Outracks.Simulator.ProxyClient.OnNoResult(Uno.Collections.IEnumerable<Uno.Exception>)
03-26 16:24:18.596 32242 32242 I Pair    :    at Outracks.Simulator.WaitForFirstResult1.Execute()
03-26 16:24:18.596 32242 32242 I Pair    :    at Outracks.Simulator.TaskThread1.Run()
03-26 16:24:20.922 32242 32242 I Pair    : non-square point density: 1.081081, 1

If I click “Try again” in the app, same thing. The IP is correct (I wouldn’t even get a reaction if it weren’t anyway). Worth mentioning that the exact same app with the exact same code could be previewed earlier this week with no issue.

Hi Cyril,

Is this happening both for local preview and preview on device? Which operating system and Fuse version are you using?

Hi Anders, only the on-device preview. OS X 10.11.3, Fuse is Fuse version 0.9.11 (build 5893)

Are you sure that your device is on the same network as your computer? If not, please ensure that you are.

Could it be that you have two active networks on your computer? If so, try to disable one of them.

Coult it be that your device is set up to share its network with the computer (tethering)? If so, try to disable it.

Hi all,

Same problem here. I’m stuck in this issue for the last two hours trying different things but they don’t work. It was working two days ago but now nothing.

I tried all the recommendations I found in this forum, slack, etc.

Preview - Failed to connect

While previewing on an iOS or Android device, you get the message “Failed to connect”

Solution

  • Make sure your device has WiFi enabled
  • Make sure your device is connected to the same WiFi as the computer running Fuse
  • If your computer is running a firewall (such as Windows Firewall), make sure Fuse is allowed to accept incoming connections
  • If you have tethering enabled on your Android device (sharing the mobile network over USB), try disabling it
  • If you still have the problem, quit Fuse from the tray / menu bar icon and re-start preview

Everything is ok but I still have that error “Failed to Connect”. I even reinstalled FUSE in my laptop. What can I do MORE?

Thank you,
Fernando

I could never resolve this issue entirely, because the problem comes from my WiFi router and its firewall that I cannot manage. Your issue might not be Fuse-related, but network related.

Hi Cyril,

Thank you for your reply. You are right, I’m testing in a different Android Device with the same issue so it looks like something changes in my WIFI router or whatever.

Thank you,
Fernando

For the record: I have had this issue with one of my routers at home running on an iOS device. Never with the Airport Extreme at the office. Killing all processes and performing uno clean has helped, but not sure if it worked every time.

Fuse 0.25

Hi, if any of you are on the Community Slack, please contact me (@knatten) so we can try a work around.

Anders! I am on Slack, but about to travel so we could try next week.

Ok, talk to you then! :slight_smile:

Hi All,

Same issue. Having “Connection refused” issue since a while (happened overnight) so I have to recompile the entire project at every change…

Thanks for your support

Hi Marc,

Have you tried the steps in https://www.fusetools.com/docs/basics/faq#preview-failed-to-connect?

Hi Anders,

Thanks for the reply; yes I did try those steps but the problem persists.
My firewall is off (Mac). I scanned my external IP address on 12124 port and it is opened.
I have restarted both my computer and phone.
No tethering.

Does local preview work?

What happens if you do telnet <your public ip> 12124? If Fuse is working properly you should just get a blinking cursor, and when you press enter you get back to the command line. If however you get any error message, please paste it here.

Do you have another computer available on the same network, from which you could try to run the same command?

Hi Anders,

Local preview doesn’t work (but uno clean + fuse build -tandroid + adb install works on the device):

Compiling syntax tree
Preview/Camera/CameraExtended.uno(35.12): E3104: 'Camera' does not contain a member called 'SingleTap'. Could you be missing a package reference?
/Users/marcmelooliver/Coding/Fuse/NailVi/Preview/Camera/CameraExtended.uno(35,13,35,22): Error E3104: 'Camera' does not contain a member called 'SingleTap'. Could you be missing a package reference?
Preview/Camera/CameraVisual.uno(48.12): E3104: 'Camera' does not contain a member called 'ToggleFlash'. Could you be missing a package reference?
/Users/marcmelooliver/Coding/Fuse/NailVi/Preview/Camera/CameraVisual.uno(48,13,48,24): Error E3104: 'Camera' does not contain a member called 'ToggleFlash'. Could you be missing a package reference?
Preview/Camera/CameraVisual.uno(54.12): E3104: 'Camera' does not contain a member called 'SingleTap'. Could you be missing a package reference?
/Users/marcmelooliver/Coding/Fuse/NailVi/Preview/Camera/CameraVisual.uno(54,13,54,22): Error E3104: 'Camera' does not contain a member called 'SingleTap'. Could you be missing a package reference?
MainView.uno(10.43): E3107: Uno.Permissions.Permissions does not contain a member called 'Request'. Could you be missing a package reference?
/Users/marcmelooliver/Coding/Fuse/NailVi/MainView.uno(10,44,10,51): Error E3107: Uno.Permissions.Permissions does not contain a member called 'Request'. Could you be missing a package reference?
MainView.uno(17.45): E3107: Uno.Permissions.Permissions does not contain a member called 'Request'. Could you be missing a package reference?
/Users/marcmelooliver/Coding/Fuse/NailVi/MainView.uno(17,46,17,53): Error E3107: Uno.Permissions.Permissions does not contain a member called 'Request'. Could you be missing a package reference?

SingleTap and ToggleFlash are two methods I added to the CameraPanel project. (still they work well if I compile/test on android).

telnet is not generating a blinking cursor nor error message :confused: pressing enter inserts an empty line. Same behaviour in another PC on the same network.

Ok, this looks like two separate issues. Let’s try to get the basics working first. If you do fuse create app MyApp, you’ll get an empty app that is easier to use for debugging. Then try to do a local preivew of that (fuse preview) and let me know how it goes.

By the way, which version of OS X and Fuse are you running?

Ok. This works: white screen on simulator.

I’m using OSX 10.12.1 and Fuse 0.28.1 (updating it now to 0.29)

That’s good! Can you try fuse preview -tandroid on that project?

Ok, getting the 127.0.0.1:12124: Connection refused issue