b2c-crm-sync icon indicating copy to clipboard operation
b2c-crm-sync copied to clipboard

Deployment to Non-Scratch Org Failed

Open luismiguelferreiraPWC opened this issue 3 years ago • 7 comments

Describe the bug I'm configuring the B2C CRM Sync in a Non-Scratch Org and while Im making the deployment it gives an exception that tells me to report on github.

To Reproduce Steps to reproduce the behavior:

  1. Run: npm run crm-sync:sf:org:deploy

Expected behavior

Should make the deployment of meta-data

Screenshots If applicable, add screenshots to help explain your problem. errorLog

Your local environment details:

  • Node version (node -v): 15.2.1
  • NPM version (npm -v): 7.24.2s
  • SFDX version (sfdx -v): sfdx-cli/7.118.1 win32-x86 node-v14.17.6

Your remote environment details:

  • Salesforce B2C Commerce version: 21.3
  • Salesforce Core version: [e.g. 52]

Additional context Add any other context about the problem here.

luismiguelferreiraPWC avatar Jan 04 '22 15:01 luismiguelferreiraPWC

Hello @luismiguelferreiraPWC ,

Thank you for posting this issue. Can you please run the sfdx force:source:deploy -p "./src/sfdc/base" command and give us the error rendered by SFDX?

Thanks in advance! Jordane

jbachelet avatar Jan 04 '22 16:01 jbachelet

Hi @jbachelet ,

Thanks for the quick response.

Errors: errorLog2

luismiguelferreiraPWC avatar Jan 04 '22 17:01 luismiguelferreiraPWC

Hey @jbachelet

Now I was able to make the deployment with your command, but when I do the command of the documentation I have a new error. Could I still continue with the doc? or this command should be working before I pass to the next chapter?

Error:

ErrorLog3

luismiguelferreiraPWC avatar Jan 05 '22 11:01 luismiguelferreiraPWC

@jbachelet

image

Im getting this error while trying to Extract the Public Key from the KeyStore

luismiguelferreiraPWC avatar Jan 05 '22 12:01 luismiguelferreiraPWC

Hello @luismiguelferreiraPWC ,

Regarding the issue with the authentication against your dev hub, are you sure you correctly authenticated against the devhub through sfdx?

Regarding the issue with the Keystore, we never had this issue before. Anyway, the CLI commands basically extract the certificate and the key from the .jks file. You could also do this manually with command-line commands (thanks to OpenSSL) instead of using our CLI commands.

I'm unable to reproduce both issues by the way, so really hard for me to provide guidance/help on these

jbachelet avatar Jan 14 '22 07:01 jbachelet

@jbachelet

I'm not using scratch orgs so do I need devhub?

Regarding the keystore I've tried to follow the doc 3 times in different PCs and I always get the same error. Could you present me the command-line commands to pass this step?

If you want we could have a call. Probably would be more easy to explain.

luismiguelferreiraPWC avatar Jan 14 '22 11:01 luismiguelferreiraPWC

@jbachelet

I've tried these commands: Export the .der file

keytool -export -alias sample -file sample.der -keystore id.jks

Convert the .der file to unencrypted PEM (crt file)

openssl x509 -inform der -in sample.der -out sample.crt

Export the .p12 file

keytool -importkeystore -srckeystore id.jks -destkeystore zzhb.p12 -deststoretype PKCS12

Convert the .p12 file to unencrypted PEM (key file)

openssl pkcs12 -in sample.p12 -nodes -nocerts -out sample.key

but didn't work.

Could we have a call or provide the commands to make it work?

luismiguelferreiraPWC avatar Jan 18 '22 13:01 luismiguelferreiraPWC