webdriver-manager update with --alternate_cdn argument - protractor

I want to do the below in my protractor-cucumber framework. I can not use public repo like googleapi.com as per org policy:
webdriver-manager update --standalone=0 --chrome --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
Also this:
webdriver-manager update --chrome=0 --standalone --alternate_cdn https://www.artifactrepository.xyz.net/artifactory/api/npm-teamdev/
But i always get this as response:
C:\Users\ABCD\Desktop\JSProjects\protractor-cucumber>webdriver-manager
update --standalone=0 --chrome --alternate_cdn
https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/
curl -o
C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\downloads\chromedriver.xml
https://chromedriver.storage.googleapis.com/ curl
https://api.github.com/rate_limit -H "User-Agent:
angular/webdriver-manager" [ERROR]: { Error: getaddrinfo ENOTFOUND
api.github.com api.github.com:443
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26) errno: 'ENOTFOUND', code: 'ENOTFOUND', syscall: 'getaddrinfo',
hostname: 'api.github.com', host: 'api.github.com', port: 443 }
(node:8016) UnhandledPromiseRejectionWarning: TypeError: Cannot
convert undefined or null to object
at Function.keys ()
at getVersionObjs (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\utils\version_list.js:28:41)
at Object.getVersion (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\utils\version_list.js:12:25)
at GeckoDriver.updateBinary (C:\Users\ABCD\AppData\Roaming\npm\node_modules\webdriver-manager\dist\lib\provider\geckodriver.js:62:43)
at process._tickCallback (internal/process/next_tick.js:68:7) (node:8016) UnhandledPromiseRejectionWarning: Unhandled promise
rejection. This error originated either by throwing inside of an async
function without a catch block, or by rejecting a promise which was
not handled with .catch(). (rejection id: 1) (node:8016) [DEP0018]
DeprecationWarning: Unhandled promise rejections are deprecated. In
the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
I have also tried to modify the cdn url in ./node_modules/protractor/node_modules/webdriver-manager/config.json
{
"cdnUrls": {
"selenium": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"chromedriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"geckodriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/",
"iedriver": "https://www.artifactrepository.xyz.net/artifactory/api/npm/npm-teamdev/"
}
}
This one also did not work for me. I got the same error.
I want to know what's the issue here and how can how to resolve it?
Does webdriver-manager expect xml when the request hits custom CDN url?
If yes, is there a way to update if it returns html instead of xml. Because I can see all these drivers in the repo.

Related

Auto-complete not working in VSCode GraphQL extension

I struggle to get the VSCode GraphQL extension to work, more precisely its auto-complete feature.
I configured the extension with the url to my GraphQL server (opening it in the browser opens Playground which I enabled):
//graphql.config.js
module.exports = {
extensions: {
endpoints: {
default: {
url: "http://<my_url>:3000/graphql",
},
},
},
};
and the schema doesn't seem to get loaded. The auto-complete in gql`` is not working and what I can see in the extension output is:
9/25/2021, 6:52:35 PM [4] (pid: 18905) graphql-language-service-usage-logs: {"type":"usage","messageType":"initialize"}
(node:18905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:18905) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
is in debug mode: false
is in debug mode: false
(node:18905) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3)
[Error - 6:52:39 PM] Request textDocument/documentSymbol failed.
Message: Request textDocument/documentSymbol failed with message: A cached document cannot be found.
Code: -32603
[Error - 6:52:40 PM] Request textDocument/documentSymbol failed.
Message: Request textDocument/documentSymbol failed with message: A cached document cannot be found.
Code: -32603
Any idea what is the issue? All help appreciated!

Can not connect to MongoDB Atlas version 4.0

I can't connect to the last version of Atlas (4.0), but if using an older version it connects!
I got this message when trying to connect to version 4.0
(node:9920) UnhandledPromiseRejectionWarning: Error: queryTxt ETIMEOUT cluster0.zgdl9.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (dns.js:203:19)
(Use `node --trace-warnings ...` to show where the warning was created)
(node:9920) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:9920) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Go the the Network Access on your Atlas Cluster and check if you whitelisted your IP. You can also whitelist all IPs with 0.0.0.0/0. I think by default no IP is whitelisted and that is why you can't connect.

Webdriver-manager update unable to download geckodriver

