ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21.29k stars 1.41k forks source link

not finding update when run from task scheduler #5603

Closed josephnarai closed 1 year ago

josephnarai commented 1 year ago

Bug Report

I have created my own scoop bucket. Has been working happily for nearly a year. I've just released a new version of the app and my machines are not automatically updating themselves.

Our repo is located here: https://github.com/Design2Production/dp-scoop.git

I have an automated ps1 script that runs every day at 3am, which does ` try {

Execute the Update

scoop update
scoop update *

} catch { Write-Output "Update Exception:$_.Exception.Message" } `

Current Behavior

When running the script automatically as a task under task scheduler it seems to update scoop, but does NOT update my app When running the script manually under a power shell terminal it updates scoop and my app

If you look at the log outputs below, you'll see that when I run it manually, it says that the update for my app was pushed 25 hours ago: 4b262aa Push PRX1.7.6.0 25 hours ago

So it should have been picked up the scheduled update the day before...

Expected Behavior

Should run normally under both cases

Additional context/output

When running under task scheduler:

Windows PowerShell transcript start
Start time: 20230727030003
Username: SV10000601\SureVision
RunAs User: SV10000601\SureVision
Configuration Name: 
Machine: SV10000601 (Microsoft Windows NT 10.0.17763.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.EXE C:\scoop\apps\DeviceProxy\current\DPUpdateDeviceProxy.ps1
Process ID: 3248
PSVersion: 5.1.17763.1432
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.17763.1432
BuildVersion: 10.0.17763.1432
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1

Transcript started, output file is C:\ProgramData\DP\DeviceProxy\log\DeviceProxy-10000440-UpdateLog.txt

Start Device Proxy Update at 07/27/2023 03:00:03
Start Update
Updating Scoop...

Updating 'main' bucket...

 * 1b9c58c89 zeebe: Update to version 8.2.9                              33 minutes ago
 * cd73fec5a spicetify-cli: Update to version 2.22.1                     33 minutes ago
 * 0cab23ad6 sonar-scanner: Update to version 5.0.0.2966                 33 minutes ago
 * dffcdefae sentry-cli: Update to version 2.20.1                        33 minutes ago
 * 814bf2740 jenkins: Update to version 2.416                            33 minutes ago
 * 842069564 jenkins-lts: Update to version 2.401.3                      33 minutes ago
 * 751b07bbe deno: Update to version 1.35.3                              33 minutes ago
 * 267fc4d10 dart: Update to version 3.0.7                               33 minutes ago
 * 8ed3e3407 cloudflared: Update to version 2023.7.3                     33 minutes ago
 * e9b89c70b camunda-operate: Update to version 8.2.9                    33 minutes ago
 * 06936f13e supabase: Update to version 1.82.2                          4 hours ago
 * 91e33b454 qemu: Update to version 8.1.0-rc1                           4 hours ago
 * 441bc3286 lua-language-server: Update to version 3.6.25               4 hours ago
 * 5e4541875 ipinfo-cli: Update to version 3.0.1                         4 hours ago
 * 6a748c258 hexyl: Update to version 0.13.1                             4 hours ago
 * 0ac535ceb grex: Update to version 1.4.2                               4 hours ago
 * 0a69c2318 gleam: Update to version 0.30.4                             4 hours ago
 * 801b21ff8 odo: Update to version 3.13.0                               8 hours ago
 * 6a28adde2 curl: Update to version 8.2.1_1                             8 hours ago
 * 4041a309c red: Update to version 26jul23                              13 hours ago
 * 57672999e red-view: Update to version 26jul23                         13 hours ago
 * 834e88a5c red-toolchain: Update to version 26jul23                    13 hours ago
 * a1e491d2c trufflehog: Update to version 3.45.1                        16 hours ago
 * 74e67453a tickrs: Update to version 0.14.9                            16 hours ago
 * 77c258e46 nu: Update to version 0.83.0                                16 hours ago
 * 5f58ff193 kubescape: Update to version 2.3.8                          16 hours ago
 * 27243e0f1 firebase: Update to version 12.4.6                          16 hours ago
 * 7c81bbfbc dvc: Update to version 3.8.1                                16 hours ago
 * dc1f380a2 vault: Update to version 1.14.1                             21 hours ago
 * 614eba92b stoplight-prism: Update to version 5.1.0                    21 hours ago
 * 9d201477d pluto: Update to version 5.18.2                             21 hours ago
 * 055f20c50 lego: Update to version 4.13.3                              21 hours ago
 * d7ea36207 istioctl: Update to version 1.18.2                          21 hours ago
 * 19dd94e3d dolt: Update to version 1.8.3                               21 hours ago
 * d3289a0ea cmake: Update to version 3.27.1                             21 hours ago
 * b297183bb amass: Update to version 4.0.4                              21 hours ago
Updating 'scoop' bucket...

Scoop was updated successfully!
Latest versions for all apps are installed! For more information try 'scoop status'
Ping the portal -> Update end
Start Device Proxy Service
Update script complete

**********************
Windows PowerShell transcript end
End time: 20230727030018
**********************

When running manually in power shell admin terminal:

Windows PowerShell transcript start
Start time: 20230802171027
Username: SV10000601\SureVision
RunAs User: SV10000601\SureVision
Configuration Name: 
Machine: SV10000601 (Microsoft Windows NT 10.0.17763.0)
Host Application: C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
Process ID: 10136
PSVersion: 5.1.17763.1432
PSEdition: Desktop
PSCompatibleVersions: 1.0, 2.0, 3.0, 4.0, 5.0, 5.1.17763.1432
BuildVersion: 10.0.17763.1432
CLRVersion: 4.0.30319.42000
WSManStackVersion: 3.0
PSRemotingProtocolVersion: 2.3
SerializationVersion: 1.1.0.1

Transcript started, output file is C:\ProgramData\DP\DeviceProxy\log\DeviceProxy-10000440-UpdateLog.txt

Start Device Proxy Update at 08/02/2023 17:10:27
Start Update
Updating Scoop...

Updating 'main' bucket...

 * 2805b25c5 spicetify-cli@2.22.1: Set $env:SPICETIFY_CONFIG to $persi.. 31 minutes ago
 * 84543ae29 red: Update to version 02aug23                              3 hours ago
 * 59b8e0d8b red-view: Update to version 02aug23                         3 hours ago
 * 9d2816695 red-toolchain: Update to version 02aug23                    3 hours ago
 * 4abbc280b dolt: Update to version 1.8.8                               3 hours ago
 * 8693cdc72 docfx: Update to version 2.70.0                             3 hours ago
 * ff583e1a7 dmd: Update to version 2.105.0                              3 hours ago
 * 55134b903 gibo: Update to version 3.0.5 (#4999)                       4 hours ago
 * 92e0eba99 trufflehog: Update to version 3.46.2                        11 hours ago
 * 546f967be go: Update to version 1.20.7                                11 hours ago
 * c3a732893 typos: Update to version 1.16.2                             15 hours ago
 * 635828c1c terraform-ls: Update to version 0.31.4                      15 hours ago
 * c9e4f44c2 tektoncd-cli: Update to version 0.31.2                      15 hours ago
 * 0060b7b22 ruff: Update to version 0.0.282                             15 hours ago
 * 791277d17 ravendb: Update to version 5.4.109                          15 hours ago
 * 3187852e3 nim: Update to version 2.0.0                                15 hours ago
 * 2a994409e jenkins: Update to version 2.417                            15 hours ago
 * 56892beab ijhttp: Update to version 232.8660.185                      15 hours ago
 * 9fb73fed2 coder: Update to version 0.27.3                             15 hours ago
 * a64e68d15 smartmontools: Update to version 7.4-1                      19 hours ago
 * 497f5b481 keptn-cli: Update to version 1.4.1                          19 hours ago
 * 40bcc5e1d aqtinstall: Update to version 3.1.7                         19 hours ago
 * e87a26523 just: Suggests `fzf` (Closes #4973)                         20 hours ago
 * 6ab76ea9a twilio-cli: Add known issue (Close #4975)                   20 hours ago
 * 83a3389d8 red: Update to version 01aug23                              23 hours ago
 * b2d8e301b red-view: Update to version 01aug23                         23 hours ago
 * c6a485148 red-toolchain: Update to version 01aug23                    23 hours ago
 * ffe95a5c0 mockery: Update to version 2.32.2                           23 hours ago
 * 18f314ed4 hugo: Update to version 0.116.1                             23 hours ago
 * 843cf214e hugo-extended: Update to version 0.116.1                    23 hours ago
 * 1a1389395 azure-ps: Update to version 10.2.0.37547                    23 hours ago
 * 7c50da970 aws-sam-cli@1.94.0: Fix extraction (Closes #4980)           25 hours ago
 * 9a77d0c12 chromedriver: Update to version 115.0.5790.102 (#4996)      26 hours ago
 * 86c410463 cygwin@2.926: Fix hash (Closes #4997)                       26 hours ago
 * 09be99c46 dprint: Update to version 0.40.2                            27 hours ago
 * e0350aec2 azure-cli: Update to version 2.51.0                         27 hours ago
 * 538dfdd6c argocd: Update to version 2.7.10                            27 hours ago
 * abd291a36 act: Update to version 0.2.49                               27 hours ago
 * 65ca1f953 trufflehog: Update to version 3.46.1                        31 hours ago
 * 16489e467 selenium: Update to version 4.11.0                          31 hours ago
 * 91699cce9 sass: Update to version 1.64.2                              31 hours ago
 * 1208d3095 red: Update to version 31jul23                              31 hours ago
 * 0625b7ef2 red-view: Update to version 31jul23                         31 hours ago
 * bdb41b9b2 red-toolchain: Update to version 31jul23                    31 hours ago
 * f8e3be3a1 jfrog: Update to version 2.44.1                             31 hours ago
 * 5b446d4bf jdtls: Update to version 1.27.0-202307312307                31 hours ago
 * ad708cd18 harfbuzz: Update to version 8.1.0                           31 hours ago
 * 9bbe3e3b1 flyctl: Update to version 0.1.68                            31 hours ago
 * dd8d6fd1a cockroachdb: Update to version 23.1.7                       31 hours ago
 * 8f0e2f126 trufflehog: Update to version 3.46.0                        35 hours ago
 * 60353ab74 telegraf: Update to version 1.27.3                          35 hours ago
 * 19fe1a63c syft: Update to version 0.86.1                              35 hours ago
 * 2f35e3ae7 ruff: Update to version 0.0.281                             35 hours ago
 * afb8008d5 restic: Update to version 0.16.0                            35 hours ago
 * d13e8baa6 kustomize: Update to version 5.1.1                          35 hours ago
 * 0dffde63a grype: Update to version 0.65.0                             35 hours ago
 * b943bb518 flyctl: Update to version 0.1.67                            35 hours ago
 * 800f26ffb cuda: Update to version 12.2.1_536.67                       35 hours ago
 * 37cf02905 bazel: Update to version 6.3.1                              35 hours ago
 * f034fc892 syft: Update to version 0.86.0                              2 days ago
 * 84f5fcd64 simplex-chat: Update to version 5.2.1                       2 days ago
 * c32720399 sentry-cli: Update to version 2.20.3                        2 days ago
 * 3ed970a9b lefthook: Update to version 1.4.8                           2 days ago
 * 6b517c63f gping: Update to version 1.14.0                             2 days ago
 * e38490d04 erlang: Update to version 25.3.2.5                          2 days ago
 * 976037a4a dprint: Update to version 0.40.1                            2 days ago
 * 10db1bd33 circleci-cli: Update to version 0.1.28196                   2 days ago
 * 0b28cd43f nerdctl: Update to version 1.5.0                            2 days ago
 * 6202bc801 hugo: Update to version 0.116.0                             2 days ago
 * ab31aa93e hugo-extended: Update to version 0.116.0                    2 days ago
 * e03ddafe2 curl: Update to version 8.2.1_2                             2 days ago
 * c8fd8de0c updatecli: Add to path, remove shim (#4991)                 2 days ago
 * 6e7042234 rust-analyzer: Update to version 2023-07-31                 2 days ago
 * e16e7307b d2: Update to version 0.6.0                                 2 days ago
 * 6b737796e dprint: Update to version 0.40.0                            2 days ago
 * fbeba40e9 ast-grep: Update to version 0.10.0                          2 days ago
 * c3e2a2b37 kubeshark: Update to version 41.6                           2 days ago
 * 84896bfea jdtls: Update to version 1.27.0-202307310010                2 days ago
 * 3a54318d8 updatecli: Update to version 0.55.0                         2 days ago
 * fef72527d pnpm: Update to version 8.6.11                              2 days ago
 * 348f5635c nu: Update to version 0.83.1                                2 days ago
 * 540f19038 jc: Update to version 1.23.4                                2 days ago
 * 3b9a20332 gopass: Update to version 1.15.6                            2 days ago
 * a2ce47a63 starship: Update to version 1.16.0                          3 days ago
 * 416ffeef4 imagemagick: Update to version 7.1.1-15                     3 days ago
 * a5b6afc00 imagemagick-lean: Update to version 7.1.1-15                3 days ago
 * 4afcda54c chezmoi: Update to version 2.36.1                           3 days ago
 * 92e293622 trzsz: Add version 1.1.5 (#4963)                            3 days ago
 * c4b112aec tssh: Add version 0.1.9 (#4964)                             3 days ago
 * aeb5b3858 ntfy@2.6.2: Fix extration (Closes #4978)                    3 days ago
 * cdb0324f1 krew@0.4.4: Fix installation (Closes #4979)                 3 days ago
 * 9761b2249 texlab: Update to version 5.8.0                             3 days ago
 * 6eaa14f2c detekt: Update to version 1.23.1                            3 days ago
 * b179fb62d alist: Update to version 3.24.0                             3 days ago
 * 489ace9ec red: Update to version 30jul23                              3 days ago
 * fa8a9ad92 red-view: Update to version 30jul23                         3 days ago
 * 8eb1c06d5 red-toolchain: Update to version 30jul23                    3 days ago
 * 5cae8c83c gitea: Update to version 1.20.2                             3 days ago
 * d8ba29db8 dvc: Update to version 3.10.1                               3 days ago
 * 093e1b52b red: Update to version 29jul23                              3 days ago
 * 81cd7f708 red-view: Update to version 29jul23                         3 days ago
 * 9595eface red-toolchain: Update to version 29jul23                    3 days ago
 * e77ba815d git-town: Update to version 9.0.1                           3 days ago
 * c8b14a524 oh-my-posh: Update to version 18.2.0                        4 days ago
 * ba1a573f8 micronaut: Update to version 4.0.2                          4 days ago
 * 1117144fc dynamorio: Update to version 9.93.19566                     4 days ago
 * e17753c59 amass: Update to version 4.1.0                              4 days ago
 * 03cc462e4 teleport: Update to version 13.2.5                          4 days ago
 * 94a7a587d nixpacks: Update to version 1.12.0                          4 days ago
 * 0ce0cf97c edgedriver: Update to version 115.0.1901.188                4 days ago
 * 31b6f74ce dolt: Update to version 1.8.7                               4 days ago
 * 9918767ea aws-amplify: Update to version 12.2.3                       4 days ago
 * c92c3bbc5 trufflehog: Update to version 3.45.3                        4 days ago
 * e20c4b802 trid: Update to version 2.24-23.07.28                       4 days ago
 * 8837340e4 terragrunt: Update to version 0.48.5                        4 days ago
 * 35c54ac34 stoplight-prism: Update to version 5.2.0                    4 days ago
 * 1f761d627 red: Update to version 28jul23                              4 days ago
 * 606351340 red-view: Update to version 28jul23                         4 days ago
 * e8d805fd4 red-toolchain: Update to version 28jul23                    4 days ago
 * 58111e579 nixpacks: Update to version 1.11.1                          4 days ago
 * b5021b678 ngrok: Update to version 3.3.2                              4 days ago
 * 55580b20a flyctl: Update to version 0.1.66                            4 days ago
 * 406bb8d7a edgedriver: Update to version 115.0.1901.183                4 days ago
 * fe79afc76 chezmoi: Update to version 2.36.0                           4 days ago
 * 243410753 aws: Update to version 2.13.5                               4 days ago
 * b8b7b1bbb luau: Update to version 0.588                               5 days ago
 * 003f70a92 edgedriver: Update to version 115.0.1901.188                5 days ago
 * 50b033a27 gauge: Update to version 1.5.3                              5 days ago
 * 783207626 edgedriver: Update to version 115.0.1901.183                5 days ago
 * 01eb090a9 zeebe: Update to version 8.2.10                             5 days ago
 * b7118c5ed camunda-operate: Update to version 8.2.10                   5 days ago
 * 48a5dcedb jx: Update to version 3.10.90                               5 days ago
 * 5ae3d8541 edgedriver: Update to version 115.0.1901.188                5 days ago
 * 57fca5378 dvc: Update to version 3.9.1                                5 days ago
 * 71ebafa01 jdtls: Update to version 1.27.0-202307272022                5 days ago
 * 4b34a74c5 dolt: Update to version 1.8.6                               5 days ago
 * a897b7e3b containerd: Update to version 1.7.3                         5 days ago
 * f925b5f62 opa: Update to version 0.55.0                               5 days ago
 * bce52dbe7 containerd: Update to version 1.6.22                        5 days ago
 * 8805d9bbc azcopy: Update to version 10.20.0                           5 days ago
 * f2c85973d aws-sam-cli: Update to version 1.94.0                       5 days ago
 * 92095cd78 aws-amplify: Update to version 12.2.2                       5 days ago
 * bf60772b2 ast-grep: Update to version 0.9.3                           5 days ago
 * ad1bb2e58 trufflehog: Update to version 3.45.2                        6 days ago
 * 3f5fcc1d2 mls-software-openssh: Update to version 9.3p2-1             6 days ago
 * f49de4e0d jdtls: Update to version 1.26.0-202307271613                6 days ago
 * 9463838c5 codeql: Update to version 2.14.1                            6 days ago
 * 67ffca6a7 oh-my-posh: Update to version 18.1.0                        6 days ago
 * 426363e39 flyway: Update to version 9.21.1                            6 days ago
 * 7d37893c3 dolt: Update to version 1.8.5                               6 days ago
 * 333710431 ossgadget: Update to version 0.1.413                        6 days ago
 * bc435cba6 knative: Update to version 1.11.0                           6 days ago
 * 114adee74 jdtls: Update to version 1.26.0-202307270340                6 days ago
 * 9272b712b difftastic: Update to version 0.49.0                        6 days ago
 * 2bc845546 coder: Update to version 0.27.2                             6 days ago
 * 5d29daa70 schemacrawler: Update to version 16.20.4                    6 days ago
 * 10ef6fa61 red: Update to version 27jul23                              6 days ago
 * a61700287 red-view: Update to version 27jul23                         6 days ago
 * 82cd71e95 red-toolchain: Update to version 27jul23                    6 days ago
 * 402b45ad3 pulumi: Update to version 3.76.1                            6 days ago
 * 6c2a151ab ibmcloud-cli: Update to version 2.18.0                      6 days ago
 * 29ee47ddd dolt: Update to version 1.8.4                               6 days ago
 * ea272c8da aws: Update to version 2.13.4                               6 days ago
 * 9b3abc125 terraform: Update to version 1.5.4                          6 days ago
 * 648590f1d talosctl: Update to version 1.4.7                           6 days ago
 * ca444bd50 jdtls: Update to version 1.26.0-202307261837                6 days ago
 * e5f84b88d git-lfs: Update to version 3.4.0                            6 days ago
Updating 'scoop' bucket...

 * 4b262aa Push PRX1.7.6.0                                               25 hours ago
Scoop was updated successfully!
DeviceProxy: 1.7.5.27 -> 1.7.6.0
Updating one outdated app:
Updating 'DeviceProxy' (1.7.5.27 -> 1.7.6.0)
Downloading new version
DeviceProxy_1.7.6.0.zip (64.8 MB) [>                                                                          ]   0%
...
DeviceProxy_1.7.6.0.zip (64.8 MB) [===========================================================================] 100%

Checking hash of
DeviceProxy_1.7.6.0.zip
 ...
ok.
Uninstalling 'DeviceProxy' (1.7.5.27)
Removing shim 'DeviceProxy.shim'.
Removing shim 'DeviceProxy.exe'.
Unlinking C:\scoop\apps\DeviceProxy\current
Installing 'DeviceProxy' (1.7.6.0) [64bit] from scoop bucket
Loading DeviceProxy_1.7.6.0.zip from cache
Extracting
DeviceProxy_1.7.6.0.zip
 ...
done.
Linking C:\scoop\apps\DeviceProxy\current => C:\scoop\apps\DeviceProxy\1.7.6.0
Creating shim for 'DeviceProxy'.
'DeviceProxy' (1.7.6.0) was installed successfully!
Ping the portal -> Update end
Start Device Proxy Service
Update script complete
------------------------------------------------------------------------------
**********************
Windows PowerShell transcript end
End time: 20230802171210
**********************

System details

Windows version: [10/11]

OS architecture: 64bit

Scoop Configuration

{
    "last_update":  "2023-08-08T03:00:15.6468935+10:00",
    "scoop_branch":  "master",
    "scoop_repo":  "https://github.com/ScoopInstaller/Scoop"
}
HUMORCE commented 1 year ago

Your manifest DeviceProxy has not been updated when your script is executed automaticlly(Start Device Proxy Update at 07/27/2023 03:00:03), so it will not be updated on your machine.

Screenshot 2023-08-08 105625

josephnarai commented 1 year ago

I don't quite understand, it's the same script executed either manually or automatically. How can I update the manifest automatically?

Apologies if this is a dumb question, I've not looked at this for over a year!

Thanks for helping, much appreciated.

Joseph Narai • Zenso


From: HUMORCE @.> Sent: Tuesday, August 8, 2023 8:59:13 PM To: ScoopInstaller/Scoop @.> Cc: Joseph Narai @.>; Author @.> Subject: Re: [ScoopInstaller/Scoop] not finding update when run from task scheduler (Issue #5603)

Your manifest DeviceProxy has not been updated when your script is executed automaticlly(Start Device Proxy Update at 07/27/2023 03:00:03), so it will not be updated.

[Screenshot 2023-08-08 105625]https://user-images.githubusercontent.com/4353480/259077732-647bded1-e601-416f-bfc9-77f7d2c7917e.png

— Reply to this email directly, view it on GitHubhttps://github.com/ScoopInstaller/Scoop/issues/5603#issuecomment-1669397119, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADMH5ITOKQM5TURKHFJEMZLXUILYDANCNFSM6AAAAAA3IABIFQ. You are receiving this because you authored the thread.Message ID: @.***>

josephnarai commented 1 year ago

Oh, I see, what you are saying is the auto update task only ran back on 27/7... I'll find out why it isn't running every day!!

Thanks

HUMORCE commented 1 year ago

Yes, unless your machine is a time machine.