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

"Error: No tarball found inside binary" (Mac & Linux only) #37

Closed
rooju opened this issue May 20, 2019 · 4 comments
Closed

"Error: No tarball found inside binary" (Mac & Linux only) #37

rooju opened this issue May 20, 2019 · 4 comments

Comments

@rooju
Copy link

rooju commented May 20, 2019

I have a set of binaries (application + dependency libraries) that I'm using warp to pack as part of my automated workflow. However, lately, the packed binary has been failing to run with a "No tarball found inside binary" error message.

This only happens on Mac and Linux (Ubuntu). The packed binary runs as expected on Windows.

Also, and this is weird, this was working until today.

I even tried running the warp packer manually, outside my workflow, to the same result: works on Windows, does not work on other platforms.

I should also mention that on all 3 platforms, the packed binary does have the gzip magic header that the runner is looking for.

Any idea what might be going on? Since nothing has changed on the warp side, could something in my payload be tripping it? (Though, I can't think of anything I changed that could have caused it to drop dead so suddenly)

@rooju
Copy link
Author

rooju commented May 22, 2019

It looks like the tar unpack is failing.

Just for fun, I wrote a .NET program that takes the packed EXE, seeks until it finds a valid gzip header and prints out the contents of the tarball. This works just fine, so the embedded tarball isn't corrupted. Yet, the runner can't unpack it.

@rooju rooju closed this as completed Jun 10, 2019
@betonetotbo
Copy link

betonetotbo commented Oct 29, 2019

@rooju I'm getting this error in windows.

Steps:

  • create a Java application and generate the JAR file
  • create a sub folder called bundle and put on it:
    • jre/ --- put here all JRE 1.8.x files
    • app.jar
    • start.cmd

start.cmd:

@echo off
SETLOCAL
set "jre=%~dp0jre\bin\java.exe"
set "jar=%~dp0app.jar"
%jre% -jar %jar%
EXIT /B %ERRORLEVEL%

To generate the exe:
packer.exe --arch windows-x64 --input_dir bundle --exec run.cmd --output app.exe

Now run the app.exe, note that the application starts correctly.

Re-pack the exe again ( without changing nothing, just generate the exe again).

When I runing it again I got the error message:

Error: Custom { kind: Other, error: StringError("no tarball found inside binary") }

If I delete all files from C:\Users\<MY WIN USER>\AppData\Local\warp\packages\app.exe\ and run the app.exe again, it starts to working again.

I noted also, that on the second attempt to run the app.exe (and when I get the error), that the app.jar is deleted and not recreated.

I'm using the release v0.3.0

@chapinb
Copy link

chapinb commented Jul 9, 2020

No idea why this worked, but I was encountering the same issue as above when I run a command like this:

warp-packer --arch macos-x64 -i ./bin/release/netcoreapp2.1/osx-x64/publish/ --exec $app_name --output ./deployments/$app_name

And fixed it by adjusting the command to:

warp-packer --arch macos-x64 -i ./bin/release/netcoreapp2.1/osx-x64/publish/ --exec $app_name --output ./deployments/$app_name.bin

For some reason (not familiar enough with rust) it needed a different --output parameter filename than the --exec value.

@rooju
Copy link
Author

rooju commented Jul 9, 2020

It's been a while since I used this last, but from what I remember, the issue was something on my side, IIRC. Something about not having permissions to unpack/overwrite (I don't remember very well). The error message was totally not indicative of the actual issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants