Live Server extension is not auto-reloading with WSL2 - html

I'm having an issue with the Live Server extension for VS Code (https://marketplace.visualstudio.com/items?itemName=ritwickdey.LiveServer). I'm using WSL 2 for my programming and I have my GitHub repos saved in the Linux filesystems:
\wsl$\Ubuntu\home\myName\Files\GitHub\CSS-My-Site
The issue is that when I make any changes in my project and save, the web page does not automatically reload the way it's supposed to. Now, when I initially run Live Server it does indeed open up my browser and display my page. It just doesn't update after that, I have to refresh manually.
I'm guessing it has something to do with WSL2 because if I move my project folder to my Windows desktop, Live Server works perfectly. I've tried 3 different projects from within the Linux filesystems and none of them update automatically. I've moved all 3 to my desktop, and they auto-refresh just fine. I've also uninstalled and reinstalled the extension, and reinstalled VS Code as well.
I've gone through a couple of posts but none of them seem to have my specific issue. The 2 most relevant were:
https://learn.microsoft.com/en-us/windows/wsl/troubleshooting
https://github.com/ritwickdey/vscode-live-server/issues/452
I am running Mullvad VPN and also tried turning it off and the issue persisted. My system information is below:
Edition Windows 10 Home
Version 20H2
Installed on ‎11/‎13/‎2020
OS build 19042.630
Experience Windows Feature Experience Pack 120.2212.31.0

It seems WSL doesn't support live reload if the file is in another OS. Please refer the GitHub issue.
The solution is to keep the source and execution in the same place.

I solved my problem just by changing the extension, now I use "Five Server"

I solved it by looking for the local ip of my machine using ifconfig in the terminal, copy the ip, paste it in my browser and then :5500

Related

Emulate an older version of chrome within the dev tools

