"Error: No tarball found inside binary"
opened this issue · comments
Replicate
On Linux, follow the steps from #37 (comment) to create a Windows x64 build, but run the application on Windows. I don't know if the problem exists when performing the build steps on Windows.
Expected
Running the re-packed executable launches the application.
Actual
The following error message is displayed, then the program exits:
Error: Custom ( kind: Other, error: StringError("no tarball found inside binary") )
Workaround
The user must delete C:\Users\%USERNAME%\AppData\Local\warp\packages\*.exe\
.
Details
This is especially problematic because if the user double-clicks on the executable, a command window is briefly shown then it closes without launching the app. The error message goes by too quickly for the user to see. Even if the error message remained visible (e.g., PAUSE
in a .bat
file), it is too cryptic to inform the user how to proceed.
I'm having the same issue--whether I run warp-packer0.3.0 on windows or mac, when windows is the destination the first execution results in this error. After that, I notice that the cache has only part of the jre.
It seems like the initial unpacking of resources has failed.
This could be solved by deleting the AppData\Local\warp\{{target}}
directory if a checksum differs. A simple algorithm:
- Attempt to open
AppData\Local\warp\{{target}}
- If directory does not exist, proceed with install.
- If directory exists, open
AppData\Local\warp\{{target}}\warp-checksum.txt
- If file does not exist, proceed with install.
- Otherwise, compare checksum with checksum on binary.
- If checksums differ, delete
AppData\Local\warp\{{target}}
, then proceed with install. - If checksums are the same, run as usual.
The checksum could also be a timestamp. If the binary is newer than the target directory, then purge the directory. That would be a lot faster than computing a checksum each time and should have the same effect.
Thoughts?