Azure DevOps: Chocolatey, Install Google Chrome Issue - azure

I am running selenium tests on Azure DevOps via the release pipelines. I am trying to specify the version of the Google Chrome i wish to use on the GUI, but when i declare it it fails straight away, but the Chocolatey website approves of the version. I am thinking maybe the syntax in which i am declaring the Google Chrome version is incorrect?
I also declared the version below, where it says "The version of the package that is to be installed", but it fails also.
Another question; is there a way to declare the width of Google Chrome for these tests when they are being ran via Azure DevOps?

The Chocolatey package website states that CLI command to install that specific version of Google Chrome is:
choco install googlechrome --version=86.0.4240.75
So my guess is that you should set googlechrome as the package id ("The id of the package(s) that are to be installed"), and 86.0.4240.75 for the version field.

As per #Adil Leghari's comment within Chocolatey GoogleChrome 86.0.4240.75 package page:
Just a heads up, there is a version mis-match on this package, and it may partly be the fault of Google. The Google Chrome Enterprise site lists the version as 86.0.4240.75, but the actual MSI package is stating a version of 68.36.75. This may be a problem for folks who are attempting to track and audit package versions.
Hence you must be facing the issue.
Solution
The latest published GoogleChrome version is 86.0.4240.193.
So as a solution you can either:
Specify The id of the package(s) that are to be installed as: GoogleChrome 86.0.4240.183
Else run the following command from the command line or from PowerShell:
choco install googlechrome --version=86.0.4240.193

Related

Any way to prevent Node.js update automatically on Windows 10?

I installed Node.js on Windows version v14.15.5 for a project without checking anything on the prompts during the installation. Then at some point Node.js automagically updates to latest version v16... Any way to disable this update regardless what is happening in the code of the project or elsewhere in the system. Just wish to always keep same version that was installed or specific version, in this case v14.15.5. Thank you
Except nvm there is another reason for the automatic update.
Disclaimer: In my case it was Chocolatey.
Chocolatey can be installed as last step of node installation.
You should be able to stop this with chocolatey pin command.
Something like this:
choco pin add -n="nodejs"
choco pin add -n="nodejs.install"

How can I revert Protractor back to a selected version?

Current Node Version: V15.3.0
Current Webdriver-manager Version: 7.0.15
I am at a loss. My end-to-end automated testing was running great, until the company I work for upgraded Google Chrome to 86.0.4240.111, previously we were using Chrome 83. So naturally with the update I ran the following command webdriver-manager update --versions.chrome=86.0.4240.111 however afterwards when I attempted to run my testing, I received the error stating that ChromeDriver only supports Chrome version 87. During this time I believe I had Node version V14.5.x or close to, Webdriver was version 6.14.x.
I talked with IT and we were unable to find an older version of Chrome from a trusted website to revert Google Chrome back, and so I upgraded Node and npm to the current versions stated above. Now after updating Webdriver-manager I get the error that ChromeDriver only supports Chrome version 87. I talked with IT and they will not upgrade to 87 even though it was released this past week.
My question is there any version which I can install Node and NPM in which I can use my testing with the current version of chrome which is 86.0.4240.111?
And what specific commands would I need to install the said version. Would it be npm install npm#[Enter Version Here]?
Thank you for taking the time to read and look at my question. If any more info is needed please let me know and I will gladly give you what I can!
Node version doesn't matter
npm version doesn't matter
You don't need to revert protractor
It's difficult to downgrade your browser, due to security concerns. You can only go up in version, but you can install any version of the chromedriver
what you actually need to do is to match a version of your local chrome to the version of chromedriver (the driver is the layer that controls your browser, so it's important to make them correspond to each other). So
First, find out what your version of chrome is. From your example I understand it is 86.0.4240.111
Then, find out what chromedriver version can be used. Take the major version of the browser (first 3 numbers, 86.0.4240 in your case) and find the corresponding version of the driver by going to this url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_${CHROME_VERSION} (put the major browser version instead of ${CHROME_VERSION}). You'll see the chromedriver you're looking for is 86.0.4240.22
This is where the trickiest part begins. There are 2 installation of protractor usually:
local
global
I won't go over how to find which one you use, you can look it up. But when you find it, make sure you're updating the right one
When you know which protractor you're updating, go to it's folder and from that folder run npm i webdriver-manager#latest and then node ./bin/webdriver-manager update --gecko=false
when you updated the right webdriver, install the right chromedriver like so
node ./bin/webdriver-manager update --gecko=false --versions.chrome $VERSION
Make sure to put 86.0.4240.22 instead of $VERSION

Update TFS2017 task to latest version

I am working on a build to run a powershell script on a remote machine, using the VSTS task :
I currently am using TFS2017 on premise, and this is version 1 of that task.
There is a version 3 available on github here :
https://github.com/Microsoft/azure-pipelines-tasks/tree/master/Tasks/PowerShellOnTargetMachinesV3
I am having an issue with this task failing, and I have read elsewhere that this version has a fix for my issue, so I want to update it if possible.
I tried a few ways to do this, but I cannot work out what I am supposed to be doing. You would think there would be an update button in TFS!
Well, there is, but it requests that you provide a .VISX file. Which the repo in GIT does not have.
I've tried running the steps in this other post:
How to update the built-in Microsoft task library in TFS 2017?
But running the command "npm run package -- --version " doesn't generate the VISX.
I tried running :
npm run package --PowerShellOnTargetMachinesV3 --version 3.1.3
That responds with the output:
5.6.0
Which I am not sure what to do with!
I have seen another post that says I need to use the tfs-cli?
I'm very confused.
Any help is appreciated!
Since you are working on TFS on-premise, the task version will not auto update. You need to manually install "PowerShell on Target Machines" task version 3.0
You just need to download the source code and package it as an extension, finally upload and install your extension. There are some steps updated:
Get the package tool (tfx-cli)
You can install or update the TFS Cross Platform Command Line Interface (tfx-cli) using npm, a component of Node.js, from your command line.
npm i -g tfx-cli
Package your extension in a .vsix file
tfx extension create --manifest-globs vss-extension.json
More details please refer this official tutorial: Package, publish extensions.

Can we run azure functions locally in VSCode without admin rights

Whenever I tried to debug the azure functions locally in vscode, a dialog box appears and it asks to install azure function core tools.
After installing, it throws an error as Unable to import azure.functions pylint(import-error).
When I tried to debug one more time without modifying anything, it is asking to install azure function core tools again. I don't understand why it is asking multiple times to install azure function core tools and also also why it is throwing error as could not import azure.functions. Please help on this.
I am trying the above steps as a local user. If I tried to do using admin user, it is working.
Try just type "func" in and see if it works (as local user). If that won't display the Azure Functions logo, try installing it manually with -g parameter:
npm install -g azure-functions-core-tools
I had the same problem, VSCode was trying to install Azure Functions Core Tools each time I started debugging. So installed the latest Azure Functions Core Tools using MSI installer.
I uninstalled azure-functions-core-tools from npm: npm uninstall -g azure-functions-core-tools. Not sure this step is 100% needed.
The latest Azure Functions Core Tools 3.x comes with MSI installer. Visual Studio Code debugging requires 64-bit version. Install the Azure Functions Core Tools

Error installing feeder/feedr library in python

I am trying to run a code which uses feeder (feedr on git repository) library. I am getting error while installing it. I have tried pip, cloning git, and previous versions but still getting same error on all PC. Please tell how to solve it or any alternative for feeder. Original code link is https://github.com/nashory/DeLF-pytorch/tree/master/notebook enter image description here
feedr uses infi.docopt_completion==0.2.1 which in turn uses distribute which is so old (last release in 2013) that it could hardly be installed in modern Python. I failed to install it in Python 2.7.
In short: the project feedr is old, outdated and abandoned. Forget about it. Or try to update in manually to use newer versions of dependencies. You can send pull request(s) to the author.

Resources