Application Development and Automation Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Hybris API called from NextJS app

stirupachur
Explorer
0 Likes
1,418
  • SAP Managed Tags

I am not able to run the app as its giving the following error - ITs a SSL invalid certificate issue -

In postman I am able to run it by suppressing the warning - Can anyone tell me where is the certificate file stored and can it be replaced or how to make it work

FetchError: request to https://127.0.0.1:9002/us-admin/rest/v2/rodanandfields-us/products/AAWA125?fields=DEFAULT failed, reason: connect ECONNREFUSED 127.0.0.1:9002 at ClientRequest.<anonymous> (/Users/stirupachur/ContentStackDiscovery/rodanplusfields-Aug12/node_modules/node-fetch/lib/index.js:1461:11) at ClientRequest.emit (events.js:375:28) at TLSSocket.socketErrorListener (_http_client.js:475:9) at TLSSocket.emit (events.js:375:28) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { type: 'system', errno: 'ECONNREFUSED', code: 'ECONNREFUSED' }

----------------------------------------------------------------------------------------------------

Ran the openssl and got the following

openssl s_client -CApath /Users/stirupachur/ContentStackDiscovery/certs/ -connect localhost:9002

CONNECTED(00000005)

depth=0 C = DE, ST = platform, L = platform, CN = hybris

verify error:num=20:unable to get local issuer certificate

verify return:1

depth=0 C = DE, ST = platform, L = platform, CN = hybris

verify error:num=21:unable to verify the first certificate

verify return:1

I am not able to run the app as its giving the following error - ITs a SSL invalid certificate issue -

In postman I am able to run it by suppressing the warning - Can anyone tell me where is the certificate file stored and can it be replaced or how to make it work

FetchError: request to https://127.0.0.1:9002/us-admin/rest/v2/rodanandfields-us/products/AAWA125?fields=DEFAULT failed, reason: connect ECONNREFUSED 127.0.0.1:9002 at ClientRequest.<anonymous> (/Users/stirupachur/ContentStackDiscovery/rodanplusfields-Aug12/node_modules/node-fetch/lib/index.js:1461:11) at ClientRequest.emit (events.js:375:28) at TLSSocket.socketErrorListener (_http_client.js:475:9) at TLSSocket.emit (events.js:375:28) at emitErrorNT (internal/streams/destroy.js:106:8) at emitErrorCloseNT (internal/streams/destroy.js:74:3) at processTicksAndRejections (internal/process/task_queues.js:82:21) { type: 'system', errno: 'ECONNREFUSED', code: 'ECONNREFUSED' }

----------------------------------------------------------------------------------------------------

Ran the openssl and got the following

openssl s_client -CApath /Users/stirupachur/ContentStackDiscovery/certs/ -connect localhost:9002

CONNECTED(00000005)

depth=0 C = DE, ST = platform, L = platform, CN = hybris

verify error:num=20:unable to get local issuer certificate

verify return:1

depth=0 C = DE, ST = platform, L = platform, CN = hybris

verify error:num=21:unable to verify the first certificate

verify return:1

1 REPLY 1
Read only

RobertJancich
Participant
0 Likes
990
  • SAP Managed Tags

Can you please send screenshots and describe what exactly are you trying to do? Running postman i assume also you can store certificate elswhere Working with certificates | Postman Learning Center

But you seem to have issue with running app - does it mean you expect to have stored certificate on local machine, or in SAP Cloud, etc.?