cderv / r-bucket

Personal scoop bucket I use as an R user and software engineer
49 stars 3 forks source link

positron@2024.07.0-81: decompress error #29

Closed cderv closed 1 week ago

cderv commented 1 month ago

From https://github.com/posit-dev/positron/issues/3859#issuecomment-2239633797

Installing 'positron' (2024.07.0-81) [64bit] from 'r-bucket' bucket
Loading Positron-2024.07.0-81-Setup.exe from cache
Checking hash of Positron-2024.07.0-81-Setup.exe ... ok.
Extracting Positron-2024.07.0-81-Setup.exe ... ERROR Exit code was 1!
Failed to extract files from C:\Users\JonVanausdeln\scoop\apps\positron\2024.07.0-81\Positron-2024.07.0-81-Setup.exe.
Log file:
  ~\scoop\apps\positron\2024.07.0-81\innounp.log

Please try again or create a new issue by using the following link and paste your console output:
https://github.com/cderv/r-bucket/issues/new?title=positron%402024.07.0-81%3a+decompress+error
cderv commented 1 month ago

It correctly install for me 🤔

> scoop update positron
positron: 2024.07.0-67 -> 2024.07.0-81
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Updating one outdated app:
Updating 'positron' (2024.07.0-67 -> 2024.07.0-81)
Downloading new version
Starting download with aria2 ...
Download: Download Results:
Download: gid   |stat|avg speed  |path/URI
Download: ======+====+===========+=======================================================
Download: 449d3d|OK  |    18MiB/s|C:/Users/chris/scoop/cache/positron#2024.07.0-81#517938f.exe
Download: Status Legend:
Download: (OK):download completed.
Checking hash of Positron-2024.07.0-81-Setup.exe ... ok.
Uninstalling 'positron' (2024.07.0-67)
Removing shim 'Positron.shim'.
Removing shim 'Positron.exe'.
Unlinking ~\scoop\apps\positron\current
Installing 'positron' (2024.07.0-81) [64bit] from 'r-bucket' bucket
Loading Positron-2024.07.0-81-Setup.exe from cache.
Extracting Positron-2024.07.0-81-Setup.exe ... done.                                                                    
Linking ~\scoop\apps\positron\current => ~\scoop\apps\positron\2024.07.0-81
Creating shim for 'Positron'.
Making C:\Users\chris\scoop\shims\positron.exe a GUI binary.                                                            
'positron' (2024.07.0-81) was installed successfully!
Notes
-----
Please review Positron's license agreement (https://github.com/posit-dev/positron?tab=License-1-ov-file#readme).
Your acceptance of this license agreement is required as a condition to proceeding with your use of the software.
cderv commented 1 month ago

Same in clean install after uninstalling previous version

> scoop install positron
WARN  Scoop uses 'aria2c' for multi-connection downloads.
WARN  Should it cause issues, run 'scoop config aria2-enabled false' to disable it.
WARN  To disable this warning, run 'scoop config aria2-warning-enabled false'.
Installing 'positron' (2024.07.0-81) [64bit] from 'r-bucket' bucket
Loading Positron-2024.07.0-81-Setup.exe from cache.
Checking hash of Positron-2024.07.0-81-Setup.exe ... ok.
Extracting Positron-2024.07.0-81-Setup.exe ... done.                                                                    
Linking ~\scoop\apps\positron\current => ~\scoop\apps\positron\2024.07.0-81
Creating shim for 'Positron'.
Making C:\Users\chris\scoop\shims\positron.exe a GUI binary.                                                            
'positron' (2024.07.0-81) was installed successfully!
Notes
-----
Please review Positron's license agreement (https://github.com/posit-dev/positron?tab=License-1-ov-file#readme).
Your acceptance of this license agreement is required as a condition to proceeding with your use of the software.

@jonvanausdeln would you be able to share the log file mentioned in the error message ?

Extracting Positron-2024.07.0-81-Setup.exe ... ERROR Exit code was 1!
Failed to extract files from C:\Users\JonVanausdeln\scoop\apps\positron\2024.07.0-81\Positron-2024.07.0-81-Setup.exe.
Log file:
  ~\scoop\apps\positron\2024.07.0-81\innounp.log

I wonder where you error is coming from with the extraction ? Could be a Scoop error on some environment context.

jonvanausdeln commented 1 month ago

Sure! innounp.log

cderv commented 1 month ago

The error is

Error (Exception) "MoveFile failed; code 3.%nThe system cannot find the path specified" at address 0048D31C

after extracting all content. So maybe the value passed are not correct...

Or some windows specific with long path name for example...

It would definitely be safer to have a portable version of positron to unzip somewhere.

I'll see if I can be more protective in how Scoop is calling innounp so that the Dest directory is correctly passed.

I am really not sure what this means - we'll see if someone else reports it too. I can't reproduce on my side. The app is there in my case : C:\Users\chris\scoop\apps\positron\2024.07.0-81\ which is not that different than yours C:\Users\JonVanausdeln\scoop\apps\positron\2024.07.0-81 🤔

atsyplenkov commented 3 weeks ago

I faced the same issue with the Positron version 2024.08.0-31. Here is my innounp.log

Could it be related to the innounp path length? In my case, I have a pretty long USERNAME (office machine, cannot change it though). So Positron is installing into C:\Users\TsyplenkovA\scoop\apps\positron\2024.08.0-31

atsyplenkov commented 3 weeks ago

The error is definitely related to the length of the installation path. So, you are either lucky to have a short USERNAME, or you can install Scoop in the parent directory (i.e., C:\scoop). The following solution didn't fully work for me; I wasn't able to move all my Scoop apps to a new location. However, a fresh install of Scoop sorted everything out.

So the steps should be as follows in a PowerShell without admin rights.

âš CAUTION, it will remove all your scoop-installed apps:

  1. Uninstall Scoop via scoop uninstall scoop
  2. Manually remove the %USERPROFILE%\scoop folder, if it still exists
  3. Set $Env:SCOOP to C:\scoop via [environment]::setEnvironmentVariable('SCOOP','C:\scoop','User')
  4. Restart PowerShell
  5. Check that $Env:SCOOP is set up. It should return C:\scoop
  6. Reinstall Scoop with iex (new-object net.webclient).downloadstring('https://get.scoop.sh')
  7. Check that the folder C:\scoop is populated with Scoop
  8. Add r-bucket with scoop bucket add r-bucket https://github.com/cderv/r-bucket.git
  9. Install Positron scoop install positron
cderv commented 3 weeks ago

Thanks for finding this problem.

I have a short username I guess as my scoop is in C:\Users\chris\scoop

I'll try to find a solution to this... There is new user only installer, and maybe I can make scoop run the exe for decompression instead of its usually uncompress of the bundle using innounp.

I will need help to test though, as I cannot reproduce. But I understand you change your scoop setup so can't reproduce right ?

atsyplenkov commented 3 weeks ago

@cderv thanks! I don't mind testing. Currently, I use scoop only for r-rig and Positron, so it's not a big deal to reinstall them. Environment variables can be easily reassigned.

cderv commented 1 week ago

I have updated the manifest so that the new UserSetup.exe installer is used (which should be with no UAC prompt) and also now running the exe installer directly - so it should no be any more decompress error.

Hope this will solve it