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

The primary key 'shortcut_745d79b4_272c_40f1_866b_a333e9a1b425710920299_SC' is duplicated in table 'Shortcut'. #692

Closed
schmitch opened this issue Nov 10, 2015 · 5 comments
Labels

Comments

@schmitch
Copy link
Contributor

Hello, I get the following while building my application:

[info] E:\projects\envisia\finder\mail-worker\target\windows\mail-worker.wix(1293) : error LGHT0130 : The primary key 'shortcut_745d79b4_272c_40f1_866b_a333e9a1b425710920299_SC' is duplicated in table 'Shortcut'.  Please remove one of the entries or rename a part of the primary key to avoid the collision.
java.lang.RuntimeException: Unable to run build msi...
        at scala.sys.package$.error(package.scala:27)
        at com.typesafe.sbt.packager.windows.WindowsPlugin$$anonfun$windowsSettings$13.apply(WindowsPlugin.scala:120)
        at com.typesafe.sbt.packager.windows.WindowsPlugin$$anonfun$windowsSettings$13.apply(WindowsPlugin.scala:100)
        at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:35)
        at scala.Function7$$anonfun$tupled$1.apply(Function7.scala:34)
        at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
        at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
        at sbt.std.Transform$$anon$4.work(System.scala:63)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
        at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
        at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
        at sbt.Execute.work(Execute.scala:235)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
        at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
        at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
        at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)
[error] (windows:packageBin) Unable to run build msi...
[error] Total time: 70 s, completed 10.11.2015 16:42:19

Currently I'm on 1.0.1 but it definitly looks like a regression from #21

@schmitch
Copy link
Contributor Author

The problem seems simple, I use play-framework and have a conf/ folder which inclues:

  • routes
  • application.conf
  • logback.xml
  • some files under conf/files/

and for everything he creates a shortcut in the program folder.

The error looks to be here:
https://github.com/sbt/sbt-native-packager/blob/master/src/main/scala/com/typesafe/sbt/packager/windows/WixHelper.scala#L132:L150

@muuki88
Copy link
Contributor

muuki88 commented Nov 11, 2015

Hm. Why are there duplicates?

// initial random ID
val id = cleanStringForId("shortcut_" + makeGUID).takeRight(67 - targetSize)

// 
for ((target, i) <- targets.zipWithIndex) yield {
 <Shortcut Id={ id + "_SC" + (s"%0${targetSize}d").format(i + 1)
}

The shortcut seems to miss the last part

The primary key 'shortcut_745d79b4_272c_40f1_866b_a333e9a1b425710920299_SC'

shortcut_745d79b4_272c_40f1_866b_a333e9a1b425710920299_SC targetSize should come here.

@schmitch
Copy link
Contributor Author

yeah that's what I reviewed aswell, however thats not the case.

@ezzarghili
Copy link
Contributor

Hello, The PR which I introduced to fix the #21 issue was releases in 1.0.2 so it's normal that you have an issue in 1.0.1.
@muuki88 I think this issue is not relevant to versions from 1.0.2 and up (I am using play framework too) so this could be closed

@muuki88 muuki88 closed this as completed Mar 16, 2016
@muuki88
Copy link
Contributor

muuki88 commented Mar 16, 2016

Thanks @ezzarghili for pointing this out :) I'm always a bit sloppy on the windows things :/

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

No branches or pull requests

3 participants