I am trying to setup protractor for my angular app automation. I am on Node version 12 , I installed protractor version 5.4.3. when I use webdriver-manger update --proxy=blahblahproxy.com , I see the below error.
[13:37:06] I/config_source - curl -oC:\Users\******\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\gecko-response.json '**corpproxy**/repos/mozilla/geckodriver/releases' -H 'host:api.github.com'
(node:15904) UnhandledPromiseRejectionWarning: Error: response status code is not 200. It was 407
at Request.<anonymous> (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\built\lib\binaries\config_source.js:181:28)
at Request.emit (events.js:311:20)
at Request.onRequestResponse (C:\Users\*****\AppData\Roaming\npm\node_modules\protractor\node_modules\request\request.js:1059:10)
at ClientRequest.emit (events.js:311:20)
at HTTPParser.parserOnIncomingClient [as onIncoming] (_http_client.js:603:27)
at HTTPParser.parserOnHeadersComplete (_http_common.js:119:17)
at Socket.socketOnData (_http_client.js:476:22)
at Socket.emit (events.js:311:20)
at addChunk (_stream_readable.js:294:12)
at readableAddChunk (_stream_readable.js:275:11)
(node:15904) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:15904) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Chrome and selenium standlaone server are updated/downlaoded just fine
when i do webdriver-manager status
[13:39:39] I/status - selenium standalone version available: 3.141.59
[13:39:39] I/status - chromedriver version available: 80.0.3987.106
[13:39:39] I/status - geckodriver is not present
[13:39:39] I/status - IEDriverServer is not present
[13:39:39] I/status - android-sdk is not present
[13:39:39] I/status - appium is not present
Under corporate proxies we will face issues like this.
The 407 Proxy Authentication Required is an HTTP response status code indicating that the server is unable to complete the request because the client lacks proper authentication credentials for a proxy server that is intercepting the request between the client and server.
Option 1 : Try using selenium-standalone npm package. This is similar to webdriver-manager.
https://www.npmjs.com/package/selenium-standalone
Install this package globally
npm i -g selenium-standalone
Then to download/install the drivers
selenium-standalone install
Then to start the server
selenium-standalone start
(Or)
Option 2: https://stackoverflow.com/a/53358685/8903949

Strapi Start Install Issue on Mac

Having an issue installing Strapi on my Mac. Not sure what is going on really. Tried running npm install strapi-hook-strapi-mongoose and ran into 404 Not Found: strapi-hook-strapi-mongoose#latest.
USERs-MacBook-Pro:DIRECTORY USER$ strapi start
[2018-08-08T04:22:21.087Z] warn (hook:strapi-mongoose) `strapi-hook-strapi-mongoose` is missing in your dependencies. Please run `npm install strapi-hook-strapi-mongoose`
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/settings-manager/config/functions/bootstrap.js:17:26)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3)
(node:42355) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
(node:42355) UnhandledPromiseRejectionWarning: TypeError: strapi.models.core_store.forge is not a function
at Object.get (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/core/store.js:55:47)
at module.exports (/Users/USER/Documents/GitHub/DIRECTORY/plugins/users-permissions/config/functions/bootstrap.js:77:45)
at Promise (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:285:13)
at new Promise (<anonymous>)
at execBootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:273:11)
at Promise.all.Object.values.map.x (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:44)
at Array.map (<anonymous>)
at Strapi.bootstrap (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:312:35)
at Strapi.start (/Users/USER/Documents/GitHub/DIRECTORY/node_modules/strapi/lib/Strapi.js:107:18)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/email/config/functions/bootstrap.js:53:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 6)
(node:42355) UnhandledPromiseRejectionWarning: ReferenceError: config is not defined
at fs.readdir (/Users/USER/Documents/GitHub/DIRECTORY/plugins/upload/config/functions/bootstrap.js:55:40)
at process._tickCallback (internal/process/next_tick.js:68:7)
(node:42355) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 8)
[2018-08-08T04:22:25.197Z] info File changed: /Users/USER/Documents/GitHub/DIRECTORY/plugins/graphql/config/generated/schema.graphql
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.364Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.364Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
[2018-08-08T04:22:25.366Z] warn Bootstrap is taking unusually long to execute its callback 3500 miliseconds).
[2018-08-08T04:22:25.366Z] warn Perhaps you forgot to call it?
Installation
npm install strapi#alpha -g
Installation Guide
For Strapi installation Guide, Click here
Turns out this is a common Mac bug, instead of using the 'strapi' command where I too got that error, I created my project using yarn and I was able to get past it.
yarn create strapi-app new-project-name

Ionic 2: UnhandledPromiseRejectionWarning: Error: The platform "andorid" does not appear to have been added to this project

Got the following error while running the porject:
(node:5692) UnhandledPromiseRejectionWarning: Error: The platform "andorid" does not appear to have been added to this project.
at Object.getPlatformApi (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\platforms\platforms.js:46:15)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:54:38
at Array.map (<anonymous>)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:52:47
at _fulfilled (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:787:54)
at self.promiseDispatch.done (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:816:30)
at Promise.promise.promiseDispatch (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:749:13)
at C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:557:44
at flush (C:\Users\sivaramakrishnan.m\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\node_modules\q\q.js:108:17)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
(node:5692) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:5692) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[OK] Your app has been deployed.
Did you know you can live-reload changes from your app with --livereload?
It looks like you have a typo in the platform: "andorid" instead of "android"
Have you checked the command that you use to build?