Node tools fail in CI because of git
Details
Several Node tools fail to install in our CI. The reason is that the failing tools have a dependency on our nodejs.vm package, which fails to install because nodejs.vm has a dependency of git with no upper bound: 2.47.1 at the time of this issue. The GitHub runners we use were also updated to using this version of git on December 4th: https://github.com/actions/runner-images/commit/d868709391f31a50e728ca29184e9c60a96db826.
Since then an error occurs when our packages try to install, because it fails to install git as that version is already installed. But I think the tools still get installed because of https://github.com/chocolatey/choco/issues/3487 (it is supposed to be a bug, but it is a feature in this case :rofl:).
@emtuls had proposed to pin an older version to fix it in the CI, but this may not fix it for all users that may have another version install.
But all other fixes I can come up with are much more complicated to implement. As FLARE-VM/Commando-VM are recommended to be installed in an empty VM, unless someone has a better idea, I would go with @emtuls proposal. @mandiant/vms any better ideas?
@emtuls do you have time to work on this?
@Ana06
I'm not sure if this problem exists anymore, can you please confirm if the tools depending on nodejs are still failing to install in the CI due to this conflict?
Currently, our issue seems to be related to nodejs installation instead of git (I think previously it was because of git?).
It looks like it is possible that this is because nodejs is already installed on the github runner's, so it fails when trying to install it again, causing an exit code 1603: https://github.com/mandiant/VM-Packages/actions/runs/16612966290/job/46999608466#step:3:1890
That's what I gather from other peoples similar issue: https://stackoverflow.com/questions/73342656/failures-nodejs-lts-exited-1603-error-while-running-c-programdata-chocol#comment137393448_73577803
It's hard to say what the actual cause is because our logs don't say much (not sure what's going on there....might be a separate issue?) and I'm not sure how to generate the required log we need to see the error better.
Issue 1 - nodejs higher version already installed
I'm not entirely sure how to bypass the error if a newer (or possibly same?) version of nodejs is already installed (like the case on the runners, which we don't control). @Ana06 might have a solution for that?
Currently, we cap nodejs to version="[20.7.0, 20.8.0)": https://github.com/mandiant/VM-Packages/blob/main/packages/nodejs.vm/nodejs.vm.nuspec
Issue 2 - our logging isn't working well
Taking a quick look at log-VM-windows-2022.zip, it barely seems to show any information and also looks like it doesn't start at the beginning...? Any idea what might be causing that @Ana06 ?
The logs-choco-windows-2022.zip doesn't seem to give much information either as I don't see anything related to nodejs or other packages that install it (like asar.vm). The log seems to be filled with a large amount of junk as well...
Currently, our issue seems to be related to
nodejsinstallation instead ofgit(I think previously it was because of git?).It looks like it is possible that this is because
nodejsis already installed on the github runner's, so it fails when trying to install it again, causing an exit code1603: https://github.com/mandiant/VM-Packages/actions/runs/16612966290/job/46999608466#step:3:1890 That's what I gather from other peoples similar issue: https://stackoverflow.com/questions/73342656/failures-nodejs-lts-exited-1603-error-while-running-c-programdata-chocol#comment137393448_73577803It's hard to say what the actual cause is because our logs don't say much (not sure what's going on there....might be a separate issue?) and I'm not sure how to generate the required log we need to see the error better.
Issue 1 - nodejs higher version already installed
I'm not entirely sure how to bypass the error if a newer (or possibly same?) version of nodejs is already installed (like the case on the runners, which we don't control). @Ana06 might have a solution for that? Currently, we cap
nodejstoversion="[20.7.0, 20.8.0)": https://github.com/mandiant/VM-Packages/blob/main/packages/nodejs.vm/nodejs.vm.nuspecIssue 2 - our logging isn't working well
Taking a quick look at log-VM-windows-2022.zip, it barely seems to show any information and also looks like it doesn't start at the beginning...? Any idea what might be causing that @Ana06 ?
The logs-choco-windows-2022.zip doesn't seem to give much information either as I don't see anything related to
nodejsor other packages that install it (likeasar.vm). The log seems to be filled with a large amount of junk as well...
@emtuls
I've already solved this problem at #1474.
@emtuls can you please open a separate issue for the CI logs problem? This is something we need to fix, but it is unrelated to the node issue.