How to provide chrome profile in selenium grid nodeconfig - webdriver

I'm starting my Selenium node with the profile setting provided in nodeConfig.json, but Chrome driver still doesn't use it.
java -Dwebdriver.chrome.driver=C:\Selenium_server\chromedriver.exe -jar C:\Selenium_server\selenium-server-standalone-3.141.59.jar -role node -nodeConfig nodeConfig.json
nodeConfig.json:
{
"capabilities": [
{
"browserName": "chrome",
"maxInstances": 5,
"version": "username",
"seleniumProtocol": "WebDriver",
"profile-directory": "Profile 2"
"user-data-dir": "C:\\Users\\username\\AppData\\Local\\Google\\Chrome\\User Data"
}
],
"proxy": "org.openqa.grid.selenium.proxy.DefaultRemoteProxy",
"maxSession": 5,
"port": -1,
"register": true,
"registerCycle": 5000,
"hub": "<hub ip>",
"nodeStatusCheckTimeout": 5000,
"nodePolling": 5000,
"role": "node",
"unregisterIfStillDownAfter": 60000,
"downPollingLimit": 2,
"debug": false,
"servlets" : [],
"withoutServlets": [],
"custom": {}
}

Related

Azure Container Registry - What's the difference between an image config digest and the metadata digest

When using the az acr manifest list command, you can see the manifests in an ACR repository, e.g.
{
"config": {
"digest": "sha256:c97fd86fe41940f174a7da447cc991bd2ce2c11e025268dd32e3f7cb0215b8fd",
"mediaType": "application/vnd.docker.container.image.v1+json",
"size": 18961
},
"layers": [
{
"digest": "sha256:09db6f815738b9c8f25420c47e093f89abaabaa653f9678587b57e8f4400b5ff",
"mediaType": "application/vnd.docker.image.rootfs.diff.tar.gzip",
"size": 26711626
}
],
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"schemaVersion": 2
}
However when you run az acr manifest list-metadata in the same repository, you see a different digest
{
"architecture": "amd64",
"changeableAttributes": {
"deleteEnabled": true,
"listEnabled": true,
"quarantineDetails": "{\"state\":\"Scan Passed\",\"link\":\"https://aka.ms/test\",\"scanner\":\"Azure Security Monitoring-Qualys Scanner\",\"result\":{\"version\":\"2022-09-01T21:03:58.1648248Z\",\"summary\":[{\"severity\":\"High\",\"count\":6},{\"severity\":\"Medium\",\"count\":4},{\"severity\":\"Low\",\"count\":0}]}}",
"quarantineState": "Passed",
"readEnabled": true,
"writeEnabled": true
},
"configMediaType": "application/vnd.docker.container.image.v1+json",
"createdTime": "2022-09-02T12:49:16.0676949Z",
"digest": "sha256:1efe51ac38780f1d66ba66a492ba23196b5bbbbea6c2c5c1643bcaa845809183",
"imageSize": 1237192983,
"lastUpdateTime": "2022-09-02T12:49:16.0676949Z",
"mediaType": "application/vnd.docker.distribution.manifest.v2+json",
"os": "linux",
"tags": [
"1.22.2"
]
}
Why is this? And how do you link the data between the list and list-metadata commands?

Unable To Disconnect Docker Container From Network

I am trying to disconnect a Docker container (ContainerA1) connected to a network (NetworkA), but am unable to do so, even with the --force flag.
$ docker network disconnect NetworkA ContainerA1
I get an error response: container c5d345a09c6d is not connected to the network. (container IDs trimmed for brevity).
Oddly enough, I am able to disconnect other containers from NetworkA.
I inspected the network using docker network inspect NetworkA. I see :
[
{
"Name": "NetworkA",
"Id": "9e4895ee72a1648ad10f297357447529b277beb92fe21069a244a8265b8f7306",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.18.0.0/16",
"Gateway": "172.18.0.1/16"
}
]
},
"Internal": false,
"Containers": {
"aded6369aef63b5237a7f543333f0b7fafbe2f01496efb2012bb7f5d67f14268": {
"Name": "ContainerA2",
"EndpointID": "c93b9dde46884181ca5acb63c03b2fb5fb3141e98416dda3e6cbc98b166b88ee",
"MacAddress": "02:42:ac:12:00:03",
"IPv4Address": "172.18.0.3/16",
"IPv6Address": ""
},
"ep-0f7d832a8d0cd86d8655ea9e0c1f7bbf33f1102b7bbe6454aca1ab8a48a6e4cd": {
"Name": "ContainerA1",
"EndpointID": "0f7d832a8d0cd86d8655ea9e0c1f7bbf33f1102b7bbe6454aca1ab8a48a6e4cd",
"MacAddress": "02:42:ac:12:00:07",
"IPv4Address": "172.18.0.7/16",
"IPv6Address": ""
}
},
"Options": {},
"Labels": {}
}
]
Notice the ep- prefix for ContainerA1.
I tried removing the container, but still see it in the list of containers when I do docker network inspect NetworkA. The "EndpointID" is different from the container ID, but having same name.
How can I remove stale entries from network, NetworkA?

