Squirrel.Windows icon indicating copy to clipboard operation
Squirrel.Windows copied to clipboard

New stub executable failing on non-Semver compliant packages

Open LoyalServant opened this issue 9 years ago • 42 comments

Installed 1.5 from Nuget (previous 1.44) and ran a test to make sure applications would install properly. After initial installation the app automatically runs. If you close the app and try to run it again it simply does nothing. Noting the shortcut is now the 'stub' application that's about 250kb or so in size (I actually went back to 1.4.4 to verify that fixes it so I forget the exact size)

If I run this manually it does nothing. I get no output when running it from the command line. I tried various things like --help, /?, /h and so forth to see if I get any response but nothing. It just runs and exits instantly.

There is nothing in the event viewer on either system tested. Both are Windows 10. I wish I had more information to provide but there is just no indication as to what could the wrong here.

LoyalServant avatar Dec 05 '16 16:12 LoyalServant

Same problem here. It starts the stub.exe needs about 644kb RAM and freezes... Is there any more detailed description??

muffmolch avatar Dec 06 '16 12:12 muffmolch

Same problem here with version 1.5

TradePeg avatar Dec 07 '16 14:12 TradePeg

Can you tell me the name of the executable you're having issues with?

anaisbetts avatar Dec 07 '16 18:12 anaisbetts

Sorry for the late reply. The executable is named "yourapp.exe" and it is the one that is created at install and linked to via the shortcuts created. Info as described here: https://github.com/Squirrel/Squirrel.Windows/pull/868

This is similar to how my installed tree looks. There is a "yourapp.exe" and an update.exe at the install location with a subdirectory "yourapp-x.x.x.x" that contains the application. Running it from here works fine just the smaller "yourapp.exe" that is one directory up that is linked from the shortcuts fails to do anything.

If I can find time I need to dive into it some and figure out how this stub works and try to add some debugging to it if possible to work out if it's simply unable to execute the application and if so, why it cannot.

LoyalServant avatar Dec 08 '16 05:12 LoyalServant

Same problem with version 1.5

inech avatar Dec 08 '16 08:12 inech

Same problem with version 1.5

YoCsusu avatar Dec 08 '16 12:12 YoCsusu

I can confirm the same issue in Windows 7 for both WPF (32bit and 64bit) and Console applications.

The stub.exe always crashes (ie: %LocalAppData%\MyApp\Myapp.exe), but if I try the exe under app-x.x.x.x then that one works.

I've tried reverting to 1.4.4, but I can't ever get that one to work, it errors with:

---------------------------
hwhoops
---------------------------
This is a dummy update.exe. If you are seeing this, your build did not
correctly replace the IDR_UPDATE_ZIP resource.

Command Line: '--install . '
---------------------------
OK   
---------------------------


pdinnissen avatar Dec 08 '16 19:12 pdinnissen

I am afraid of updating to 1.5 should I ?

wocar avatar Dec 12 '16 09:12 wocar

@wocar You can try if it works, for me it doesn't.

inech avatar Dec 12 '16 11:12 inech

The stub.exe always crashes (ie: %LocalAppData%\MyApp\Myapp.exe), but if I try the exe under app-x.x.x.x then that one works.

Wait, it crashes? What's the error?

anaisbetts avatar Dec 12 '16 17:12 anaisbetts

I don't know if this is related to this issue exactly, but I noticed that the StubExecutable does not support version numbers more than "x.x.x"; i.e., my app would not run from the stub with a version number of "2.1.0.1", but it worked fine with "2.1.0"

matthewc-mps-aust avatar Dec 13 '16 05:12 matthewc-mps-aust

So is that the issue?

I'm a bit worried/disappointed because we depend a lot on Squirrel for many programs we have. And breaking an upgrade will cause a lot of issues + time trying to reinstall on all the clients 😐 El El lun, 12 de diciembre de 2016 a la(s) 11:43 p.m., matthewc-mps-aust < [email protected]> escribió:

I don't know if this is related to this issue exactly, but I noticed that the StubExecutable does not support version numbers more than "x.x.x"; i.e., my app would not run from the stub with a version number of "2.1.0.1", but it worked fine with "2.1.0"

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Squirrel/Squirrel.Windows/issues/892#issuecomment-266650696, or mute the thread https://github.com/notifications/unsubscribe-auth/AIycYYZ2J1BFxF9fqjwSdLyHvcephSxEks5rHjCUgaJpZM4LEdow .

wocar avatar Dec 13 '16 05:12 wocar

I don't know if this is related to this issue exactly, but I noticed that the StubExecutable does not support version numbers more than "x.x.x"; i.e., my app would not run from the stub with a version number of "2.1.0.1", but it worked fine with "2.1.0"

I suspect this is the issue, we use a Semver library to compare version numbers, and shipping a non-Semver one was always incorrect but apparently seemed to work. NuGet packages are always Semver-versioned.

anaisbetts avatar Dec 13 '16 08:12 anaisbetts

I see. Will there be a solution for that one?

muffmolch avatar Dec 13 '16 10:12 muffmolch

I suspect this is the issue, we use a Semver library to compare version numbers, and shipping a non-Semver one was always incorrect but apparently seemed to work. NuGet packages are always Semver-versioned.

I've just tried a Semver-versioned package (1.0.0-rc1) and it works - once I tweaked it to strip the "-rc1" from the args before passing to the SquirrelAwareApp.HandleEvents (it was crashing trying to convert that to a System.Version - shouldn't it be creating a SemanticVersion object?).

I also had to use NuGet.Core 2.14.0-rtm-832 to create the nupkg because the current NuGet doesn't like packing with a SemVer, but that's not Squirrel's issue...

matthewc-mps-aust avatar Dec 13 '16 11:12 matthewc-mps-aust

I can also confirm that dropping Revision from the assembly version fixes the issue I was encountering. Heads up to anyone using @poma's 'docs/using/visual-studio-packaging.md' that is should most likely be updated (see my comment in #630).

Not to be semver stickler but maybe 1.5 should have actually been 2.0.0? Since going to semver looks like a breaking change :S.

pdinnissen avatar Dec 13 '16 13:12 pdinnissen

Not to be semver stickler but maybe 1.5 should have actually been 2.0.0? Since going to semver looks like a breaking change :S.

NuGet packages have always been required to have SemVer versions, it just happened that some people got away with it and ignored the warning that NuGet prints out

anaisbetts avatar Dec 13 '16 18:12 anaisbetts

@paulcbetts I meant that having the Stub.exe enforcing SemVer potentially breaks existing systems if they upgrade. But then again... if they were always supposed to be SemVer... then it's not technically a breaking. I hate logic semantics (no pun intended).

I retract my 2.0.0 suggestion.

pdinnissen avatar Dec 13 '16 19:12 pdinnissen

@pdinnissen You're not wrong, but like, lots of stuff would be broken, including how we check for if you have the latest version (i.e. I'd be very very surprised if 2.0.0.0 => 2.0.0.1 would actually update the app)

anaisbetts avatar Dec 13 '16 19:12 anaisbetts

I just tested that a couple of days ago. It does in v1.4.1, but it is impractical.

pdinnissen avatar Dec 13 '16 20:12 pdinnissen