Sauce Labs with protractor, malformed URI - node.js

My protractor config is:
exports.config = {
baseUrl: 'http://www.onet.pl',
directConnect: false,
sauceUser: 'myuser',
sauceKey: 'mypassword',
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['show-fps-counter=true', '--allow-running-insecure-content']
}
},
}
When I try to launch the tests I get the following Error:
[12:57:56] I/sauce - Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub
[12:57:56] I/launcher - Running 1 instances of WebDriver
[12:57:56] E/launcher - URI malformed
[12:57:56] E/launcher - URIError: URI malformed
at decodeURIComponent (native)
at Url.parse (url.js:275:19)
at Object.urlParse [as parse] (url.js:81:5)
at new HttpClient (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\http\index.js:221:25)
at C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\executors.js:47:18
at ManagedPromise.invokeCallback_ (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:1379:14)
at TaskQueue.execute_ (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:2913:14)
at TaskQueue.executeNext_ (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:2896:21)
at asyncRun (C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:2820:25)
at C:\Users\gwk736\Gitlab\Inform\e2e\node_modules\selenium-webdriver\lib\promise.js:639:7
[12:57:56] E/launcher - Process exited with error code 199
Anyone encountered this problem when running tests ?
This is a very strange behaviour to me...
Unfortunately no examples can be found.

I was able to replicate your error by having incorrectly encoded characters in either sauceUser or sauceKey. Can you check if you have any such characters in your config?
sauceUser: 'myuser',
sauceKey: 'password%EA',
Error Stack:
[14:41:46] I/sauce - Using SauceLabs selenium server at http://ondemand.saucelabs.com:80/wd/hub
[14:41:46] I/launcher - Running 1 instances of WebDriver
[14:41:46] E/launcher - URI malformed
[14:41:46] E/launcher - URIError: URI malformed
at decodeURIComponent (native)
at Url.parse (url.js:195:19)
at Object.urlParse [as parse] (url.js:84:5)
This issue in nodeJs has been explained in this nodejs git issue
I just ran into this error when a client encoded 'ê' as '%EA' and an
'é' as "%E9" and then sent them to my node server. Attempting to
decode either of them result in the uri malformed error:
decodeURIComponent("%EA"); URIError: URI malformed at decodeURIComponent (native) at repl:1:1

Related

Getting Error In ImageMagick of Invalid Parameter - 150?

Hi all I am using ImageMagick to convert image. But while running the server I am getting the following Error. Anyone have the answer for this? The error is below>
Invalid Parameter - 150
ImageMagick Error:
Error: write EOF
events.js:377
throw er; // Unhandled 'error' event
^
Error: write EOF
at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
Emitted 'error' event on ImageMagick instance at:
at onwriteError (E:\git_clone\nuron_core_ns\node_modules\readable-
stream\lib\_stream_writable.js:449:12)
at onwrite (E:\git_clone\nuron_core_ns\node_modules\readable-
stream\lib\_stream_writable.js:470:11)
at WritableState.onwrite (E:\git_clone\nuron_core_ns\node_modules\readable-
stream\lib\_stream_writable.js:180:5)
at ImageMagick.Duplexify._destroy
(E:\git_clone\nuron_core_ns\node_modules\duplexify\index.js:190:18)
at E:\git_clone\nuron_core_ns\node_modules\duplexify\index.js:182:10
at processTicksAndRejections (internal/process/task_queues.js:77:11) {
errno: -4095,
code: 'EOF',
syscall: 'write'

MEAN: Unhandled rejection MongoError: not authorized on mean-dev to execute command

I installed meanjs in my OpenSUSE distro, however when I run npm start, here's what I get:
+ Important warning: config.domain is empty. It should be set to the fully qualified domain of the app.
Unhandled rejection MongoError: not authorized on mean-dev to execute command { listIndexes: "sessions", cursor: {} }
at Function.MongoError.create (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/cursor.js:212:36)
at /home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
at MongoStore.setAutoRemoveAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:129:40)
at MongoStore.handleNewConnectionAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:121:18)
at MongoStore (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:96:26)
at Object.module.exports.initSession (/home/tasher/Projects/meanjs_test/config/lib/express.js:120:12)
at Object.module.exports.init (/home/tasher/Projects/meanjs_test/config/lib/express.js:243:8)
at /home/tasher/Projects/meanjs_test/config/lib/app.js:25:23
at /home/tasher/Projects/meanjs_test/config/lib/mongoose.js:35:21
at process._tickCallback (internal/process/next_tick.js:109:7)
Unhandled rejection MongoError: not authorized on mean-dev to execute command { listIndexes: "sessions", cursor: {} }
at Function.MongoError.create (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/error.js:31:11)
at queryCallback (/home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/cursor.js:212:36)
at /home/tasher/Projects/meanjs_test/node_modules/mongodb-core/lib/connection/pool.js:469:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickCallback (internal/process/next_tick.js:104:9)
From previous event:
at MongoStore.setAutoRemoveAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:129:40)
at MongoStore.handleNewConnectionAsync (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:121:18)
at MongoStore (/home/tasher/Projects/meanjs_test/node_modules/connect-mongo/src/index.js:96:26)
at module.exports (/home/tasher/Projects/meanjs_test/config/lib/socket.io.js:73:20)
at Object.module.exports.configureSocketIO (/home/tasher/Projects/meanjs_test/config/lib/express.js:214:38)
at Object.module.exports.init (/home/tasher/Projects/meanjs_test/config/lib/express.js:258:14)
at /home/tasher/Projects/meanjs_test/config/lib/app.js:25:23
at /home/tasher/Projects/meanjs_test/config/lib/mongoose.js:35:21
at process._tickCallback (internal/process/next_tick.js:109:7)
error: uncaughtException: getaddrinfo ENOTFOUND linux-hcjz.suse date=Mon Aug 28 2017 22:46:50 GMT+0100 (WEST), pid=4497, uid=1000, gid=100, cwd=/home/tasher/Projects/meanjs_test, execPath=/usr/bin/node6, version=v6.11.1, argv=[/usr/bin/node6, /home/tasher/Projects/meanjs_test/server.js], rss=97284096, heapTotal=69029888, heapUsed=48863040, external=20182576, loadavg=[0.6513671875, 0.61669921875, 0.43505859375], uptime=3056
Error: getaddrinfo ENOTFOUND linux-hcjz.suse
at errnoException (dns.js:28:10)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:76:26)
I have re-installed meanjs twice but in vain. Mongo is also running. By the way:
tasher#linux-hcjz:~/Projects/meanjs_test> node -v
v6.11.1
tasher#linux-hcjz:~/Projects/meanjs_test> npm6 -v
3.10.10
Any thoughts?
try adding execution permission to your mean-dev
chmod 755 path_for_package/mean-dev
replace path path_for_package with your path

