Can't run DEMO TestCases in 0.16 (TypeScript/Network behind a proxy)

bug-report

#1

I’ve tried to run TypeScript DEMO TestCases in Chrome an Firefox. Unfortunately, the apps is freezing and won’t even let me to stop running TestCases. Webtestit tried to install dependencies but crashed eventually (Screenshot with red log)


info: Listening for Ranorex Selocity on port 3000
Checking for update
Update for version 0.16.0 is not available (latest version: 0.16.0, downgrade is disallowed).
trying to spawn xml language server in C:\Ranorex\Webtestit\ts-demoshop...
trying to spawn typescript language server in C:\Ranorex\Webtestit\ts-demoshop...
spawned typescript language server with pid (16424)
spawned xml language server with pid (8820)
spawing process: 'npm run clean' CWD: C:\Ranorex\Webtestit\ts-demoshop []

> [email protected] clean C:\Ranorex\Webtestit\ts-demoshop
> rimraf dist

 []
time process: 'npm run clean' CWD: C:\Ranorex\Webtestit\ts-demoshop: 3176.716ms
process: 'npm run clean' CWD: C:\Ranorex\Webtestit\ts-demoshop []
{ Error: Process exited with Error
    at ChildProcess.proc.on (C:\Users\e13pcd3\AppData\Local\Programs\rxse-app\resources\app.asar\dist\backend\project\base-scaffold.ts:236:18)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) code: 1, signal: null } []
error: error { Error: Process exited with Error
    at ChildProcess.proc.on (C:\Users\e13pcd3\AppData\Local\Programs\rxse-app\resources\app.asar\dist\backend\project\base-scaffold.ts:236:18)
    at emitTwo (events.js:125:13)
    at ChildProcess.emit (events.js:213:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) code: 1, signal: null }
spawing process: 'npm install' CWD: C:\Ranorex\Webtestit\ts-demoshop []
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clean: `rimraf dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\e13pcd3\AppData\Roaming\npm-cache\_logs\2018-09-14T08_07_03_236Z-debug.log
 []
error: error npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] clean: `rimraf dist`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] clean script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\e13pcd3\AppData\Roaming\npm-cache\_logs\2018-09-14T08_07_03_236Z-debug.log

Der Befehl "rimraf" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
 []
error: error Der Befehl "rimraf" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.


#2

Hi @milan.dugovic!

Thanks for pointing out this issue out to us.
For now it’s needed to change your package.json to provide the proxy information to selenium-standalone by hand.

"postinstall": "selenium-standalone install --proxy=http://username:[email protected]:800"

after modifying the package.json, restart Webtestit and reopen project.
We have this issue already on our backlog and will be addressed in an upcoming release!

Let us know if this resolves your issue temporarily.

Thanks,
Manuel


#3

Hi @mgrundner!

Didn’t fix my problem. Additionally I had to run following command in my project folder

SET HTTPS_PROXY=http://[IP_ADDRESS:PORT] && npm audit fix

Which fixed following

+ [email protected]
added 1 package from 2 contributors, removed 8 packages and updated 5 packages in 3.543s
fixed 1 of 1 vulnerability in 448 scanned packages

But even after that, Selenium Server is not running on my specified port, but on 4444

11:57:31.242 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444



Selenium started

2018-09-14 11:57:31.452:INFO::main: Logging initialized @622ms to org.seleniumhq.jetty9.util.log.StdErrLog
11:57:32.624 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444

#4

Ho @milan.dugovic!

Currently, we have no easy way of specifying the port selenium runs on, for now, it’s using the default 4444 port and is not related to the proxy at all. Is there any need why you need to specify the selenium port to a different port? If yes, can you please explain this in further detail, so we can look forward to solve this issue in the future.

The fix i provided you is just for downloading the selenium drivers needed for local endpoints.

You can try to run an npm install directly from your project path and try out if the error still persists, cause it seems like webtestit has troubles downloading the dependencies from npm without the correct proxy settings in place.

I’m sorry for the inconveniences.

Thanks
Manuel


#5

Hi @milan.dugovic!
It seams like we totally missed something about proxy configuration on typescript projects:

How to setup node behind a web proxy

try to set your proxy gloablly for npm. to do so run the following stuff from the command line

npm config set proxy http://proxy.company.com:8080
npm config set https-proxy http://proxy.company.com:8080

I hope this will solve your issue

Thanks
Manuel