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

SFDX version 7.155.0 is failing to create/install package version due to "Missing config object" error #1576

Closed
honeyverma opened this issue Jun 16, 2022 · 13 comments
Labels
bug Issue or pull request that identifies or fixes a bug

Comments

@honeyverma
Copy link

honeyverma commented Jun 16, 2022

Summary

We have our CI-CD pipeline which creates a new version for every PR/Push, however, suddenly it started failing with error: "Missing config object"
PS: We always installed a new version of SFDX in our pipeline server

Steps To Reproduce: (in our unlocked package repo pipeline)

  1. Install sfdx: npm i sfdx-cli --global
  2. Dev-hub auth: sfdx auth:jwt:grant --clientid *** --jwtkeyfile server.key --username *** --setdefaultdevhubusername -a <devHubAlias>
  3. Create package version: sfdx force:package:version:create -p onagsf -d force-app -k test1234 --wait 120 -v OnProd2.0 -c --definitionfile config/project-scratch-def.json

Expected result

Version should be created (as it was created for last 1 year until today morning)

Actual result

Failed with an error message: ERROR running force:package:version:create: Missing config object.

System Information

  1. We run our CI-CD on GitHub actions
  2. We are using npm i sfdx-cli --global
  3. Version would: 7.155.0 (which released today)

Additional information

SFDX release: 7.155.0

@honeyverma honeyverma added the investigating We're actively investigating this issue label Jun 16, 2022
@github-actions
Copy link

Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.

@honeyverma honeyverma changed the title SFDX version 7.155.0 failing to create package version due to "Missing config object" error SFDX version 7.155.0 is failing to create package version due to "Missing config object" error Jun 16, 2022
@honeyverma
Copy link
Author

We found the same issue for installation:

Run sfdx force:package:install -p "[email protected]" -u OnUat2.0 -k test1234 -w 20
ERROR running force:package:install:  Missing config object.

@honeyverma honeyverma changed the title SFDX version 7.155.0 is failing to create package version due to "Missing config object" error SFDX version 7.155.0 is failing to create/install package version due to "Missing config object" error Jun 16, 2022
@honeyverma
Copy link
Author

honeyverma commented Jun 16, 2022

It seems npm i sfdx-cli --global is installing 7.155.1, which is the latest as of now.
As a workaround, I downgraded it in our CI-CD to 7.152.0

@shetzel
Copy link
Contributor

shetzel commented Jun 16, 2022

Thanks for posting. Are you able to reproduce this locally (outside of CI)? Are you able to reproduce this error with any other commands in the same plugin, e.g., force:mdapi:legacy:convert. Can you please post just the stack trace output when you append --dev-debug

@honeyverma
Copy link
Author

honeyverma commented Jun 16, 2022

Thanks for posting. Are you able to reproduce this locally (outside of CI)? Are you able to reproduce this error with any other commands in the same plugin, e.g., force:mdapi:legacy:convert. Can you please post just the stack trace output when you append --dev-debug

Yes, I installed the latest version 7.155.1 and I got the same error locally, so far I tried with 2 commands:

  1. sfdx force:package:install -p [email protected] -u hUat2.0 -k test1234 -w 15 --dev-debug

Result:

...
sf:GlobalInfo INFO Writing to config file: /Users/honey.verma/.sf/sf.json +25ms
ERROR running force:package:install:  Missing config object. 
*** Internal Diagnostic ***

MissingConfigObject: Missing config object.
    at Function.wrap (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/sfError.js:61:25)
    at PackageInstallCommand.catch (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:255:44)
    at async PackageInstallCommand._run (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@salesforce/command/lib/sfdxCommand.js:93:13)
    at async Config.runCommand (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:173:24)
    at async SfdxMain.run (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async SfdxMain._run (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Object.run (/opt/homebrew/lib/node_modules/sfdx-cli/dist/cli.js:162:47)
******
  1. sfdx force:package:version:create -p onagsf -d force-app -k test1234 --wait 60 -v hProd2.0 -c --definitionfile config/project-scratch-def.json --dev-debug

Resullt:

...
  sf:GlobalInfo INFO Writing to config file: /Users/honey.verma/.sf/sf.json +29ms
ERROR running force:package:version:create:  Missing config object. 
*** Internal Diagnostic ***

MissingConfigObject: Missing config object.
    at Function.wrap (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@salesforce/core/lib/sfError.js:61:25)
    at PackageVersionCreateCommand.catch (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/salesforce-alm/dist/ToolbeltCommand.js:255:44)
    at async PackageVersionCreateCommand._run (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@salesforce/command/lib/sfdxCommand.js:93:13)
    at async Config.runCommand (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@oclif/config/lib/config.js:173:24)
    at async SfdxMain.run (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/main.js:27:9)
    at async SfdxMain._run (/opt/homebrew/lib/node_modules/sfdx-cli/node_modules/@oclif/command/lib/command.js:43:20)
    at async Object.run (/opt/homebrew/lib/node_modules/sfdx-cli/dist/cli.js:162:47)
******

Btw, I tried to narrow down the issue, I tried 1st command (package installation) works fine on my scratch org, it seems it is failing for sandbox or production (devHub) only.

@shetzel
Copy link
Contributor

shetzel commented Jun 17, 2022

When it worked for your scratch org, was it set as the default org for your project so you did not specify a targetusername, e.g., -u hUat2.0? I'm wondering if this is related to another bug I'm fixing. If you set your sandbox or prod org as the defaultusername for your project and try the package install or version create commands without specifying the targetusername I'm curious if it works.

@shetzel shetzel added bug Issue or pull request that identifies or fixes a bug and removed investigating We're actively investigating this issue labels Jun 17, 2022
@honeyverma
Copy link
Author

Hey @shetzel

I provided the targetusername like for scratch org:
sfdx force:package:install -p [email protected] -u hBaseTest -k test1234 -w 15

and it worked fine for me

@honeyverma
Copy link
Author

btw, I am facing the same issue with sfdx force:package:version:list -p onagsf where I just wanted to see the list.

Unfortunately, I need to downgrade the sfdx cli version bcz I couldn't move forward with development, so I couldn't test more on 7.155.1

@shetzel
Copy link
Contributor

shetzel commented Jun 20, 2022

@honeyverma - if you are able to, can you retry your steps after:
sfdx plugins:install salesforce-alm@latest
and let me know if that fixed it for you?

When finished testing uninstall that plugin version with:
sfdx plugins:uninstall salesforce-alm

@omazhar
Copy link

omazhar commented Jun 21, 2022

@honeyverma @shetzel

We've been experiencing the same issue since 7.155.1 was released.

I just now tried installing the salesforce-alm plugin and somehow magically, the force:package:install command works.

I hope this was just to help troubleshoot as it looks like the salesforce-ulm plugin is archived.

@honeyverma
Copy link
Author

Thanks @omazhar ,

@shetzel it worked for me as well, I uninstalled and downgraded it again.

@omazhar
Copy link

omazhar commented Jun 22, 2022

@shetzel Can this be fixed in 7.156.x?

@shetzel
Copy link
Contributor

shetzel commented Jun 23, 2022

@omazhar @honeyverma - this should now be fixed in CLI v7.156.1, which is the latest production version promoted today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue or pull request that identifies or fixes a bug
Projects
None yet
Development

No branches or pull requests

3 participants