Node rdkafka consumer stops fetching messages

Consumer stops fetching after getting following error
{ Error: Local: Broker transport failure at Error (native) origin: 'local', message: 'broker transport failure', code: -1, errno: -1, stack: 'Error: Local: Broker transport failure\n at Error (native)' }
All kafka servers are healthy even then I am getting the transport failure .
After this error consumers stops fetching further messages

Cannot get 'getNegotiatedProtocol' of null when requesting via https in request.js

I'm doing http request using request.js, and I have run my program for a very long time this is the first time got this kind of error, it seems related to openssl and TLS issue. Does anybody have idea?
2017-02-20T14:27:34.330Z - error: Error: write EPROTO 140125135710016:error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number:../deps/openssl/openssl/ssl/s3_pkt.c:365:
at exports._errnoException (util.js:1022:11)
at WriteWrap.afterWrite (net.js:801:14) 2017-02-20T14:27:34.332Z - warn: worker warning, msg={"code":"EPROTO","errno":"EPROTO","syscall":"write"}
2017-02-20T14:27:34.348Z - error: uncaughtException: Cannot read property 'getNegotiatedProtocol' of null ,
version=v6.9.5,
argv=[/usr/bin/nodejs, /home/bda/tm/worker.js],rss=234672128, heapTotal=135876608, heapUsed=107730496, loadavg=[0.43798828125, 0.5263671875, 0.53857421875], uptime=906959,
trace=[column=36, file=_tls_wrap.js, function=TLSSocket._finishInit, line=588, method=_finishInit, native=false, column=38, file=_tls_wrap.js, function=TLSWrap.ssl.onhandshakedone, line=433, method=ssl.onhandshakedone, native=false], stack=[TypeError: Cannot read property 'getNegotiatedProtocol' of null, at TLSSocket._finishInit (_tls_wrap.js:588:36), at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:433:38)]

Nodejs module install error : Request path contains unescaped characters

I'm new to nodejs, npm and can't figure out why I'm getting this error. Any guesses ? I've tried this, but it didn't work
npm install -g mongoose
1220 http GET https://github.com/mongodb-js/node-pre-gyp/archive/v0.6.5-appveyor.tar.gz
1221 error TypeError: Request path contains unescaped characters.
1221 error at new ClientRequest (_http_client.js:73:11)
1221 error at Object.exports.request (http.js:49:10)
1221 error at TunnelingAgent.exports.request (https.js:136:15)
1221 error at TunnelingAgent.createSocket (C:\software\nodejs\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:117:25)
1221 error at TunnelingAgent.createSecureSocket [as createSocket] (C:\software\nodejs\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:184:41)
1221 error at TunnelingAgent.addRequest (C:\software\nodejs\node_modules\npm\node_modules\request\node_modules\tunnel-agent\index.js:80:8)
1221 error at new ClientRequest (_http_client.js:154:16)
1221 error at Object.exports.request (http.js:49:10)
1221 error at Object.exports.request (https.js:136:15)
1221 error at Request.start (C:\software\nodejs\node_modules\npm\node_modules\request\request.js:583:30
npm trying to use https to get the tar because of ambiguous configuration in '.npmrc' file. Here's the old config:
prefix = C:\software\nodejs
strict-ssl = false
http-proxy = http://[username]:[password]#[domain]:8080/
https-proxy = https://[username]:[password]#[domain]:8080/
registry = http://registry.npmjs.org/
Changing it to this resolve the issue:
prefix = C:\software\nodejs
http-proxy = http://[username]:[password]#[domain]:8080/
#angularjs2 require proxy as key, http-proxy gave the above error
proxy = http://[username]:[password]#[domain]:8080/
registry = http://registry.npmjs.org/

Resources