VSCode launch.json file to debug CoffeeScript Meteor app: generated files not found

I am trying to setup VSCode 1.6.1 to be able to debug Meteor 1.4.1.2 apps written in CoffeeScript 1.11.1_1.
In the VSCode launch.json file, I have defined two attach configurations:
- one to debug the server-side code using the built-in node debugger
- one to debug the client-side code using the chrome debugger extension
After a debugger statement, I have put breakpoints in all 3 parts of the code of the Meteor leaderboard example: in the isomorphic section running on both the client and the server, as well as in the client-only and server-only sections of the code.
When I attach either debugger while the app is paused on the debugger statement, the breakpoints turn grey with the warning: "breakpoints ignored because generated code not found (source map problem?)"
The launch.json is file is the following:
{
"version": "0.2.0",
"configurations": [
{
"name": "Launch",
"type": "node",
"request": "launch",
"program": "${workspaceRoot}/leaderboard.coffee",
"stopOnEntry": false,
"args": [],
"cwd": "${workspaceRoot}",
"preLaunchTask": null,
"runtimeExecutable": null,
"runtimeArgs": [
"--nolazy"
],
"env": {
"NODE_ENV": "development"
},
"console": "internalConsole",
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/.meteor/local/build/programs/server/app/app.js",
"${workspaceRoot}/.meteor/local/build/programs/web.browser/app/app.js"
]
},
{
"name": "Attach Server",
"type": "node",
"request": "attach",
"port": 5858,
"address": "localhost",
"restart": false,
"sourceMaps": true,
"outFiles": ["${workspaceRoot}/.meteor/local/build/programs/server/app/app.js"],
"localRoot": "${workspaceRoot}",
"remoteRoot": null
},
{
"name": "Attach Client",
"type": "chrome",
"request": "attach",
"port": 9222,
"address": "localhost",
"sourceMaps": true
// "url": "//localhost:9222/"
},
{
"name": "Attach to Process",
"type": "node",
"request": "attach",
"processId": "${command.PickProcess}",
"port": 5858,
"sourceMaps": false,
"outFiles": []
}
]
}
The source leaderboard.coffee file is the following:
class Player
constructor: (#name, #score = Math.floor(Math.random() * 10)) ->
inc: -> #score = #score + 1
class Leaderboard extends Mongo.Collection
insertNewPlayer: (playerName) ->
player = new Player(playerName)
#insert player
insertPlayers: (playerNames) ->
# #remove({})
#insertNewPlayer(playerName) for playerName in playerNames
self = #
insertRank: =>
sortedPlayers = #find {}, {sort: {score: -1, name: 1}}, {reactive: false}
.fetch()
previousPlayer = sortedPlayers[0]
rank = 1
#update {_id: previousPlayer._id}, {$set: {rank: rank, rankStr: "#{rank}"}}
tiedCounter = 1
for player in sortedPlayers[1..]
do (player) =>
if player.score is previousPlayer.score
tiedCounter = tiedCounter + 1
#update {_id: player._id}, {$set: {rank: rank, rankStr: "-"}}
else
rank = rank + tiedCounter
#update {_id: player._id}, {$set: {rank: rank, rankStr: "#{rank}"}}
previousPlayer = player
self = #
debugger
aflLeaderboard = new Leaderboard("aflLeaderboard") unless aflLeaderboard?
# debugger
if Meteor.isClient
Template.leaderboard.helpers
players: -> aflLeaderboard.find {}, {sort: {score: -1, name: 1}}
#Template.leaderboard.events
# 'click tr#sortButtonRow>th#sortButtonCell>button': leaderboard = players()
Template.player.events
'click tr>td>button': ->
aflLeaderboard.update {_id: player._id}, {$inc: {score: 1}}
# debugger
if Meteor.isServer
Meteor.startup ->
if not (aflLeaderboard? and aflLeaderboard.findOne({})?)
aflLeaderboard.insertPlayers [
"Heath Shaw"
"Alex Rance"
"Easton Wood"
]
aflLeaderboard.insertRank()
self = #
Is it really a source map problem?
If it is, what's wrong with my launch.json file?
Thanks
i think you need check this two property:
"program": "${file}", //important, make sure debug current file
"outFiles": [//important, where to find sourcemap js file
"${workspaceFolder}/dist/api/api.js"
]

Exposing ipv6 ports in docker containers

I have an application which needs to listen on ipv6 for a specific port. I have exposed it in the docker file, and I'm running the docker engine with DOCKER_OPTS="--ipv6", but I can't get docker to properly map the ports over ipv6.
Port shows up when using docker inspect {name} (see below for output - redacted to get rid of superfluous stuff). For some reason I can't get it to route the IPv6 stuff, however (and it looks like the ports are only being exposed as ipv4 from the output below).
How do I go about getting the port (9084) to be accessible via ipv6 connections to the host, in the same way that the other two ports are accessible over ipv4 connections to the host?
[
{
// [...]
"HostConfig": {
// [...]
"NetworkMode": "default",
"PortBindings": {
"8883/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8883"
}
],
"9084/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "9084"
}
],
"9094/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "9094"
}
]
},
// [...]
"Dns": [],
"DnsOptions": [],
"DnsSearch": [],
"ExtraHosts": null,
"GroupAdd": null,
"IpcMode": "",
"Cgroup": "",
"Links": null,
// [...]
},
// [...]
"Config": {
"Hostname": "40c7aa89b266",
"Domainname": "",
"User": "",
"AttachStdin": false,
"AttachStdout": false,
"AttachStderr": false,
"ExposedPorts": {
"8883/tcp": {},
"9084/tcp": {},
"9094/tcp": {}
},
// [...]
},
"NetworkSettings": {
"Bridge": "",
"SandboxID": "97923c78571e880f267b56f4d86a7338e2f7a878d20b9961ae208af9c2bc6b64",
"HairpinMode": false,
"LinkLocalIPv6Address": "",
"LinkLocalIPv6PrefixLen": 0,
"Ports": {
"8883/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "8883"
}
],
"9084/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "9084"
}
],
"9094/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "9094"
}
]
},
"SandboxKey": "/var/run/docker/netns/97923c78571e",
"SecondaryIPAddresses": null,
"SecondaryIPv6Addresses": null,
"EndpointID": "cdddc3cd29e3cb40f68cf696f0d6dffadd08aa5bf256cd12cef180f04795ee83",
"Gateway": "172.17.0.1",
"GlobalIPv6Address": "fe80::242:ac11:4",
"GlobalIPv6PrefixLen": 64,
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "fe80::1",
"MacAddress": "02:42:ac:11:00:04",
"Networks": {
"bridge": {
"IPAMConfig": null,
"Links": null,
"Aliases": null,
"NetworkID": "3371009b227abe4e8992fbd9a56ea662ee76fd692b6d7080045d5deb055e29e3",
"EndpointID": "cdddc3cd29e3cb40f68cf696f0d6dffadd08aa5bf256cd12cef180f04795ee83",
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.4",
"IPPrefixLen": 16,
"IPv6Gateway": "fe80::1",
"GlobalIPv6Address": "fe80::242:ac11:4",
"GlobalIPv6PrefixLen": 64,
"MacAddress": "02:42:ac:11:00:04"
}
}
}
}
]

