Can I tell if my chrome extension has been installed via inline install or the chrome store? - google-chrome-extension

When my extension is installed, is there a way to know if it was installed via inline install or installed from the chrome extension store?
I've looked through the Chrome Platform Apis and don't see anything obvious.

Use chrome.management API:
For example:
chrome.management.getSelf(myInfo =>{console.log(myInfo.installType)})
According to the documentation, it will output:
admin: The extension was installed because of an administrative policy,
development: The extension was loaded unpacked in developer mode,
normal: The extension was installed normally via a .crx file,
sideload: The extension was installed by other software on the machine,
other: The extension was installed by other means.
Besides, you can check manifest's update_url entry.

Related

Install chrome driver on Amazon Linux 2 ARM

I am looking to install Chrome Driver (For my selenium project) on an Amazon Linux 2 (Arm 64).
I have done this on Ubuntu and seems pretty straight, it also seems straight on AL2 x86, like this script from Intoli but it 404 when looking for Chrome on ARM :(. So far I see Chrome is not available for ARM so I see the alternative is to use Chromium.
I tried installing it manually but it seems there is no compiled on Chromium downloads page for ARM.
Finally i found the Electron's unofficial webdrivers, which seem to be the answer, and after downloading, installing dependencies (libXcursor, libXfixes, libXdamage) and running it:
[ec2-user#scraping1 current]$ chromedriver
Starting ChromeDriver 100.0.4896.143 (6bf1afe83487405ea0aff37182f05e3db45559c2-refs/branch-heads/4951#{#831}) on port 9515
Only local connections are allowed.
Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
ChromeDriver was started successfully.
And run my project I get:
2.7.3 :004 > Selenium::WebDriver::Service.driver_path = "/usr/bin/chromedriver"
=> "/usr/bin/chromedriver"
session = Capybara::Session.new
Webdrivers::BrowserNotFound: Failed to find Chrome binary.
Which means i don't have Chrome installed, but then how to install it? I have seen this question which seems to be my same problem but it is unclear to me how to install Chromium; I see it is needed to download and use the chromedriver compiled for ARM64 which I have done already.

Appium Inspector don't open on Linux Ubuntu

I cannot open Appium inspector on Linux Ubuntu.
In the same folder I have 3 files:
Appium-Inspector-linux-2022.2.1.AppImage /
Appium-Server-GUI-linux-1.22.2.AppImage /
latest-linux.yml
When I open the Appium-Server-GUI-linux-1.22.2.AppImage file, start the server e click on the button to open Appium Ispector, it open a web page.
to fix this, it was necessary:
1: Start Appium Server
I did this, executing Appium-Server-GUI-linux-1.22.2.AppImage file.
2: Start Appium Inspector through of file Appium-Inspector-linux-2022.2.1.AppImage
3: Create the capabilities
After that, the Appium Inspector still don't open throught on Appium Server button, but it make it open and you can use.
Since the release of Appium v1.22 they have changed how the Appium Inspector works. I refer you to their official documentation on GitHub https://github.com/appium/appium-inspector, citing:
Appium Inspector is released in two formats:
As a desktop app for macOS, Windows, and Linux. You can get the most
recent published version of this app at the Releases section of this
repo. Simply grab the appropriate version for your OS and follow
standard installation procedures (but see the note below for macOS).
As a web application, hosted by Appium Pro. (It's currently a known
issue that the web version does not work on Safari). Please make sure
to read the note below on CORS as well.
If you like to work the old way, download Appium Desktop v1.21 or below.
install latest appium-inspector
open appium-inspector and insert "/wd/hub" in Remote Path

Debugging VSCode Extension within a remote container

I'm currently using vscode-tomcat extension within a RHEL7 container and developing over SSH using the vscode-remote extension. However, I am unable to launch the tomcat debugger due to this unresolved issue.
"TypeError: Cannot set property 'readableListening' of undefined"
The issue only occurs when trying to launch the Tomcat debugger while doing remote SSH development. I am making an attempt to debug the issue, but I'm not sure how to debug a VSCode extension within a remote container.
Any tips would be greatly appreciated. Let me know if I can provide any additional details.
There is now documentation for all of this. Read
https://code.visualstudio.com/api/advanced-topics/remote-extensions#debugging-using-ssh
and then keep reading because further down you will find this
https://code.visualstudio.com/api/advanced-topics/remote-extensions#debugging-using-ssh
in fact read all of it, there's a lot of stuff there that initially made me think "So?" but which is vital knowledge in specialised problems.
Here's the portion relating to the immediate problem.
Debugging using SSH
Follow steps:
After installing and configuring the Remote - SSH extension, select Remote-SSH: Connect to Host... from the Command Palette (F1) in VS Code to connect to a host.
Once connected, either use File > Open... / Open Folder... to select the remote folder with your extension source code in it or select Git: Clone from the Command Palette (F1) to clone it and open it on the remote host.
Install any required dependencies that might be missing (for example using yarn install or apt-get) in a new VS Code terminal window (Ctrl+Shift+` ).
Finally, press F5 or use the Run view to launch the extension inside on the remote host and attach the debugger.
Note: You will not be able to open the extension source code folder in the window that appears, but you can open a sub-folder or somewhere else on the SSH host.
The extension development host window that appears will include your extension running on the SSH host with the debugger attached to it.
Installing a development version of your extension
Anytime VS Code automatically installs an extension on an SSH host, inside a container or WSL, or through GitHub Codespaces, the Marketplace version is used (and not the version already installed on your local machine).
While this makes sense in most situations, you may want to use (or share) an unpublished version of your extension for testing without having to set up a debugging environment. To install an unpublished version of your extension, you can package the extension as a VSIX and manually install it into a VS Code window that is already connected to a running remote environment.
Follow these steps:
If this is a published extension, you may want to add "extensions.autoUpdate": false to settings.json to prevent it from auto-updating to the latest Marketplace version.
Next, use vsce package to package your extension as a VSIX.
Connect to a codespace, development container, SSH host, or WSL environment.
Use the Install from VSIX... command available in the Extensions view More Actions (...) menu to install the extension in this specific window (not a local one).
5.Reload when prompted.
Tip: Once installed, you can use the Developer: Show Running Extensions command to see whether VS Code is running the extension locally or remotely.

Azure DevOps: Chocolatey, Install Google Chrome Issue

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

how to install chrome extension on Mac

Does anybody know how to install a chrome extension automatically on Mac (mountain lion)?
I have tried the method mentioned from chrome developper(but I don't see the "External Extensions" folder, and I also unzip the file directly into "Default/ID/Version/**". Both methods can not work.
Thanks
You can only install from the chrome store, or by drag&drop of the .crx on the extensions page

Resources