mdasberg / ng-apimock

Node plugin that provides the ability to use scenario based api mocking: for local development for protractor testing
MIT License
99 stars 26 forks source link

Not able to communicate with mock server from app when mock server is in secure comunication(https) #81

Open lakshmi-236 opened 4 years ago

lakshmi-236 commented 4 years ago

HI, ngapimock is hosted/running in express server over https, by refering the below link im able to up mockserver in https. https://timonweb.com/posts/running-expressjs-server-over-https/ But after that not able to connect to mockserver while runnig protractor tests . getting error Ignoring uncaught error Error: socket hang up

App is able to communicate to the real backend with https and by default it communicates through https. but only with mock, its throwing error

below is the error log: a7a509ef-ad2a-4da1-840f-c8c5e8ff669f selectScenario: user/me : a7a509ef-ad2a-4da1-840f-c8c5e8ff669f selectScenario: employee/{code}/ : a7a509ef-ad2a-4da1-840f-c8c5e8ff669f [09:43:47] W/launcher - Ignoring uncaught error Error: socket hang up [09:43:47] W/launcher - Ignoring uncaught error Error: socket hang up [09:43:50] W/launcher - Ignoring uncaught error UnableToSetCookieError: unable to set cookie (Session info: chrome=77.0.3865.120) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:25:53' System info: host: 'TVMLT0558', ip: '172.21.64.1', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_221' Driver info: driver.version: unknown [09:43:50] W/launcher - Ignoring uncaught error Error: socket hang up [09:43:54] I/launcher - 0 instance(s) of WebDriver still running [09:43:54] I/launcher - chrome #01 failed 1 test(s) [09:43:54] I/launcher - overall: 1 failed spec(s) [09:43:54] E/launcher - Process exited with error code 1 [09:43:54] gulp-angular-protractor - We will stop the Protractor engine [09:43:57] gulp-angular-protractor - Webdriver standalone server will be closed Java terminated SUCCESS: The process "java.exe" with PID 124396 has been terminated.

mdasberg commented 4 years ago

@lakshmi-236 can you provide a dummy setup so I can have a look?

mdasberg commented 4 years ago

@lakshmi-236 ng-apimock has a new version, which is modular. I have just released a new version of the base-client (1.0.15) that supports https.

Please let me know if you run into any problems