puro icon indicating copy to clipboard operation
puro copied to clipboard

Cannot install puro on Windows 11 (both PowerShell or Stand alone)

Open sauer-kindra opened this issue 1 year ago • 3 comments

I am trying to setup a new Flutter enviornment on my work machine, and I am using the powershell script to install puro:

Invoke-WebRequest -Uri "https://puro.dev/builds/1.4.4/windows-x64/puro.exe" -OutFile "$env:temp\puro.exe"; &"$env:temp\puro.exe" install-puro --promote

However, I get the following output:

PS C:\Users\Raphael - Kindra> Invoke-WebRequest -Uri "https://puro.dev/builds/1.4.4/windows-x64/puro.exe" -OutFile "$env:temp\puro.exe"; &"$env:temp\puro.exe" install-puro --promote --log-level=4
[D] PURO_FLUTTER_BIN: null
[D] target: PuroBuildTarget.windowsX64
[D] Platform.executable: C:\Users\Raphael - Kindra\AppData\Local\Temp\puro.exe
[D] Platform.resolvedExecutable: C:\Users\Raphael - Kindra\AppData\Local\Temp\puro.exe
[D] Platform.script: file:///C:/Users/Raphael%20-%20Kindra/AppData/Local/Temp/puro.exe
[D] Platform.packageConfig: null
[D] No package root: Platform.packageConfig is null
[D] packageRoot: null
[D] executablePath: c:\users\raphael - kindra\appdata\local\temp\puro.exe
[D] scriptPath: c:\users\raphael - kindra\appdata\local\temp\puro.exe
[D] scriptExtension: .exe
[D] installationType: PuroInstallationType.standalone
[D] version: 1.4.4
[x] PathAccessException: Cannot delete file, path = 'c:\users\raphael - kindra\appdata\local\temp\puro.exe' (OS Error: O arquivo já está sendo usado por outro processo.
    , errno = 32)
    #0      _File.throwIfError (dart:io/file_impl.dart:675)
    #1      _File._deleteSync (dart:io/file_impl.dart:329)
    #2      FileSystemEntity.deleteSync (dart:io/file_system_entity.dart:424)
    #3      ForwardingFileSystemEntity.deleteSync (package:file/src/forwarding/forwarding_file_system_entity.dart:70)
    #4      FileExtensions.moveSync (package:puro/src/extensions.dart:117)
    #5      _promoteStandalone (package:puro/src/install/bin.dart:89)
    <asynchronous suspension>
    #6      ensurePuroInstalled (package:puro/src/install/bin.dart:42)
    <asynchronous suspension>
    #7      PuroInstallCommand.run (package:puro/src/commands/puro_install.dart:62)
    <asynchronous suspension>
    #8      CommandRunner.runCommand (package:args/command_runner.dart:212)
    <asynchronous suspension>
    #9      main (package:puro/src/cli.dart:256)
    <asynchronous suspension>

[x] Puro crashed! Please file an issue at https://github.com/pingbird/puro

I then tried the stand alone installer, also with no success. It just opens and closes, no error output and no install message.

sauer-kindra avatar Jan 18 '24 16:01 sauer-kindra

I had the same issue, I had Puro working previously, but now it's not installing, apparently I had puro installed in a previous location, if you go to c:\users\{user}\appdata\local\temp\puro.exe and run a terminal in that dir, then run ./puro.exe --install-puro It should install puro,

you might manually have to update the path variable and point it to the puro.bat file.

RA341 avatar Apr 18 '24 23:04 RA341

I had that problem when trying to install it on a new user

FMorschel avatar Apr 19 '24 12:04 FMorschel

Interesting, I suspect windows defender might be holding a handle to it

I think this can just be mitigated by ignoring errors on this particular delete call

pingbird avatar Apr 20 '24 08:04 pingbird