I need to emulate an older version of chrome. I want to avoid the solution where I have to uninstall the current version and install the desired one each time I need to test my app. I came across this article but it doesn't quite answer my question. Thank you!
It's not possible to emulate older versions of Chrome from within DevTools, as is possible in IE. It's not very reliable to emulate them anyway. I've used IE 8 emulator in the past, and on occasion it has provided different results from the version I installed on an XP VM.
In theory, it should be possible to install multiple Chrome instances side-by-side because the installation directory is OS user based. However, I don't think the installations are fully isolated from one another. At least in Windows, the application would likely write to the same registry keys. In OSX, you might be alright, provided you modify the user directory path.
An alternative solution would be trying the portable versions of Chrome that appear over the Internet, usually illegally. Everything is self contained in a directory, but it will likely perform differently from normal installations. Check out PortableApps.
I think the best solution would be to set up some VMs for the different environments and browsers you want to test with. You can manually set up these, using VirtualBox or similar. Many hosted providers will allow you to spin up fresh VMs with automated tasks to install applications and services. You have to pay for these though.
If you just need to check what server returns for old browsers (not full emulation), you can set User-Agent in Network Conditions (for now, chrome 67).
Just for completeness, here is a link (September 2021) that provides historical snapshots of the 'chromium' browser, sorted per operating system and per 'position'. I needed this when I had to test on an 8-year old version of Chrome(~ium)
https://commondatastorage.googleapis.com/chromium-browser-snapshots/index.html
The URL looks legit (googleapis.com) to me, but please check for yourself before downloading. At your own risk.
Updated on 21/03/2019
I have found the following link which contains links to previous Google Chrome Versions (32bit, 64bit and Linux).
https://www.slimjet.com/chrome/google-chrome-old-version.php
Old post
Just found out that different versions of Google Chrome can be installed.
You will have to uninstall your existing version.
Download the package from here - https://www.chromium.org/getting-involved/dev-channel
Follow the instructions and install.
Hope this helps someone. The downside is you have to uninstall your current version.
Cheers!
Today you can run Windows Sandbox to avoid installing malicious programs. (Windows Professional or Enterprise Edition is required).
more info:
Windows Sandbox Doc
While I don't have a way to emulate a different version, I did find a way to have a current and an old version installed at the same time. For the 'current' version I installed Chrome Beta. Then I set the regular version of Chrome to the older version I needed.
Google's docs didn't put all the information in one place, so here are the steps for a normal Chrome user in Windows 10:
Download the Google Update policy template (alternatively Chrome Enterprise also contains the files you'll need) and unzip it.
Copy the .admx and .adml files into %systemroot%/PolicyDefinitions (.admx files go there and .adml in the language subfolder (en-US) as found in the zip you downloaded)
Open Group Policy editor and the required settings now exist
In Computer Configuration->Administrative Templates->Google->Google Update->Applications->Google Chrome,
set Rollback to target version to enabled
set the Target version prefix override to enabled and your desired version
(e.g. 86. for version 86)
Finally open Chrome, go to Settings->About and let it check for updates. Chrome will automatically download the target version and prompt you to restart.
Do note that this deletes local user profiles and recreates them from remote including redownloading browser extensions, so use with caution. Remember to go back to the normal version of Chrome by unsetting the Group Policy settings and letting Chrome update itself when you're done.

Windows (phone) emulator 8.1/10 stuck at loading the OS

I've been trying to get the emulator to work for days. Previously I tried the Windows Phone 8.1 Emulator as well as the Windows 8.1 Simulator and both were stuck at loading the OS.
Earlier today I installed the new Windows 10 Tools and thought I should give it another try with the new Windows 10 Emulator... And no, still the same result.
What's strange is that, the Hyper-V Manager seems to be doing OK. I can see the app displays correctly on the little Preview window (see the box on the left side of the picture below).
Also, breakpoints are hit, the project seems to be running OK.
As many answers have already suggested, I tried letting it running for an hour, but still nothing came up.
Things that I've also tried include uninstalling all the Virtual Machines as well as repairing the WP 8.1 Emulator, nothing has worked so far.
Please help, this has driven me completely insane. :(
Update
Not sure if this would help, but if I change the Windows Phone Emulator Internal Switch to use Private network instead of Internal, I will get a couple of warnings saying Unable to determine the Host IP address and then the Emulator will show up with the Emergency Call screen. Not much I can do from there as the three buttons on the bottom are not functioning at all.
I understand that changing the connection type is not the right way to do it, but this at least tells me that the Emulator can work, it's just a matter of how.
I believe you have two Windows Phone Internal Switch connections and one seems to be unplugged while the other is running. Disable the one that is unplugged and leave the latter. This worked for me after 2days of tinkering. God speed.
Try the following.
Open the Hyper-V Manager
In the Actions pane, click Hyper-V Settings
In the Server pane, select Physical GPUs
Uncheck, Use this GPU with RemoteFX
Click OK to save/close.
Attempt to start the Windows Phone emulator VM from within Hyper-V Manager or Visual Studio.
I solved this problem by simply adding XDE.EXE as an exception to my Windows Firewall.
Just today
Many times it is not stuck. It just does take too long to start. I have an 8 core processor and it took like 5 minutes to launch, I tought it was stuck but it did launch.
Not sure if this would help, but if I change the Windows Phone
Emulator Internal Switch to use Private network instead of Internal, I
will get a couple of warnings saying Unable to determine the Host IP
address and then the Emulator will show up with the Emergency Call
screen. Not much I can do from there as the three buttons on the
bottom are not functioning at all.
when you set it to private network, Windows can't interact with your WP Emulator. Open Network Adapter, and try disable and try start emulator again, then enable again this adapter if it is not work *
I contacted the Visual Studio Team a couple of weeks ago and looks like they have fixed this issue in the latest update. And here is how I finally got it all working.
Update your Windows 10 TP to the latest version (currently 10074).
Install the latest Visual Studio 2015 (currently RC).
Install Windows 10 developer tools preview from here (I got
some weird errors with Error code: -2147023294. Ignore them, go
straight to the next step).
Install the standalone Windows SDK for Windows 10 Insider
Preview from here.
Install the Pre-release Microsoft Emulator for Windows 10 Mobile
from here.
That's all! After all these are done, both my Simulator and Emulator are loading up fine.
In my case, deleting the internal switch from Hyper-V virtual switch manager helps, whenever you run your app using emulator as the target, it'll add a new internal switch by itself and the emulator will run normally (no longer stuck on loading screen)
The problem is, I have to do it every single time I restart my PC
The workaround steps to install the Windows SDK and Emulator are no longer needed.
We have released a fix as of 7PM PDT 30 April 2015 for the setup error
Windows 10 SDK 10.0.10069 : The installer failed.
User cancelled installation. Error code: -2147023294"
New setups should no longer encounter this issue.
For existing installations, and for more information, see this forum post:
https://social.msdn.microsoft.com/Forums/en-US/17bc9d5e-2ea7-4149-bb75-23997db8bd25/
This worked for me:
Go to Windows Defender.
Add exclusion following path: "C:\Users\UserName\AppData\Local\Microsoft\XDE\YourEmulatorVersion"
YourEmulatorVersion - for example 10.0.14393.9
2 days, tried all that is posted here but nothing worked! Finally, since it is a lot easier nowadays to (re)install windows without loosing your files (3 hours including updates), I just resorted to that. Same thing happened, but then I saw the alert that I had not yet activated my VS to run in developer mode :) Did that, and voila, the emulator now works.
If this might be helpful: my problem started when I installed Android Studio and disabled Hyper-V from Android. Enabling it back for VS just couldn't get me to run it again. But I hear there is a way to run both Android & VS emulators using VS emulator for Android. I will try to see how that works later...
I know the question is old, but none of the above answers worked for me so I write down my two cents:
Go to Hyper-V console and remove all emulators
Go to Devices Management, under network adapters tree node, delete all virtual switches
Run an emulator from Visual Studio and see the magic happen

Inconsistent Extension Behavior on Google Chrome Installs

I have observed inconsistent behavior using the Web Developer extension (Chris Pederick) in Google Chrome on these different machines:
My PC running Windows 7 Home Premium 64-bit
A VirturalBox Virtual Machine (VM) running Ubuntu 12 on my PC
A VM running a updated, fresh install of Windows 7 Home Premium 64-bit on my PC
I have the same version of Google Chrome and Web Developer installed on all these machines. However, for some reason, Web Developer does not work as expected on my PC. It works perfectly on the Ubuntu VM and the Windows VM.
On my PC, about 95% of the time the Custom Tools functions (Validate CSS, Validate HTML, etc.) in Web Developer do nothing when clicked (they should open new tabs to the W3C validators).
I have uninstalled and reinstalled Google Chrome on my PC several times. I have even manually gone through the file system and registry to completely remove all traces of Google Chrome before reinstalling. Nothing I've attempted so far has corrected this problem.
Of course, due to Google's 'field trials', all these machines have slightly different variations (as reported by chrome://version), but I would doubt that is the source of the problem.
Any ideas or suggestions?
OK, here's a possible clue...
It has baffled me why this problem NEVER occurs in my virtual machine (VM); only on the host. Same version of OS, Chrome, and Web Developer installed on both. May have discovered why.
My standard settings for VMs is to use only one CPU. As a test, I changed the VM to use two CPUs. BOOM! I can reproduce the problem on my VM. Change back to one CPU - can not reproduce the problem.
Does this suggest a problem with threading in Chrome?

Sencha Touch Documentation Live Preview

I've just installed Aptana Studio3 with senchatouch 2.
I would like to use the documentation which is installed with the Sencha sdk, everything seems displayed fine but I have no way to get Live Preview in the example. When I go on line on the sencha site it's ok.
I'm under Windows 7 64 bits with last version of Chrome.
Would somebody got similar problem?
You cannot directly run the application. You need to host it on your own local web server, I use Apache Tomcat. Copy the entire downloaded Sencha Touch SDK. Start server and hit the url.
http://{your ip}:{port}/AppServerName/sencha-touch-2.0.1.1/examples/kiva/index.html
This should work.

Problems in Installing Pligg on localhost

I'm facing problem in installing Pligg on localhost(xampp). It seem to install successfully but does not login, as the page freezes. If anyone is familiar with this problem, please suggest me how to fix it. thanks.
Yes this problem is very very common. I similarly have this issue, even to this day. I've tried installation on Windows XP, Vista, and 7, all have failed.
The only way I'm able to work on Pligg is installing directly onto my hosting server. There I don't get any problems, go through the install process and access my site. Check out this quick google search as many of the top links from forums.pligg.com may offer a solution.
Unfortunately though, I haven't found one. To this day I still deploy my Pligg launches onto the server in a sandbox before going live.
I recommend using WAMP Server (Windows) or MAMP (Mac) for testing Pligg locally. I know for certain that both are working fine with the current version of Pligg CMS. I believe that I had some issues when I tried XAMPP years ago, so it may have some default setting that Pligg just doesn't agree with.