Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
gmoulin opened this issue Mar 20, 2023 · 5 comments
Open
Labels
bug Something isn't working

Comments

@gmoulin
Copy link

gmoulin commented Mar 20, 2023

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:

  • sfcc-ci code:deploy test.zip -i www-staging.xxxxx.com
    Got a "403 Forbidden" error.

  • sfcc-ci code:deploy test.zip -i staging-eshop-xxxxx.demandware.net -c /path/to/cert/cert.p12 -p "cert passphrase" -D
    (redacted)
    Got Error code: EPROTO, message: write EPROTO 19628: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 19628: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

  • Checking the debug, I saw the "Assuming staging-eshop-xxxxx.demandware.net is a staging instance, replacing with cert.* format" sentence, so I tried
    sfcc-ci code:deploy test.zip -i cert.staging.eshop.xxxxx.demandware.net -c /path/to/cert/cert.p12 -p "cert passphrase" -D
    Got the same error.

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.eyJzdWIiOiJnLm1vdWxpbkB2aWxlYnJlcXVpbi5jb20iLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXVkaXRUcmFja2luZ0lkIjoiYWJkZjZmZmUtM2E1Ny00YTQ3LWJiMGItZDBiMjVjNWY0NmRjLTU3MTI2NDQ4MCIsInN1Ym5hbWUiOiJnLm1vdWxpbkB2aWxlYnJlcXVpbi5jb20iLCJpc3MiOiJodHRwczovL2FjY291bnQuZGVtYW5kd2FyZS5jb206NDQzL2R3c3NvL29hdXRoMiIsInRva2VuTmFtZSI6ImFjY2Vzc190b2tlbiIsInRva2VuX3R5cGUiOiJCZWFyZXIiLCJhdXRoR3JhbnRJZCI6Ik9XUVQtTGxpZHp5VXBPTEZNVDhJaTdNbVBUTSIsImF1ZCI6ImJlY2Y0Zjk4LTkzZDktNDhmZC1hYTJmLWQ1ZDMyOTUzNTYyYiIsIm5iZiI6MTY3ODE4MTg4OSwiZ3JhbnRfdHlwZSI6InRva2VuIiwic2NvcGUiOlsidGVuYW50RmlsdGVyIiwicHJvZml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09ORklHVVJBVE9SX1VTRVIiLCJDQ19BRE1JTiIsIlJORF9VU0VSIiwiUk5EX0NVU1RPTUVSX0FETUlOIiwiQ0NfVVNFUiIsIkNSTV9PUkdfQURNSU4iLCJPQ0FQSV9FWFBMT1JFUl9ERUJVR19VU0VSIiwiU0xBU19PUkdBTklaQVRJT05fQURNSU4iLCJSTkRfUEVSRk9STUFOQ0VfVVNFUiIsIk9NX1VTRVIiLCJDQ0RYX1NCWF9VU0VSIiwiTE9HQ0VOVEVSX1VTRVIiXX0.ZU8H6ej66FI5w9Cap5TxyZ5dBxCL-_HG-3ipFnaZy90rm9Hw7wpzomDiQq-a-PFCcjfkX3zmP95l6l2y8Jp7bCCES-RNsskRPsiFNR0RqJUddeDKRr5_KB_zplFabqKcgraYlw46ljSPllYLi7TlY0bwWdnOzyp8WppBJYNwpFFnz8cgSXBfd_qtEcKQsSC-S4ZdYj5kMFpzn8N7mnAZbqRufuPlyE9RpYaekI21o-3m5-jZfJGCeMunV_Vs-SjxO0EbLqHngPjx8B2xd825mqjJNCoceuF8TeKBfRP1fj85myHBacT2-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.eyJzdWIiOiJnLm1vdWxpbkB2aWxlYnJlcXVpbi5jb20iLCJjdHMiOiJPQVVUSDJfU1RBVEVMRVNTX0dSQU5UIiwiYXV0aF9sZXZlbCI6MCwiYXV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j85myHBacT2-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)
@gmoulin gmoulin added the bug Something isn't working label Mar 20, 2023
@esmiralha
Copy link

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

@jelizaldecapptus
Copy link

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
Copy link

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

@christopherjanzen
Copy link

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

@sneha-ranosys
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants