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

"Unable to parse version string" is not a specific enough error for win32 targets #35

Closed
craxal opened this issue Jan 6, 2017 · 4 comments

Comments

@craxal
Copy link

craxal commented Jan 6, 2017

I had some problems using electron-packager reporting it was "unable to parse version string", and it took me a while to find the cause. I believe that "Unable to parse version string" is too vague of an error message.

This error message should be improved to tell me which property it was trying to parse and the value it received and tried to parse, such as:

Unable to parse version string for 'build-version': 'private'
or
The value provided for 'build-version' is not a valid version: 'private'

For reference, the values I use are:

{
    dir: ".artifacts/app",
    platform: "win32",
    arch: "ia32",
    out: ".artifacts/package",
    name: "MyApp",
    version: "1.3.1",
    "build-version": "private",
    "app-version": "0.8.7",
    icon: "icon",
    "app-bundle-id": "com.microsoft.MyApp",
    "helper-bundle-id": "com.microsoft.MyAppHelper",
    "version-string": {
        CompanyName: "MyCompany",
        LegalCopyright: "Copywrite (C) 2015 MyCompany. All rights reserved",
        ProductName: "My Application",
        FileDescription: "My Application",
        OriginalFilename: "MyApp.exe",
        InternalName: "MyApp"
    }
}

See also electron/packager#552

@weedgrease
Copy link

So is the cause that it's a string and not a semver? I'm getting the same error trying to set the build-version to a short hash of the current commit of my repo but this error only happens when building installers for Windows.

@craxal
Copy link
Author

craxal commented Feb 24, 2017

That's right. More specifically, the string provided doesn't parse to a semver, which is exactly what the message says.

That's all well and good, but again, the message didn't give me any more information to go on. I spent several hours trying to figure out what was wrong simply because the error message didn't tell me which property or value was invalid.

@MeTaNoV
Copy link

MeTaNoV commented Mar 31, 2017

We have the same problem as @kevingelion , and I don't understand the difference between the platforms. In my opinion, a build version should not be constrained as the other version...
We are currently also using a short hash of the current commit!

@malept
Copy link
Member

malept commented Mar 31, 2017

This is a limitation in Windows executables, there's not much rcedit can do about it.

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

4 participants