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

Download error 404 #65

Closed
mtengmo opened this issue Dec 19, 2022 · 2 comments
Closed

Download error 404 #65

mtengmo opened this issue Dec 19, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@mtengmo
Copy link

mtengmo commented Dec 19, 2022

Version

1.5.0

Computer Model

82BG

Problem

$updates = Get-LSUpdate
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
At C:\Program Files\WindowsPowerShell\Modules\LSUClient\1.5.0\private\Save-PackageFile.ps1:46 char:9

  •     $webClient.DownloadFile($SourceFile.AbsoluteLocation, $Downlo ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : WebException

WARNING: The command or file '%PACKAGEPATH%\getw10ver7.exe' could not be found from 'C:\Users\mteo\AppData\Local\Temp\f43nujbv.ewv\1toamfcj.d2x' and was not run

Additional context

No response

@mtengmo mtengmo added the bug Something isn't working label Dec 19, 2022
@mtengmo
Copy link
Author

mtengmo commented Dec 19, 2022

`VERBOSE: Detecting install status of package: u3etn09w_w10_x86 (Lenovo USB3.0 LAN Driver for Docks and Adapters - 10 [64])
DEBUG: - |> Node: DetectInstall
DEBUG: - - |> Node: _Driver
DEBUG: - - No installed device matched the driver check
DEBUG: - - < Returning 0 from node _Driver
DEBUG: - Tree was OR: Results: 0
DEBUG: - < Returning 0 from node DetectInstall
VERBOSE: Parsing dependencies for package: u3etn09w_w10_x86 (Lenovo USB3.0 LAN Driver for Docks and Adapters - 10 [64])
DEBUG: - |> Node: Dependencies
DEBUG: - - |> Node: And
DEBUG: - - - |> Node: _OS
DEBUG: - - - < Returning 1 from node _OS
DEBUG: - - - |> Node: _CPUAddressWidth
DEBUG: - - - [ Got: 64, Expected: 64 ]
DEBUG: - - - < Returning 1 from node _CPUAddressWidth
DEBUG: - - - |> Node: Or
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - - |> Node: _PnPID
DEBUG: - - - - < Returning 0 from node _PnPID
DEBUG: - - - Tree was OR: Results: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
DEBUG: - - - < Returning 0 from node Or
DEBUG: - - Tree was AND: Results: 1 1 0
DEBUG: - - < Returning 0 from node And
DEBUG: - Tree was OR: Results: 0
DEBUG: - < Returning 0 from node Dependencies
VERBOSE: Parsing severity override for package: u3etn09w_w10_x86 (Lenovo USB3.0 LAN Driver for Docks and Adapters - 10 [64])
DEBUG: - |> Node: SeverityOverride
DEBUG: - - |> Node: Not
DEBUG: - - Switched state to: DO_NOT_HAVE
DEBUG: - - - |> Node: _Driver
DEBUG: - - - No installed device matched the driver check
DEBUG: - - - < Returning 0 from node Driver
DEBUG: - - Tree was OR: Results: 0
DEBUG: - - < Returning 1 from node Not
DEBUG: - Tree was OR: Results: 1
DEBUG: - < Returning 1 from node SeverityOverride
DEBUG: Default severity 1 overriden with 2
VERBOSE: Processing package https://download.lenovo.com/marketing/lshm002us_2_.xml
DEBUG: Local package scratch directory: C:\Users\mteo\AppData\Local\Temp\4ivcwmxr.wnd\oh14td10.0oy
VERBOSE: Downloading 'https://download.lenovo.com/marketing/lshm002us_2_.xml' to 'C:\Users\mteo\AppData\Local\Temp\4ivcwmxr.wnd\oh14td10.0oy\lshm002us_2
.xml'
DEBUG: Resolving file path 'lshm002us.exe'
DEBUG: Resolving file path 'lshm002us.txt'
DEBUG: Resolving file path 'getw10ver7.exe'
VERBOSE: Downloading 'https://download.lenovo.com/marketing/getw10ver7.exe' to 'C:\Users\mteo\AppData\Local\Temp\4ivcwmxr.wnd\oh14td10.0oy\getw10ver7.exe'
Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found."
At C:\Program Files\WindowsPowerShell\Modules\LSUClient\1.5.0\private\Save-PackageFile.ps1:46 char:9

  •     $webClient.DownloadFile($SourceFile.AbsoluteLocation, $Downlo ...
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (:) [], MethodInvocationException
    • FullyQualifiedErrorId : WebException

`

@jantari
Copy link
Owner

jantari commented Dec 19, 2022

Looks like it's the same exact URL that's also been reported in #37. I don't think I can fix this on the side of LSUClient because that file is just not available, but it's not a fatal error and if you know (like in this case) that it is not a connectivity problem on your end you can ignore it.

@jantari jantari closed this as completed Dec 21, 2022
jantari pushed a commit that referenced this issue Jul 28, 2023
this makes no difference when running Get-LSUpdate in a normal
PowerShell session, but some deployment/script-running solutions wrap
the entire script in a big try-catch which triggered on any .NET
exception from DownloadFile. Try-Catching the DownloadFile call
separately and "downgrading" any exceptions to a PowerShell-native
error prevents any unintended script terminations in such cases.

I still recommend NOT wrapping LSUClient scripts in a global try-catch
whenever it is possible to avoid it.

also referencing previous issues #35, #36, #37 and #65
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

2 participants