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

[Installation failed in git action and bitbucket pipeline] #223

Closed
geyin-o2e opened this issue Dec 10, 2021 · 29 comments
Closed

[Installation failed in git action and bitbucket pipeline] #223

geyin-o2e opened this issue Dec 10, 2021 · 29 comments
Assignees
Labels
bug Something isn't working

Comments

@geyin-o2e
Copy link

Issue verification check :

CI/CD running into failed to install SGD around 6pm EST today

echo "y" | sfdx plugins:install sfdx-git-delta
using above command line install sgd in git action after CLI installed.

got below error:
<--- Last few GCs --->

[1747:0x5ba5350] 64679 ms: Scavenge 2025.5 (2081.1) -> 2022.2 (2081.1) MB, 11.1 / 0.0 ms (average mu = 0.403, current mu = 0.391) allocation failure
[1747:0x5ba5350] 64702 ms: Scavenge 2026.8 (2081.1) -> 2024.1 (2081.1) MB, 7.1 / 0.0 ms (average mu = 0.403, current mu = 0.391) allocation failure
[1747:0x5ba5350] 64737 ms: Scavenge 2029.6 (2081.1) -> 2026.6 (2097.1) MB, 18.3 / 0.0 ms (average mu = 0.403, current mu = 0.391) allocation failure

<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
1: 0xb02ec0 node::Abort() [/usr/local/bin/node]
2: 0xa181fb node::FatalError(char const*, char const*) [/usr/local/bin/node]
3: 0xced88e v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
4: 0xcedc07 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]
5: 0xea5ea5 [/usr/local/bin/node]
6: 0xeb557d v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]
7: 0xeb827e v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]
8: 0xe796aa v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/usr/local/bin/node]
9: 0x11f2e86 v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]
10: 0x15e7879 [/usr/local/bin/node]
Error: yarn add sfdx-git-delta@latest --non-interactive
--mutex=file:/home/runner/.local/share/sfdx/yarn.lock
--preferred-cache-folder=/home/runner/.cache/sfdx/yarn --check-files
exited with code null
Error: Process completed with exit code 1.


workaround:
npm install sfdx-git-delta@latest -g
still working fun.

@geyin-o2e geyin-o2e added the bug Something isn't working label Dec 10, 2021
@nagendraks
Copy link

nagendraks commented Dec 10, 2021

Same issue here, so instead of echo "y" | sfdx plugins:install sfdx-git-delta we have to use npm install sfdx-git-delta@latest -g ?

Not able to use the workaround in our github-action pipeline. This is a blocker for us till PROD.

@scolladon
Copy link
Owner

Hello @geyin-o2e and @nagendraks !

Thanks for raising this issue and sorry for this inconvenience in PROD

It seems to be related to the heap size available in the github action...
I'm not really familiar with the limitation of this product, have you been able to contact them and see where is the issue ?
I wonder if we can do something at the plugin level here

@sc5148
Copy link

sc5148 commented Dec 10, 2021

@scolladon We are running into the same error on gitlab too. Can this be taken into priority since we are unable to deploy anything at the moment.

@nagendraks
Copy link

Hi @scolladon This is even occuring when installing the plugin locally.

