sbt-native-packager icon indicating copy to clipboard operation
sbt-native-packager copied to clipboard

build windows msi get error for test-project-windows

Open xmeng1 opened this issue 6 years ago • 3 comments
trafficstars

Expected behaviour

sbt windows:packageBin get windows package msi

Actual behaviour

get error:

[info] light.exe : error LGHT0182 : Cannot find the table definitions for the 'SecureObjects' table.  This is likely due to a typing error or missing extension.  Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.
[error] java.lang.RuntimeException: Unable to run build MSI. Exited with 182

Information

I have tried my project and test-project-windows, both get the same error

  • What sbt-native-packager are you using 1.3.15

  • What sbt version 1.2.6

  • What is your build system (e.g. Ubuntu, MacOS, Windows, Debian ) Windows with Wix Toolset version: wix311 [info] Windows Installer XML Toolset Linker version 3.11.1.2318

  • What package are you building (e.g. docker, rpm, ...) msi

  • What version has your build tool (find out with e.g. rpm --version) wix

  • What is your target system (e.g. Ubuntu 16.04, CentOS 7) windows

Full error detail

[info] akka.http.seed.wxs
[info] Windows Installer XML Toolset Linker version 3.11.1.2318
[info] Copyright (c) .NET Foundation and contributors. All rights reserved.
[info] light.exe : error LGHT0182 : Cannot find the table definitions for the 'SecureObjects' table.  This is likely due to a typing error or missing extension.  Please ensure all the necessary extensions are supplied on the command line with the -ext parameter.
[error] java.lang.RuntimeException: Unable to run build msi. Exited with 182
[error]         at scala.sys.package$.error(package.scala:26)
[error]         at com.typesafe.sbt.packager.windows.WindowsPlugin$.$anonfun$windowsSettings$22(WindowsPlugin.scala:141)
[error]         at scala.Function1.$anonfun$compose$1(Function1.scala:44)
[error]         at sbt.internal.util.$tilde$greater.$anonfun$$u2219$1(TypeFunctions.scala:40)
[error]         at sbt.std.Transform$$anon$4.work(System.scala:67)
[error]         at sbt.Execute.$anonfun$submit$2(Execute.scala:269)
[error]         at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:16)
[error]         at sbt.Execute.work(Execute.scala:278)
[error]         at sbt.Execute.$anonfun$submit$1(Execute.scala:269)
[error]         at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:178)
[error]         at sbt.CompletionService$$anon$2.call(CompletionService.scala:37)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error]         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error]         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error]         at java.lang.Thread.run(Thread.java:748)
[error] (Windows / packageBin) Unable to run build msi. Exited with 182
[error] Total time: 14 s, completed 23-Jan-2019 12:25:38

xmeng1 avatar Jan 23 '19 12:01 xmeng1

I have check the target folder:

xxx.wixobj

<table name="SecureObjects"><row sourceLineNumber="D:\Develop\sbt-native-packager\test-project-windows\target\windows\test-project-windows.wxs*33"><field>fl__conf_application_ini205016303</field><field>File</field><field /><field>Administrators</field><field>268435456</field><field>_conf_application_ini205016303</field></row><row sourceLineNumber="D:\Develop\sbt-native-packager\test-project-windows\target\windows\test-project-windows.wxs*34"><field>fl__conf_application_ini205016303</field><field>File</field><field /><field>Users</field><field>268435456</field><field>_conf_application_ini205016303</field></row></table>

and file: xxx.wxs 33 and 34

<util:PermissionEx User="Administrators" GenericAll="yes"/>
                      <util:PermissionEx User="Users" GenericAll="yes"/>

xmeng1 avatar Jan 23 '19 12:01 xmeng1

I think I find the reason: according to the out under the target/streams/windows: I found the second command is

C:\Program Files (x86)\WiX Toolset v3.11\\bin\light.exe -out D:\Develop\akka-http-seed\target\windows\akka.http.seed.msi D:\Develop\akka-http-seed\target\windows\akka.http.seed.wixobj -ext WixUiExtension

but according to the wxs, the util:PermissionEx is necessary. so the -ext WixUtilExtension should append to the command.

xmeng1 avatar Jan 23 '19 13:01 xmeng1

Thanks @xmeng1 for your detailed report.

I'm not sure if this is a version problem with wix. The Windows Server 2012 appveyor uses for testing seems to have the same major version WiX Toolset 3.11.0.1701. Nevertheless there may be a breaking change from 3.11.0.1701 to 3.11.1.2318. Can you verify that it would work with an older version?

As an alternative you could also submit a pull request and fix the command in the WindowsPlugin and we see if the tests still pass.

muuki88 avatar Jan 25 '19 08:01 muuki88