client-javascript icon indicating copy to clipboard operation
client-javascript copied to clipboard

axios: https request produce error with SSL

Open VladislavAkulich opened this issue 6 years ago • 13 comments

I've got the error when I executed tests, which used this client on Jenkins environment.

Error: write EPROTO 140597680499200:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../../vendor/node/deps/openssl/openssl/ssl/s23_clnt.c:797:

at axios.then.catch (/home/jenkins/workspace/test_e2e/<project-name>/test/node_modules/reportportal-client/lib/rest.js:27:23)
at <anonymous>:null:null

It look like the following issues with axios package: https://github.com/axios/axios/issues/1680

VladislavAkulich avatar Mar 27 '19 08:03 VladislavAkulich

@VladislavAkulich are you sure assigning it to me? )

DzmitryHumianiuk avatar Mar 27 '19 11:03 DzmitryHumianiuk

@BorisOsipov

avarabyeu avatar Mar 27 '19 12:03 avarabyeu

Have you tried to google smth before submiting issue? https://stackoverflow.com/a/50781170

It works perfecly for EPAM production instance, my local setup and EPAM rp demo... So maybe issue in your server setup then?

BorisOsipov avatar Mar 27 '19 12:03 BorisOsipov

@BorisOsipov @DzmitryHumianiuk @VladislavAkulich https://github.com/axios/axios/issues/658#issuecomment-284291595

Guys, if mentioned in issue's commit is the case, moving to axios is a big mistake and the change must be reverted. What do you think?

avarabyeu avatar Mar 27 '19 12:03 avarabyeu

  1. restler(previous http client) doesn't support work under proxy at all see https://github.com/danwrong/restler/issues/176 So reverting won't help
  2. Issue closed with explanation "I think the problem is that the proxy you're configuring is an HTTP server, not HTTPS." So, configure you env correctly.
  3. I don't care. I've already made fork for my projects to avoid dependencies from this repo

BorisOsipov avatar Mar 27 '19 12:03 BorisOsipov

@VladislavAkulich resolved?

DzmitryHumianiuk avatar Apr 05 '19 17:04 DzmitryHumianiuk

Not resolved for me. I get this error when setting up an https url to Report Portal.

Error: Request failed with status code 404: {"timestamp":1559165140583,"status":404,"error":"Not Found","message":"No message available","path":"/api/v1/myproject/user"}
    at axios.then.catch (C:\dev\myproject\node_modules\reportportal-js-client\lib\rest.js:27:23)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7)

The funny thing is, Report Portal still gets the test results. The error makes me think it didn't work at all.

navisayslisten avatar May 29 '19 21:05 navisayslisten

@navisayslisten your problem aren't related to https. You ran into issue that has been fixed by https://github.com/reportportal/client-javascript/pull/31/commits/b64e919cb5825928290ef1c912085239bd79b468

BorisOsipov avatar May 30 '19 09:05 BorisOsipov

@BorisOsipov fix is not yet released, right?

DzmitryHumianiuk avatar May 30 '19 16:05 DzmitryHumianiuk

Don't know

On Thu, May 30, 2019 at 7:23 PM Dzmitry Humianiuk [email protected] wrote:

@BorisOsipov https://github.com/BorisOsipov fix is not yet released, right?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/reportportal/client-javascript/issues/30?email_source=notifications&email_token=ABRWMZENIKHGVFABVFBXKBTPX75OTA5CNFSM4HBUVOSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWSZIWY#issuecomment-497390683, or mute the thread https://github.com/notifications/unsubscribe-auth/ABRWMZBYU6Y7Z4EVK22JFR3PX75OTANCNFSM4HBUVOSA .

--

-- Best regards, Boris Osipov

BorisOsipov avatar May 31 '19 09:05 BorisOsipov

Guys, please elevate the proxy parameter from the axios client to the reportportal client's configuration as it causes integration issues for those behind proxy servers.

Viacheslav-Romanov avatar Jul 18 '19 03:07 Viacheslav-Romanov

@BorisOsipov I'm seeing a similar issue. In my case, we have a certificate issued by our corporate CA.

xadvfh avatar Nov 23 '20 21:11 xadvfh

I am unable to use certificate in report portal

mudit94 avatar Aug 01 '23 12:08 mudit94