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 : Jenkinks : Invalid plugin. sfdx only supports plugins with a namespace. #143

Closed
tempflip opened this Issue Jul 17, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@tempflip
Copy link

tempflip commented Jul 17, 2017

I'm running sfdx on an amazon EC2 machine, and when running sfdx in Jenkins context, I'm getting the following errors. It both happening when I'm running something complex like
/usr/local/bin/sfdx force:auth:jwt:grant -u peter@xxxxx -a cpq-dev-main --clientid xxxxxxx --jwtkeyfile /keys/cpq/dev-main.key

or something simple like
/usr/local/bin/sfdx force

or

sfdx update

These commands are running without any problems when logged into the same machine on the terminal (as ec2-user ), so I think the error is happening when sfdx wants to update itself from Jenkins. Any ideas? Should be some user or permission issue, but i can't figure it out :( Thanks!

This is the output from Jenkins:

[SFDX CPQ DEV-MAIN] $ /bin/sh -xe /tmp/jenkins3514512082226085389.sh
+ /usr/local/bin/sfdx force
Installing required plugins for force... ▸    Invalid plugin. sfdx only supports plugins with a namespace.
Build step 'Execute shell' marked build as failure
Finished: FAILURE

The same issue is described here by another developer:

https://wipdeveloper.com/2017/06/22/salesforce-dx-jenkins-jenkinsfile/
(Jenkins and Windows)

@amphro

This comment has been minimized.

Copy link
Contributor

amphro commented Jul 17, 2017

Plugins are stored in the user's directory. I'm assuming that is why you are seeing "Installing required plugins for force.." even though they are installed for your ec2 user. I would try to run that command while logged into the jenkins user.

As for "Invalid plugin. sfdx only supports plugins with a namespace.", that is usually from an invalid or old salesforcedx plugin. Can you run the command with SFDX_DEBUG=1 and print out sfdx version and env?

@tempflip

This comment has been minimized.

Copy link
Author

tempflip commented Jul 18, 2017

Hi Thomas, thanks for your reply!

What is happening is definitely an update cycle error in my Jenkins home directory:

+ export SFDX_DEBUG=1
+ SFDX_DEBUG=1
+ /usr/local/bin/sfdx force
Executing /var/lib/jenkins/.local/share/sfdx/cli/bin/sfdx
sfdx-cli/5.7.6-d42cf65 (linux-amd64) go1.7.5 /var/lib/jenkins/.local/share/sfdx/cli/bin/sfdx cmd: force
Installing required plugins for force...2017/07/18 08:29:57 running npm from /var/lib/jenkins/.local/share/sfdx/plugins: /var/lib/jenkins/.local/share/sfdx/cli/lib/node /var/lib/jenkins/.local/share/sfdx/cli/lib/npm/cli.js install salesforcedx --loglevel=info
npm info it worked if it ends with ok
npm info using npm@3.10.10
npm info using node@v6.9.5
.
.
.
npm info lifecycle salesforcedx@40.1.1~install: salesforcedx@40.1.1
npm info lifecycle salesforcedx@40.1.1~postinstall: salesforcedx@40.1.1
/var/lib/jenkins/.local/share/sfdx/plugins
└── salesforcedx@40.1.1 

npm WARN enoent ENOENT: no such file or directory, open '/var/lib/jenkins/.local/share/sfdx/plugins/package.json'
npm WARN plugins No description
npm WARN plugins No repository field.
npm WARN plugins No README data
npm WARN plugins No license field.
npm info ok 
 ▸    Invalid plugin. sfdx only supports plugins with a namespace.
Invalid plugin. sfdx only supports plugins with a namespace.

/home/ubuntu/.go_workspace/src/github.com/heroku/cli/plugins.go:322 (0x4178d7)
/home/ubuntu/.go_workspace/src/github.com/heroku/cli/plugins.go:413 (0x41862e)
/home/ubuntu/.go_workspace/src/github.com/heroku/cli/start.go:139 (0x41b2a2)
/home/ubuntu/.go_workspace/src/github.com/heroku/cli/start.go:78 (0x41a492)
/home/ubuntu/.go_workspace/src/github.com/heroku/cli/main.go:22 (0x41194a)
/usr/local/go/src/runtime/proc.go:183 (0x4517a4)
/usr/local/go/src/runtime/asm_amd64.s:2086 (0x47fb31)

Maybe the problem is somewhere on Heroku CLI tool's side (which is maybe somehow the base for SFDX..?) ?

The very same log is showed when I'm running it from terminal (as ec2-user) using sfdx update (but without the final error).

The versions are the same for both users:

sfdx-cli/5.7.6-d42cf65 (linux-amd64) go1.7.5 /home/ec2-user/.local/share/sfdx/cli/bin/sfdx cmd: version
sfdx-cli/5.7.6-d42cf65 (linux-amd64) go1.7.5 sfdxstable

sfdx-cli/5.7.6-d42cf65 (linux-amd64) go1.7.5 /var/lib/jenkins/.local/share/sfdx/cli/bin/sfdx cmd: version
sfdx-cli/5.7.6-d42cf65 (linux-amd64) go1.7.5 sfdxstable

Now I'll try to set up a Jenkins instance on my desktop machine and see, if it works.

thanks,

@gt2985

This comment has been minimized.

Copy link

gt2985 commented Sep 5, 2017

@tempflip any luck solving this? I`m facing the same error?

@ajaylankipalle

This comment has been minimized.

Copy link

ajaylankipalle commented Oct 2, 2017

Any luck on this issue please?

@gt2985

This comment has been minimized.

Copy link

gt2985 commented Oct 2, 2017

@ajaylankipalle It got resolved for me when i got the salesforce dx which was correct for my platform.

@ajaylankipalle

This comment has been minimized.

Copy link

ajaylankipalle commented Oct 2, 2017

@gt2985, thank you for your reply. How to get the correct sfdx for my platform? Mine is Windows 10

@tempflip tempflip closed this Aug 17, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.