Meteor not working over LAN Wifi


#1

Hello everyone,

I just started working with meteor recently, specifically testing with the example Todo-app.

When I ran it on the computer, surely everything is running smoothly.
However when I tried to access the web page from another device it cannot show lots of element (as seen in the picture bellow viewing the app from Safari on Iphone).
Also, other PCs connecting through wifi cannot show also.

Please give me some recommendations on how to solve this.
Thank you very much.


#2

Your best bet here is probably going to be connecting the web inspector in your desktop browser to your phones browser and checking to see what errors come up.


#3

Does the same issue happen on a PC connected via wifi? Your LAN wifi might be injecting JS (MITM style) and it’s breaking your app. I’ve seen it plenty times before but usually mobile data providers.


#4

Thank you, I’ll try that


#5

Thank you very much for the reply. Yes the same issue happen on a PC. If that should be the case do you have any recommendation.


#6

On PC in the browser inspector console do you see any errors?

If it is something being injected, you want that to stop happening.
99% of the time it is malware. (i can’t think of any legitimate use for this behaviour)


If you are not in control of the LAN and are not going to have any luck, the best option is to deploy via HTTPS.


#7

Thank you so much for the recommendation. Sorry for the late reply. I had to go ask my friend to lend me his PC to check.
In the console I got this

Do you have any idea what might have happened


#8

A new problem occurs such that I only have a Windows PC, which doesn’t have Safari 6 to do web inspector. Do you have any recommendation on other ways that I can detect problems on the phone’s browser? Thank you


#9

This might be of help…


#10

I’ve just released a new version of socket-stream-client that goes back to using SockJS in the modern bundle (just like the legacy bundle) rather than a native WebSocket. If you run meteor update socket-stream-client to get version 0.2.2, I believe these problems will go away, since SockJS has all sorts of clever tricks for coping with unusual networking environments that can cause problems for plain WebSockets.


#11

It looks like you’re running that locally and not over wifi (see localhost:3000) and still having issues.
I don’t think its an issue with your wifi, looks like what @benjamn suggested is probably the fix given the error shows socket-stream-client issues.


#12

Hey I have been looking into this and it seems this problem was introduced in 1.7.

Prior, meteor would try to connect to the DDP service on the origin hostname, but now it is the “ROOT_URL” environment variable.

The solution is to start the meteor process with a ROOT_URL set, so if your computer is 10.0.0.10, you would run ROOT_URL=http://10.0.0.1 meteor run