• Jirong Hu
  • NEWBIE
  • 5 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 3
    Replies
We are using the following command to deploy changes to SF org, and it works well:
"F:\sfdx\bin\sfdx" force:mdapi:deploy -u ${p:SF_ORG_ALIAS} -d force-app-mdapi --testlevel RunLocalTests --json -w 45 –g

But after we enabled Shield Platform Encryption,
https://help.salesforce.com/s/articleView?id=sf.security_pe_deterministic.htm&type=5, we are getting this error:
Indexed cannot be enabled for Deterministically encrypted fields without Unique - Case Sensitive attribute.

Any idea what's wrong?
I got this error from this command, any idea why? 
F:\sfdx\bin\sfdx force:mdapi:deploy -u wmcsfdev -c -d force-app-mdapi --testlevel RunLocalTests --json -w 30 -g

"stack": "mdapiDeployFailed: The metadata deploy operation failed.\n    at ALMError (C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\sfdx\\client\\7.122.1-5e1c7e6\\node_modules\\salesforce-alm\\dist\\lib\\core\\almError.js:42:19)\n    at MdDeployReportApi._throwErrorIfDeployFailed (C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\sfdx\\client\\7.122.1-5e1c7e6\\node_modules\\salesforce-alm\\dist\\lib\\mdapi\\mdapiDeployReportApi.js:354:25)\n    at C:\\Windows\\System32\\config\\systemprofile\\AppData\\Local\\sfdx\\client\\7.122.1-5e1c7e6\\node_modules\\salesforce-alm\\dist\\lib\\mdapi\\mdapiDeployReportApi.js:308:36\n    at tryCatcher
Our SF admin has followed this to setup long time before:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm

Today they exported the private key to me, but I got this error running from a new Windows 2019 server:
 
>"F:\sfdx\bin\sfdx" auth:jwt:grant -u cicd.user@xxx.com.wmc.wmcsfdev -f server.key -i 3MVG97wqanbUM37KbSx.HVlzzrX363UiDRzhhwnA6lfcq6fkpU2LMZdaw1F7qi8v.iT4aM4V22rJGqAi -a wmcsfdev -r
https://xxxwmc-wmcsfdev.my.salesforce.com
ERROR running auth:jwt:grant:  We encountered a JSON web token error, which is likely not an issue with Salesforce CLI. Here’s the error: Error authenticating with JWT config due to: certificate has expired
I found a cert on the org, seems not expired, not sure if its in the right place. I am a DevOps engineer, not SF admin.

User-added imageCan anyone give me an idea how to troubleshoot this?

Thanks
Jirong
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm#sfdx_dev_auth_jwt_flow

Following the above steps, I am keeping on getting this error in running this command, any idea why? I am using free Developer edition online.
 
sfdx auth:jwt:grant --clientid mQ_ZAy3OwMRG2dGPyIt8KME3N --jwtkeyfile C:\Users\hujir\JWT\server.key --username jirong.hu@playful-bear-6bongz.com  --setdefaultdevhubusername --setalias my-hub-org
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm#sfdx_dev_auth_jwt_flow

Following the above steps, I am keeping on getting this error in running this command, any idea why? I am using free Developer edition online.
 
sfdx auth:jwt:grant --clientid mQ_ZAy3OwMRG2dGPyIt8KME3N --jwtkeyfile C:\Users\hujir\JWT\server.key --username jirong.hu@playful-bear-6bongz.com  --setdefaultdevhubusername --setalias my-hub-org
https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_auth_jwt_flow.htm#sfdx_dev_auth_jwt_flow

Following the above steps, I am keeping on getting this error in running this command, any idea why? I am using free Developer edition online.
 
sfdx auth:jwt:grant --clientid mQ_ZAy3OwMRG2dGPyIt8KME3N --jwtkeyfile C:\Users\hujir\JWT\server.key --username jirong.hu@playful-bear-6bongz.com  --setdefaultdevhubusername --setalias my-hub-org

Is it possible to run Azure DevOps pipelines using Salesforce DX? Presumably the sfdx cli needs to be installed, but unsure of a starting point.

I've seen a video leveraging ANT scripts, but nothing so far with sfdx.

I am unable to successfully login using the Salesforce DX CLI. I have tried numerous techniques, all to no avail. In am on Windows 10 utilizing the latest version of the CLI from Powershell and Google Chrome as my web browser.

As a side note, the "sfdx update" command works successfully.

Technique 1. When logging in using what is supposed to be the easiest approach by using force:auth:web:login, the CLI opens a web browser. Once I enter my credentials, the OAuth flow calls back into localhost:1717, but apparently the CLI isn't listening. Chrome complains with an ERR_EMPTY_RESPONSE and no response payload. Command line indicates "Unable to verify the first certificate." Turning on logging (even at the trace level) does not reveal any additional information.

Technique 2. I created a self-signed certificate using openssl along with a new connected app. Then using the CLI, I utilized the force:auth:jwt:grant function. This failed with the same error message as above: "Unable to verify the first certificate."

Technique 3. I disabled SSL verification and strict SSL in npm and forced the CLI to go through Fiddler. I then configured Fiddler to ignore certificate errors. Still, neither one of the above techniques worked after this.

Any idea what I'm doing wrong?