SalesforceCommerceCloud / b2c-crm-sync

... a contemporary perspective on how to integrate B2C Commerce and the Salesforce Customer 360 Platform to power frictionless customer experiences in the B2C domain.
https://salesforcecommercecloud.github.io/b2c-crm-sync/
BSD 3-Clause "New" or "Revised" License
65 stars 47 forks source link

Deployment to Non-Scratch Org Failed #89

Open luismiguelferreiraPWC opened 2 years ago

luismiguelferreiraPWC commented 2 years ago

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:

Your remote environment details:

Additional context Add any other context about the problem here.

jbachelet commented 2 years ago

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

luismiguelferreiraPWC commented 2 years ago

Hi @jbachelet ,

Thanks for the quick response.

Errors: errorLog2

luismiguelferreiraPWC commented 2 years ago

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 commented 2 years ago

@jbachelet

image

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

jbachelet commented 2 years ago

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

luismiguelferreiraPWC commented 2 years ago

@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 commented 2 years ago

@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?