`nagendrasingh@Nagendras-MacBook-Pro ~ % echo y | sfdx plugins:install sfdx-git-delta
This plugin is not digitally signed and its authenticity cannot be verified. Continue installation y/n?: Finished digital signature check.
warning sfdx-git-delta > @salesforce/core > jsforce > request@2.88.2: request has been deprecated, see request/request#3142
warning sfdx-git-delta > @salesforce/core > jsforce > request > har-validator@5.1.5: this library is no longer supported
warning sfdx-git-delta > @salesforce/core > jsforce > request > uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.

<--- Last few GCs --->

[40700:0x7f880c900000] 96277 ms: Mark-sweep 4038.6 (4130.5) -> 4029.8 (4137.0) MB, 407.0 / 0.0 ms (average mu = 0.152, current mu = 0.094) allocation failure scavenge might not succeed
[40700:0x7f880c900000] 96729 ms: Mark-sweep 4045.6 (4137.0) -> 4032.3 (4139.5) MB, 405.1 / 0.0 ms (average mu = 0.128, current mu = 0.103) allocation failure scavenge might not succeed

<--- JS stacktrace --->

FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x1062bb815 node::Abort() (.cold.1) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
2: 0x104fbaaa9 node::Abort() [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
3: 0x104fbac1f node::OnFatalError(char const*, char const*) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
4: 0x10513b877 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
5: 0x10513b813 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
6: 0x1052dcc65 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
7: 0x1052e0cad v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
8: 0x1052dd58d v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
9: 0x1052daaad v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
10: 0x1052e7de0 v8::internal::Heap::AllocateRawWithLightRetrySlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
11: 0x1052e7e61 v8::internal::Heap::AllocateRawWithRetryOrFailSlowPath(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
12: 0x1052b4fb7 v8::internal::Factory::NewFillerObject(int, bool, v8::internal::AllocationType, v8::internal::AllocationOrigin) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
13: 0x10566a89e v8::internal::Runtime_AllocateInYoungGeneration(int, unsigned long*, v8::internal::Isolate*) [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
14: 0x105a142b9 Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/Users/nagendrasingh/.local/share/sfdx/client/7.130.1-fe4ce6c/bin/node]
Installing plugin sfdx-git-delta... failed
Error: yarn add sfdx-git-delta@latest --non-interactive --mutex=file:/Users/nagendrasingh/.local/share/sfdx/yarn.lock --preferred-cache-folder=/Users/nagendrasingh/Library/Caches/sfdx/yarn --check-files exited with code null`

@scolladon
Copy link
Owner

Aouch...

What is your context of installation ? Version of node, version of sfdx, version of yarn

$ uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins

@nagendraks
Copy link

@scolladon

nagendrasingh@Nagendras-MacBook-Pro ~ % uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins
Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
zsh: command not found: yarn
v14.18.1
git version 2.30.1 (Apple Git-130)
sfdx-cli/7.130.1 darwin-x64 node-v16.13.1
no plugins installed

Yarn is not installed in local, but I think this gets installed when installing sfdx-git-delta

@scolladon
Copy link
Owner

Yes, I think sfdx-cli uses its own yarn installation if not found in the context.

Two things here:

  1. yarn is not installed and then sfdx-cli uses a version we don't know
  2. sfdx-cli is installed with nodev16 but your installation of node currently running is v14

Could you try to have yarn latest installed, latest node v14 and sfdx-cli on v14 installed and rerun the installation ?

@nagendraks
Copy link

@scolladon Any how, I installed yarn too:

nagendrasingh@Nagendras-MacBook-Pro ~ % uname -v ; yarn -v ; node -v ; git --version ; sfdx --version ; sfdx plugins
Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64
1.22.17
v14.18.1
git version 2.30.1 (Apple Git-130)
sfdx-cli/7.130.1 darwin-x64 node-v16.13.1
no plugins installed
nagendrasingh@Nagendras-MacBook-Pro ~ %

Still getting the same issue.

@nagendraks
Copy link

Hi @scolladon This was working till yesterday and suddenly it started throwing heap issues. Is there any other way of installing this?

@sc5148
Copy link

sc5148 commented Dec 10, 2021

Hi @scolladon This was working till yesterday and suddenly it started throwing heap issues. Is there any other way of installing this?

Same for us as well. We deployed successfully yesterday at 15:15 CET with the same configuration as we are doing it now.

@scolladon
Copy link
Owner

That is weird, we have not deployed anything at the plugin level since 24 November 2021.
It seems to be related to sfdx-cli.

Could you try downgrade the version of sfdx-cli and test the installation ?

@Becheep
Copy link

Becheep commented Dec 10, 2021

Hi @scolladon,
Same issue, it stoped working 13hours ago.
One of my project using sgd is in 7.86.3 sfdx-cli version since months and node is 14.6.0 since months too

@scolladon
Copy link
Owner

@Becheep which version of the plugin are you using ? (sfdx plugins)

@Becheep
Copy link

Becheep commented Dec 10, 2021

@scolladon I'm running on sfdx-git-delta 4.11.0 on last succeeded deployment with the script bellow :
echo y | sfdx plugins:install -f sfdx-git-delta
sfdx plugins

Since it doesn't install, i don't have the version of the failure with command sfdx plugins. But i guess it's the same one

@jayayy
Copy link

jayayy commented Dec 10, 2021

hey same issue, this popped up 5 hours ago and didn't occur anytime before that. what could the underlying issue be?

@scolladon
Copy link
Owner

I reproduce locally, but not only with sgd, all other plugins I want to install also fails

@jayayy
Copy link

jayayy commented Dec 10, 2021

there was a new release for salesforce/cli as seen here:
image
can this be the reason?

@scolladon
Copy link
Owner

Yes it could

I tried using the latest, stable and 7.129.0 from npm and I couldn't install any plugin with any sfdx version:

$ npm install -g sfdx-cli@stable
$ sfdx plugins:install sfdx-git-delta
=> Fails
$ sfdx plugins:install sfpowerkit
=> Fails
...
$ npm install -g sfdx-cli@7.129.0
$ sfdx plugins:install sfdx-git-delta
=> Fails
$ sfdx plugins:install sfpowerkit
=> Fails
...
$ npm install -g sfdx-cli@latest
$ sfdx plugins:install sfdx-git-delta
=> Fails
$ sfdx plugins:install sfpowerkit
=> Fails

Issue may come from the underlying module used to install plugin

@jayayy
Copy link

jayayy commented Dec 10, 2021

i just tried installing the package, here is the progress. let me know if you can see the reason of success here.
image

@sheidasf
Copy link

we are having the same issue. it was working on Wednesday and it stopped working on Thur (12/9/21). we are using this in the Bitbucket Pipeline.
FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory

node --version gives me: v16.13.1
sfdx --version gives me: sfdx-cli/7.131.0 linux-x64 node-v16.13.1

the install command: echo 'y' | sfdx plugins:install -f sfdx-git-delta

thank you. Any help will be appreciated, we are blocked from our deployment.

@danilocar
Copy link

Same problem is happening here, but you can use the workaround proposed by @geyin-o2e.
To install, instead of echo 'y' | sfdx plugins:install -f sfdx-git-delta use npm install sfdx-git-delta@latest -g.
And to execute you can use the legacy sgd command, so instead of
sfdx sgd:source:delta --to HEAD --from HEAD^ --output .
use
sgd --to HEAD --from HEAD^ --repo . --output .

@mehdisfdc
Copy link
Collaborator

mehdisfdc commented Dec 10, 2021

This issue seems to affect all Salesforce CLI plugins, not just SGD.

See Issues with installing sfdx-plugins - JavaScript heap out of memory #1319

@teotia32
Copy link

I faced the same issue and I went to one previous version and it worked fine. Try this out.
echo 'y' | sfdx plugins:install sfdx-git-delta@4.10.0

@scolladon
Copy link
Owner

It seems to be back
I have been able to reinstall sfdx and sgd plugins

$ npm install -g sfdx-cli@latest
$ sfdx plugins:install sfdx-git-delta
=> Success 😄 

@nagendraks
Copy link

@scolladon Yes this is working now.. pphhheeewwwww....

@nagendraks
Copy link

I think we can close this bug as it was a global issue rather than this plugin.

@scolladon
Copy link
Owner

scolladon commented Dec 11, 2021

Hello here !

As we all see, this bug is fixed and business can comeback to usual, I close this issue ! 🎊

I would like to say thanks to you all 🙏
I was personally amazed by the number of people who get involved and tried to help troubleshooting the issue, search on the web potential root causes, provide feedback on context and test different scenarios.
It feels very good to be part of such a community, thank you all ❤️

Stay tuned and be sure we will do our best to ship high quality product !

@sheidasf
Copy link

sheidasf commented Dec 11, 2021 via email

@scolladon
Copy link
Owner

Hi @sheidasf,

I think you could use a prebuilt docker image with everything in it, this way you will not have to reinstall sfdx-cli and the plugins you use each time you need to use them.
Using a prebuilt image allows you to not be exposed to this kind of issue.
The drawback of a prebuilt docker environment is that you need to rebuild it at each new sfdx-cli and plugins release.
If the new build image is not working you can still use the previous working one you have.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

10 participants