nparashuram / cordova-plugin-browsersync

BrowserSync Plugin for Cordova
110 stars 69 forks source link

browsers aren't refreshing automatically #13

Closed a-nickol closed 7 years ago

a-nickol commented 8 years ago

I have the same problem already reported here:

http://stackoverflow.com/questions/35117769/cordova-plugin-browsersync-not-refresh-automatically

I am using cordova-cli version 6.0.0.

browsersync admin panel is running on localhost:3001. It tells me that the port for local connections is 3000, nevertheless there are no sites available on port 3000 but 8000. Is this the problem?

heliomsolivas commented 8 years ago

Same here.

empyreanx commented 8 years ago

I have the same problem. However, it is possible to just manually refresh the page to view the changes.

Edit: Manually refreshing does not detect changes with the vanilla browser platform emulation, so the current functionality is still an improvement over the default.

JackSzwergold commented 8 years ago

Add my voice to this “Why the heck isn’t this working?” choir. My post detailing my specifics on Stack Overflow here.

axemclion commented 8 years ago

@HansPeterIngo @JackSzwergold @heliomsolivas @jrimclean - I am planning to retire this project in favor of Taco-livereload. That is also based on pretty much the same code, and I am now a PM on that project. That project will also have more devs working on it, so will have much more support as an official project.

Would that fulfill your needs ? Are there anything that this project has, that taco-livereload does not have ?

empyreanx commented 8 years ago

@axemclion I have allergies to Microsoft, so I doubt I will move to Taco. Thanks for creating this project. Hopefully someone else will pick up the torch.

axemclion commented 8 years ago

@jrimclean I understand if you don't want to explain, but is there a reason why using taco is an issue if it is a Microsoft product ? Taco is open source and is MIT licensed. You could even fork taco's livereload and continue using that if you don't want to depend on a Microsoft product.

Is there anything I could help with ? As a PM on the product, I genuinely want to help and ensure that folks have a good live-reload solution. I created this repo/solution as an experiment, before taco even has live reload. Now that taco has live-reload, having the same copy of code at 2 places seems to be sub-optimal. Thus the suggestion to move to Taco, since that would have more than 1 developer working on the product.

JackSzwergold commented 8 years ago

@axemclion Can you provide links to a simple “let’s get Taco live reload” up and running. I’ll see if that works… And it might work…

But I generally avoid Microsoft projects regardless of licensing because their historic business practice tactic has been to adopt a standard, grow an audience and then “expand” the product to their advantage forcing adopters to do… Something not so great to continue to use a product. Meaning I do not feel safe relying on Microsoft code for long term stability of any code even something as seemingly simple as a development tool such as live reload functionality.

When all is said and done, I might just move my Cordova coding setup to an Ionic-based setup. Even if I don’t use any of the Ionic framework for my project the live reload functionality works right out of the box.

PS: I added a bounty to my question about this on Stack Overflow to get more attention to the issue. If the project is—essentially—abandoned, it might be worth it for you to post an answer there stating what you state here. I would gladly accept that as an answer.

axemclion commented 8 years ago

@JackSzwergold To use live-reload, you will run taco run android --livereload - that should do the job. I am not saying that I play to abandon the project - depending of if people are using it and need me to maintain it, I will.

I was not sure how many people use it, and was not sure if it was worth maintaining it as a separate project.

empyreanx commented 8 years ago

@axemclion Look up "embrace, extend, extinguish". It was a core part of Microsoft's strategy in the 1990's. That behavior and what they tried to do to Linux via the SCO lawsuits, not to mention the current privacy issues with Windows 10, has irreparably tarnished their reputation in my eyes. I don't trust MS and I refuse to use their frequently inferior products wherever possible.

I had a look at Taco, but it requires me to install their platform packages, which I find quite invasive. Your solution, when it works, is perfect! All I have to do is install one plugin and that's it - I don't have wrap my project in MS's version of Cordova. If I have time, I might try my hand at fixing some of the current issues.

JackSzwergold commented 8 years ago

@axemclion Look at @jrimclean’s answer. Your concept of ease of use misses the point: Microsoft’s behavior in the realm of open-source software has been questionable for years. Heck, please reread my post to fully absorb what I am saying specifically about Microsoft as well. So that said, I would have preferred to have used your original Cordova Browser-Sync plugin since it was simple and works. If I meet to make a decision on a framework/platform it’s going to be Ionic over Taco. To get live reload functionality in Ionic you just have to serve the app via ionic serve. And the Ionic development software and community is far more robust than Taco at this point.

Which is all to say the Cordova community itself would most likely embrace a non-framework/platform dependent browser sync solution. So perhaps someone else can pick up the ball on Cordova Browser-Sync and perhaps expand and grow it.

axemclion commented 8 years ago

Looking at the answers, i think it makes sense to keep maintaining this plugin. I will look at this issue something next week. In the meantime, if you fine folks are able to investigate it, would love a PR. If you folks are also inclined to help with maintaining it, adding features like Windows support, I would gladly add you as committers to the project.

axemclion commented 8 years ago

This plugin only supports iOS and Android platforms only. I had not actively supported the browser platform. However, thanks to #16 , we will have support for it.

On the other hand, cordova emulate browser should do that already. Is there are reason you want this plugin to do the live reload, instead of using cordova emulate browser ?

empyreanx commented 8 years ago

@axemclion Using Cordova to emulate the browser is possible, however, ever time a change is made we must exit and restart the process (and thus Chrome). Just refreshing the page does not pickup the changes. This feature would definitely streamline the development process.

axemclion commented 8 years ago

@jrimclean My bad, you are right. I was trying to run cordova with this plugin added, thats why it was doing live reload. I will look at the PR #16 and add that functionality here.