CSS Lint ignore all IE6 and IE7 based errors

I'm using Sublime Text 3, and CSS Linter.
In my settings I've put the ignore rule, and currently there is only the "outline-none" rule, I'd like to include all the rules which refer to IE6 and IE7 based errors.
Is there a list what are the IE6 and IE7 rules so that I can put them in the ignore array?
My CSSLint.sublime-settings look like this:
// CSSLint rules you wish to ignore. Must be an array. Leave blank to include all default rules.
{
"ignore": ["outline-none"]
}
To answer my own question, in the end I figured how to do what I need:
{
"user": {
"debug": false,
"delay": 0.25,
"error_color": "D02000",
"gutter_theme": "Packages/SublimeLinter/gutter-themes/Danish Royalty/Danish Royalty.gutter-theme",
"gutter_theme_excludes": [],
"lint_mode": "background",
"linters": {
"csslint": {
"#disable": false,
"args": [],
"box-sizing": false,
"errors": "",
"excludes": [],
"ignore": [
"outline-none",
"box-sizing",
"ids",
"adjoining-classes",
"floats",
"qualified-headings",
"unique-headings",
"important",
"universal-selector",
"box-model",
"font-faces",
"font-sizes"
],
"warnings": ""
},
"eslint": {
"#disable": true,
"args": [],
"excludes": []
},
"jscs": {
"#disable": true,
"args": [],
"excludes": []
},
"jshint": {
"#disable": false,
"args": [],
"excludes": [],
"ignore": [
"newcap"
],
"newcap": false,
"tab_size": 4
},
"jslint": {
"#disable": true,
"args": [],
"excludes": [],
"ignore": [
"newcap"
],
"newcap": false
},
"php": {
"#disable": false,
"args": [],
"excludes": []
}
},
"mark_style": "outline",
"no_column_highlights_line": false,
"passive_warnings": false,
"paths": {
"linux": [],
"osx": [],
"windows": []
},
"python_paths": {
"linux": [],
"osx": [],
"windows": []
},
"rc_search_limit": 3,
"shell_timeout": 10,
"show_errors_on_save": false,
"show_marks_in_minimap": true,
"syntax_map": {
"html (django)": "html",
"html (rails)": "html",
"html 5": "html",
"php": "html",
"python django": "python"
},
"warning_color": "D02000",
"wrap_find": true
}
}
Just go to Preferences > Package Settings > SublimeLinter > Settings - User and paste the above in the opened file.
These are the options that I found not to be of practical importance, so I just ignored them.
Hope it helps :)

Resources