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 running candle to generate wixobj #1085

Closed
ArloL opened this issue Jan 11, 2022 · 8 comments
Closed

Error running candle to generate wixobj #1085

ArloL opened this issue Jan 11, 2022 · 8 comments
Labels
bug Something isn't working

Comments

@ArloL
Copy link

ArloL commented Jan 11, 2022

dependabot wants to update gluonfx-maven-plugin from 1.0.10 to 1.0.11 in ArloL/gitfx#69 and the build fails with this error message:

java.io.IOException: Error running candle to generate wixobj
	at com.gluonhq.substrate.util.windows.MSIBundler.createPackage(MSIBundler.java:147)
	at com.gluonhq.substrate.target.WindowsTargetConfiguration.packageApp(WindowsTargetConfiguration.java:194)
	at com.gluonhq.substrate.SubstrateDispatcher.nativePackage(SubstrateDispatcher.java:460)
	at com.gluonhq.NativePackageMojo.execute(NativePackageMojo.java:48)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.apache.maven.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:39)
	at org.apache.maven.wrapper.WrapperExecutor.execute(WrapperExecutor.java:122)
	at org.apache.maven.wrapper.MavenWrapperMain.main(MavenWrapperMain.java:61)

WiX Toolset is pre-installed in GitHub Actions Windows runners. Did I miss something?

Expected Behavior

A patch update should not break the build.

Current Behavior

The build is broken.

Steps to Reproduce

Check out the pull request's branch and execute the build to see it fail.

Your Environment

GitHub Actions

@ArloL ArloL added the bug Something isn't working label Jan 11, 2022
@abhinayagarwal
Copy link
Collaborator

Hi @ArloL ,

gluonfx:package goal has been recently updated for Windows platform to create msi installers with the native image. In order to create a msi installer, the following mandatory properties needs to be defined in the releaseConfiguration of the plugin:

  • appDescription
  • vendor

Once these are added, the goal will start to pass.

I admit that better logging is required in order to show that the goal is failing for these missing properties.

@ArloL
Copy link
Author

ArloL commented Jan 12, 2022

That's a cool feature 👍. Just a bit surprising ☺️

Adding the properties fixed the build. Thanks for the help!

@ArloL ArloL closed this as completed Jan 12, 2022
@FDelporte
Copy link

I'm having this same issue and added the extra release configurations in https://github.com/FDelporte/JavaMagazineFXGL/blob/native/pom.xml#L159. But still gives this error. Are additional settings required?

https://github.com/FDelporte/JavaMagazineFXGL/runs/4948551894?check_suite_focus=true

[Wed Jan 26 08:25:42 UTC 2022][INFO] Logging process [Wix Compiler] to file: D:\a\JavaMagazineFXGL\JavaMagazineFXGL\target\gluonfx\log\process-Wix Compiler-1643185542188.log
java.io.IOException: Error running candle to generate wixobj
[INFO] ------------------------------------------------------------------------
	at com.gluonhq.substrate.util.windows.MSIBundler.createPackage(MSIBundler.java:147)
[INFO] BUILD FAILURE
	at com.gluonhq.substrate.target.WindowsTargetConfiguration.packageApp(WindowsTargetConfiguration.java:194)
	at com.gluonhq.substrate.SubstrateDispatcher.nativePackage(SubstrateDispatcher.java:460)
	at com.gluonhq.NativePackageMojo.execute(NativePackageMojo.java:48)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:972)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:293)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:196)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)

@abhinayagarwal
Copy link
Collaborator

Hi @FDelporte ,

[Wed Jan 26 08:25:42 UTC 2022][INFO] Logging process [Wix Compiler] to file: D:\a\JavaMagazineFXGL\JavaMagazineFXGL\target\gluonfx\log\process-Wix Compiler-1643185542188.log

The error is actually inside this log file. I executed the gluonfx:package on my machine and it turns out that Wix doesn't support - in the appName. Currently, appName is picked from <artifactId> since there is no <name> defined for the current project, Can you try to add it and retry?

Output
======
main.wxs
C:\...\JavaMagazineFXGL\target\gluonfx\x86_64-windows\gvm\tmp\tmpMSI\config\main.wxs(36) : error CNDL0014 : The File/@Id attribute's value, 'javamagazine-fxgl', is not a legal identifier.  Identifiers may contain ASCII characters A-Z, a-z, digits, underscores (_), or periods (.).  Every identifier must begin with either a letter or an underscore.

@FDelporte
Copy link

Thanks a 1000 times @abhinayagarwal, you're my hero of the day ;-)
https://github.com/FDelporte/JavaMagazineFXGL/actions/runs/1750326310

As I don't have a Windows PC, can you maybe test if the created .exe is doing something?

@abhinayagarwal
Copy link
Collaborator

The uploaded artifact (native exe, no msi) launches a game.

image

@FDelporte
Copy link

great! that's one more platform tested and looking good ;-)

@abhinayagarwal
Copy link
Collaborator

@jperedadnr We have already have defaults for vendor and description. What would be the ideal case scenario in this place? Do we want to do a sanity check and remove all spaces and hypens from app name before passing it to Wix? Or leave it for the user to resolve?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants