Choco: Path to combine cannot be empty error when running without login

Created on 2 Sep 2016  路  3Comments  路  Source: chocolatey/choco

Following #853, we are still seeing IFIleSystem.combine_paths be passed a left side that is empty https://github.com/chocolatey/choco/blob/401335b7ccf976e1b000580e8714776a84f62378/src/chocolatey/infrastructure/filesystem/DotNetFileSystem.cs#L69 is the error that is thrown.

It would be nice to determine what is being passed as empty to the method. Or at least get an idea of what method called this to make this happen.

3 - Done Bug

Most helpful comment

This will be fixed for 0.10.1 thanks to @noresjo providing great log output that immediately identified the problem!

All 3 comments

One way (for me at least) to get this is to run choco 0.10 choco.exe install -y -d- v notepadplusplysin a scheduled task set to start ONSTART. (run even though noone is logged on).

I too am seeing this behavior, and also think that no user logged in may be the culprit.

In my case, I'm using an automation tool that supports issuing remote commands to an agent, and although I don't fully understand how it works, I believe it uses a system service to execute those commands on the agent and doesn't require a user to be logged in.

I reliably see this error on a machine with no logged in user (shortly after a scheduled reboot) when issuing an install command. The package install script succeeds, but then I see the null ref error that follows it. Something like this:

The install of <package> was successful.
  Software install location not explicitly set, could be in package or 
  default install location if installer.
<package> not installed. An error occurred during installation:
 Value cannot be null.
Parameter name: path1

If I log in to the machine in question, and then issue the same remote command, the install succeeds.

This will be fixed for 0.10.1 thanks to @noresjo providing great log output that immediately identified the problem!

Was this page helpful?
0 / 5 - 0 ratings