Skip to main content

VS CODE: Unable to install extensions on Ubuntu/Linux

Hey, its one of those days, i just wished i could code away the night. i decided that tonight, it was going to be VS Code all through.


I closed Sublime text. It was not long before I started missing the php code linting and ever intelligent code completions that were built into sublime text.

I checked the suggestions on the Extensions Tab of VS Code. and there it was! Felix Becker's "PHP IntelliSense" package. To my cute surprise, Upon clicking, the extension's description and Installation "Read Me" could not display correctly, 'twas as good as blank. All i could see was this:



I thought, this is something light, so i started searching but then it was not better explained except for the GitHub issue which I found to be useful, Link is at the bottom of this page. 

I hate to discover it was a DNS issue.

How to detect the Issue

Simply visit the URL below, if you are able to view the image on the page, then you are not affected by this issue.

DNS Test URL: https://ms-python.gallerycdn.vsassets.io/extensions/ms-python/python/2019.8.29288/1565127378610/Microsoft.VisualStudio.Services.Icons.Default#splashCoder

Else You will have to modify your system's DNS config, but hey its not as bad as it seems. Your internet will be fine and there will be no impact. You can also revert the DNS config after installing your extensions.


How to set DNS for a wireless connection on Linux/Ubuntu System

  1. Click your wireless icon at the top-right corner of the screen. Open the wireless drop-down, then click WiFi settings as shown below.

  2. In the new window confirm that the WiFi tab is selected on the left. Then Click the Settings button for the specific Wireless network you are using. For me, I use GAULOFCAPUA. 

  3. The new window (WiFi Settings window/tab), Click IPV4 tab to check IPV4 DNS settings. Disable the Automatic DNS check. and fill 8.8.8.8 as your DNS



  4. Goto the IPV6 tab and use 2001:4860:4860::8888 as your IPV6 DNS.


  5. Now click Apply to save the settings.

Now that you have switched to use Google's DNS, you will be able to download any extensions from Visual Code. In order to keep the setting portable, you can turn on/off at anytime the Automatic DNS switch. this will ensure that you don't have to type your DNS at all times.

How to set DNS for a wired connection on Linux/Ubuntu System.

In the previous section up here, We already configured this for the wireless connections. The only difference is that we won't use the WiFi tab, we have to scroll down on the left. then we click on "Network".
From the new Tab displayed, Click the settings icon Wired.
Apply IPV4 DNS and IPV6 DNS as described above. no exceptions.

YIPEEE! Now i can see the Extension's details and i can install. 



I hope i made it easy, kindly let me know if this guide did not solve your issue.


Best Regards


*Related GitHub Issue

Comments

Popular Articles

Issue with installing python-axolotl or python-axolotl-curve25519 on Windows

It is peeve amazing how many hours get burnt while trying to resolve simple package dependency issues. I may be too dumb to proffer a lasting one-fits-all solution to all dependency issues, but I got this issue fixed in my own case. Problem Description: The python-axolotl library requires certain dependencies that are not properly managed when installing libraries via a command line's requirement.txt file. I got real help by reading through this link below, but this page might be more helpful when it comes to detailed instructions. Actual instructions: https://github.com/tgalal/python-axolotl Typical errors might look like the following: 1. In this case, missing library(s). Libraries needed for compiling some python resources. Unfortunately, http://aka.ms/vcpython27  has been decommissioned because Python2x is EOL. You can still get the VcPython27 from an archive at https://web.archive.org/web/20210106040222/download.microsoft.com/download/7/9/6/796EF2E4-801B-4F...

Chrome Extension (part 1): Injecting External Scripts into a Web Page

Recently, I was required to develop a chrome extension for some executives. This plugin only targeted a few of our most visited websites. There was a lot of approaches to implement the extension and all our use cases. One particular challenge was trying to inject scripts from our own CDN into specific web pages. the scripts were required to interact with the page and all variables possible. Since there is a script isolation thing for Chrome Extensions, I felt this was a good challenge to take up in my spare time. Here is a sample of my content script. content.js document.onreadystatechange = function () { console.log("document state is:" + document.readyState); if (document.readyState == "complete") { let randAntiCache = Math.random().toString().split('.')[1]; let scriptURL4="http://localhost.test/testscript.js?v="+randAntiCache; let scriptnode4 = document.createElement("script"); scriptnode4.setAttribute("s...