majkinetor / au

Chocolatey Automatic Package Updater Module
GNU General Public License v2.0
227 stars 71 forks source link

updateall - invalid job state (Blocked) #69

Closed Redsandro closed 7 years ago

Redsandro commented 7 years ago

I'm trying out updateall with some au packages. I should use a script for that, but I like to try stuff one step at a time.

Here are some problems:

PS T:\choco-packages\automatic> updateall
Updating 7 automatic packages at 2017-02-24 03:19:05
Push is disabled
Invalid job state for touchdesigner:  + Blocked
Invalid job state for tomboy:  + Blocked
Invalid job state for touchdesigner:  + Blocked
Invalid job state for tomboy:  + Blocked
...etc

PS T:\choco-packages\automatic> Update-AUPackages
Updating 7 automatic packages at 2017-02-24 03:20:23
Push is disabled
Invalid job state for touchdesigner:  + Blocked
Invalid job state for tomboy:  + Blocked
Invalid job state for touchdesigner:  + Blocked
Invalid job state for tomboy:  + Blocked
...etc

I'm not very proficient with Powershell (or Windows, for that matter). Do you have an idea what causes this?

PS T:\choco-packages\automatic> Get-Host

Name             : ConsoleHost
Version          : 5.1.14409.1005
InstanceId       : 862d8953-e334-4009-aaf4-b3147728df2d
UI               : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture   : en-US
CurrentUICulture : en-US
PrivateData      : Microsoft.PowerShell.ConsoleHost+ConsoleColorProxy
DebuggerEnabled  : True
IsRunspacePushed : False
Runspace         : System.Management.Automation.Runspaces.LocalRunspace
PS T:\choco-packages\automatic> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      5.1.14409.1005
PSEdition                      Desktop
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
BuildVersion                   10.0.14409.1005
CLRVersion                     4.0.30319.18408
WSManStackVersion              3.0
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
majkinetor commented 7 years ago

@ MSDN

Blocked Command execution is blocked (on user input host calls etc)

I have never seen that. I added that warning in case it appears later. Jobs are left in the job queue after AU exits. You can examine them with job cmdlets (get-job , receive-job and friends).

I am not sure why it happens. Updaters look normal. You should really do that on AppVeyor because it is a reference machine for which I can download execution logs and inspect.

Redsandro commented 7 years ago

Thanks for looking into it. It appears to be some basic UAC-type blocking for security reasons. After launching vagrant, I need to Set-ExecutionPolicy Bypass -Scope Process* and it works fine.

*) Set-ExecutionPolicy unrestricted does not help.

You should really do that on AppVeyor

Yes I should. One step at a time. I don't like copy-pasting without understanding, especially when it is powerful, posts gists, has full git control, even over some private 'organisations' that I cannot seem to opt out, and does public commits. I don't know what I need to take into account to prevent it from publicizing my private repo's, api keys, mothers' maiden name, girlfriends private pictures and the location of my baseball card collection.

majkinetor commented 7 years ago

Glad to see you solved it. I do bypass on system initialization on new machine. I never disable UAC tho.

AV is all taken care off in secure manner :). That was my highest priority when implementing it. Of course, you can set it in unsecure way by mistake.