nparashuram / cordova-plugin-browsersync

BrowserSync Plugin for Cordova
110 stars 69 forks source link

Could not connect to the browser-sync server.. #31

Open kontur opened 7 years ago

kontur commented 7 years ago

The initial view when browser sync starts says:

cordova-plugin-browsersync

LOCAL http://localhost:3000/platforms/browser/www/index.html ❌
EXTERNAL http://192.168.1.34:3000/platforms/browser/www/index.html ❌
Could not connect to the browser-sync server. 
Check if you can access any of the

On the local browser clicking either of LOCAL or EXTERNAL will successfully start to sync. On my physical iOS device this worked a couple of day ago without the same above screen, but now shows this screen as well on iOS, and clicking neither of the two options does anything. (Nvm, this was due to different WiFi)

Any clue what's going on here - why is it showing those two options on startup of local browser?

igorPhelype commented 6 years ago

Any solution?

patrickbussmann commented 6 years ago

Can you try adb reverse tcp:3000 tcp:3000 please and click on local then? Thanks.

igorPhelype commented 6 years ago

Worked in the first time, but it's not synchronizing.

patrickbussmann commented 6 years ago

@igorPhelype sorry for delay. I found out that there could be an issue: https://github.com/BrowserSync/browser-sync/issues/1234

Maybe you can check your console if there appears something like this. 2017-11-14 21_03_26

browser-sync-client.js?v=2.18.13:12
Uncaught TypeError: ___browserSync___.io is not a function

I found out that this is an issue with a plugin which you maybe integrated. In my case I had a plugin which destroy the exports function so that the window.io variable was stored in exports.io.

I removed this plugin and it synchronize successfully.