Open gwendall opened 7 years ago
This works fine for me and you only need to connect once. Are you using the correct IP to connect to the server?
@gwendall Which platform you use ?
Works for me too, post code?
Same problem here, I am using Meteor.connect('ws://localhost:3000/websocket');
and I get the same message. Do I need a different IP?
Are you running it in the simulator, or phone?
In an iPhone. After a few tests, the only way I could make it work was using my IP address of my wireless network in the connection, but only works when my phone is actually connected to that network. I think the other path is to SSH my localhost and then tell Meteor to use that in the server?
For developing purposes I can rely in mi Wifi network, but when in testing, I will need to test it under 3g/4g connections, to my localhost running or maybe to Galaxy.
Any ideas on it are welcome. This is the first time I face this aspect in the development.
You can try ngrok to run from localhost remotely to demo or test (I don't use it myself, so I can't speak to its usefulness, but I remember someone said it was good, and it does support websockets). Of course, you should do tests against a real server (Galaxy or whatever) when you can.
@jmaguirrei That's pretty much expected. Localhost (from the iPhone's point of view), would point to the iPhone itself, which is not where the meteor instance is running. I think you can get around this by using exponent, but you have to make sure your app is compatible. You'll also still need to be on the same network. For your purposes, it sounds like it would be best to have a server to test against. If cost is an issue, you might be able to get this working: https://medium.com/@purplecones/deploying-a-meteor-app-for-free-using-zeit-now-c183329057c9#.1q2wye72t
BTW, the "Network Link Conditioner" prefPane is super handy for testing network connectivity, it's on the apple website somewhere.
@JulianKingman Thanks, nice to have a place to run Meteor apps for free. I use Ubuntu (because of that I also use Exponent), so the "Network Link Conditioner" is not an option for me, only for developing on a Mac, am I right?
Ah, yes. I assumed you were on a mac. There's probably something similar, though. There's a commandline tool built in: https://wiki.linuxfoundation.org/networking/netem
@JulianKingman, Thanks.
Also, I was having problems with this until I made sure to ping my meteor server every once in a while in another browser tab.
I get a
Disconnected from DDP server
whenever I try toMeteor.connect
to a Meteor back-end from an Exponent-built app. Anyone else ?