SalesforceCommerceCloud / sfcc-ci

Salesforce Commerce Cloud CLI
https://npmjs.com/package/sfcc-ci
BSD 3-Clause "New" or "Revised" License
231 stars 94 forks source link

Uploading cartridges code to staging environment using the SFCC-CI client #474

Open gmoulin opened 1 year ago

gmoulin commented 1 year ago

sfcc-ci Version

2.11.0

NodeJS Version

14.17.5

sfcc-ci Path

/cygdrive/c/Users/g.moulin/AppData/Roaming/npm/sfcc-ci

Host OS Details

Windows Microsoft Windows 11 Pro 10.0.22000 N/A Build 22000

Description

Hello,

I am currently using Eclipse and UX studio to upload code to a staging instance and I want to replace this setup with the SFCC-CI client.

I managed to install the tool using the documentation on https://github.com/SalesforceCommerceCloud/sfcc-ci .

I set up an account.demandware.com API key for it. I set up my staging instance according to the documentation. ("Open Commerce API Settings" and "WebDAV Client Application Permissions")

I configured the dw.json file like this: (passwords and email redacted) { "client-id": "becf4f98-93d9-48fd-aa2f-d5d32953562b", "client-secret": "xxxxxxxxxxxxxx", "username": "g.moulin@xxxxx.com", "password": "xxxxxxxxxxxxxx", "hostname": "staging-eshop-xxxxx.demandware.net" }

I manage to get the authentication and basic commands working.

But when I tried to upload code using the "sfcc-ci code:deploy" command, it does not work.

I tried:

Please note that I can upload code using Eclipse and I have access to the staging environment WebDav using WinSCP without problems.

From my research, it seems the error is linked to the TLS version, but I did not find any solution to force it. (Already tried forcing the TLS version for node, without success)

Relevant log output

[DEBUG] No dw.json found in C:\xxxxx\tmp
REQUEST {
  baseUrl: 'https://cert.staging.eshop.xxxxx.demandware.net',
  uri: '/on/demandware.servlet/webdav/Sites/cartridges/test.zip',
  auth: {
    bearer: 'eyJ0eXAiOiJKV1QiLCJraWQiOiJEMWhPUDdEODN4TjBqZWlqaTI3WWFvZFRjL0E9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJnLm1vdWxpbkB2aWxlYnJlcXVpbi5jb20iLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MC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fRP1fj85myHBacT2-cB-eFUjuFkmHBNYXGtIgxU8ogvgF40RSQ'
  },
  strictSSL: true,
  method: 'PUT',
  callback: [Function (anonymous)]
}
REQUEST make request https://cert.staging.eshop.xxxxx.demandware.net/on/demandware.servlet/webdav/Sites/cartridges/test.zip
{
  request: {
    debugId: 1,
    uri: 'https://cert.staging.eshop.xxxxx.demandware.net/on/demandware.servlet/webdav/Sites/cartridges/test.zip',
    method: 'PUT',
    headers: {
      host: 'cert.staging.eshop.xxxxx.demandware.net',
      authorization: 'Bearer eyJ0eXAiOiJKV1QiLCJraWQiOiJEMWhPUDdEODN4TjBqZWlqaTI3WWFvZFRjL0E9IiwiYWxnIjoiUlMyNTYifQ.eyJzdWIiOiJnLm1vdWxpbkB2aWxlYnJlcXVpbi5jb20iLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiYWJkZjZmZmUtM2E1Ny00YTQ3LWJiMGItZDBiMjVjNWY0NmRjLTU3MTI2NDQ4MCIsInN1Ym5hbWUiOiJnLm1vdWxpbkB2aWxlYnJlcXVpbi5jb20iLCJpc3MiOiJodHRwczovL2FjY291bnQuZGVtYW5kd2FyZS5jb206NDQzL2R3c3NvL29hdXRoMiIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6Ik9XUVQtTGxpZHp5VXBPTEZNVDhJaTdNbVBUTSIsImF1ZCI6ImJlY2Y0Zjk4LTkzZDktNDhmZC1hYTJmLWQ1ZDMyOTUzNTYyYiIsIm5iZiI6MTY3ODE4MTg4OSwiZ3JhbnRfdHlwZSI6InRva2VuIiwic2NvcGUiOlsidGVuYW50RmlsdGVyIiwicHJvZmlsZSIsInJvbGVzIl0sImF1dGhfdGltZSI6MTY3ODE4MTc0NCwicmVhbG0iOiIvIiwiZXhwIjoxNjc4MTgzNjg5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0NfVVNFUiIsIkNSTV9PUkdfQURNSU4iLCJPQ0FQSV9FWFBMT1JFUl9ERUJVR19VU0VSIiwiU0xBU19PUkdBTklaQVRJT05fQURNSU4iLCJSTkRfUEVSRk9STUFOQ0VfVVNFUiIsIk9NX1VTRVIiLCJDQ0RYX1NCWF9VU0VSIiwiTE9HQ0VOVEVSX1VTRVIiXX0.ZU8H6ej66FI5w9Cap5TxyZ5dBxCL-_HG-3ipFnaZy90rm9Hw7wpzomDiQq-a-PFCcjfkX3zmP95l6l2y8Jp7bCCES-RNsskRPsiFNR0RqJUddeDKRr5_KB_zplFabqKcgraYlw46ljSPllYLi7TlY0bwWdnOzyp8WppBJYNwpFFnz8cgSXBfd_qtEcKQsSC-S4ZdYj5kMFpzn8N7mnAZbqRufuPlyE9RpYaekI21o-3m5-jZfJGCeMunV_Vs-SjxO0EbLqHngPjx8B2xd825mqjJNCoceuF8TeKBfRP1fj85myHBacT2-cB-eFUjuFkmHBNYXGtIgxU8ogvgF40RSQ',
      'content-type': 'application/zip'
    }
  }
}
Error: Network or certificate error
Error: An error occured. Try running the command again with -D,--debug flag.
[DEBUG] Error code: EPROTO, message: write EPROTO 11680:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1544:SSL alert number 40
, stack: Error: write EPROTO 11680:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:c:\ws\deps\openssl\openssl\ssl\record\rec_layer_s3.c:1544:SSL alert number 40

    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
esmiralha commented 1 year ago

any news on that bug? We have tried with node v14.16.1 and have regenerated the certificate without success.

jelizaldecapptus commented 1 year ago

I have subscribed to this issue because I am experiencing the exact same behavior, with the one difference that I was able to deploy the code the first time without any troubles, but trying it a second time has given me the errors @gmoulin mentioned. I have tried the same steps mentioned in the bug and still receiving the same error.

Error: Network or certificate error
Error: An error occured. Try running the command again with -D,--debug flag.
[DEBUG] Error code: EPROTO, message: write EPROTO 4456170880:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1563:SSL alert number 40
, stack: Error: write EPROTO 4456170880:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1563:SSL alert number 40

    at WriteWrap.onWriteComplete [as oncomplete] (internal/stream_base_commons.js:94:16)
rohanmallick08 commented 1 year ago

Did anyone figured out the issue and any solutions to fix it?

christopherjanzen commented 1 year ago

It seems we are facing the same issue here. Following for potential fix.

sneha-ranosys commented 1 year ago

Facing the same issue with error : Error code: undefined, message: mac verify failure, stack: Error: mac verify failure Did anyone figureed out the issue and any solutions to fix it?