compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Unable to launch the SplitPane component demo

Open Genie23 opened this issue 4 years ago • 6 comments

Hello,

As I mentioned some time ago, I plan to try to write a Chart component for Compose Desktop. When I asked about how to do this, it was suggested that I copy the SplitPane folder and start creating from there.

So, I cloned this repository today (I started from a fresh copy). Then, before attacking my component, I wanted to test the SplitPane demo to understand what result is obtained by running the code on which it is suggested to base my understanding.

So I linked the build.gradle from the components folder to my Intellij IDEA project, and after this link I wanted to launch the components > SplitPane > demo > Tasks > compose desktop > run distributable.

But I get this error every time:

15:41:41: Executing task 'runDistributable --stacktrace'...

> Task :buildSrc:compileKotlin UP-TO-DATE
> Task :buildSrc:compileJava NO-SOURCE
> Task :buildSrc:compileGroovy NO-SOURCE
> Task :buildSrc:pluginDescriptors UP-TO-DATE
> Task :buildSrc:processResources NO-SOURCE
> Task :buildSrc:classes UP-TO-DATE
> Task :buildSrc:inspectClassesForKotlinIC UP-TO-DATE
> Task :buildSrc:jar UP-TO-DATE
> Task :buildSrc:assemble UP-TO-DATE
> Task :buildSrc:compileTestKotlin NO-SOURCE
> Task :buildSrc:pluginUnderTestMetadata UP-TO-DATE
> Task :buildSrc:compileTestJava NO-SOURCE
> Task :buildSrc:compileTestGroovy NO-SOURCE
> Task :buildSrc:processTestResources NO-SOURCE
> Task :buildSrc:testClasses UP-TO-DATE
> Task :buildSrc:test NO-SOURCE
> Task :buildSrc:validatePlugins UP-TO-DATE
> Task :buildSrc:check UP-TO-DATE
> Task :buildSrc:build UP-TO-DATE

> Configure project :SplitPane:demo
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.


> Task :downloadWix
Download https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
Download https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip

> Task :unzipWix FAILED
8 actionable tasks: 2 executed, 6 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':unzipWix'.
> Cannot expand ZIP 'D:\Utilisateurs\sphin\Documents\Kotlin_Projects\Compose_Desktop\components\build\wixToolset\wix311.zip' as it is not a file.

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':unzipWix'.
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:38)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
Caused by: org.gradle.api.InvalidUserDataException: Cannot expand ZIP 'D:\Utilisateurs\sphin\Documents\Kotlin_Projects\Compose_Desktop\components\build\wixToolset\wix311.zip' as it is not a file.
	at org.gradle.api.internal.file.archive.ZipFileTree.visit(ZipFileTree.java:84)
	at org.gradle.api.internal.file.collections.FilteredMinimalFileTree.visit(FilteredMinimalFileTree.java:102)
	at org.gradle.api.internal.file.collections.FileTreeAdapter.visit(FileTreeAdapter.java:90)
	at org.gradle.api.internal.file.AbstractFileTree.isEmpty(AbstractFileTree.java:63)
	at org.gradle.api.internal.file.CompositeFileCollection.isEmpty(CompositeFileCollection.java:61)
	at org.gradle.api.internal.file.CompositeFileCollection.isEmpty(CompositeFileCollection.java:61)
	at org.gradle.api.internal.file.CompositeFileCollection.isEmpty(CompositeFileCollection.java:61)
	at org.gradle.api.internal.file.CompositeFileCollection.isEmpty(CompositeFileCollection.java:61)
	at org.gradle.api.internal.tasks.execution.DefaultEmptySourceTaskSkipper.skipIfEmptySources(DefaultEmptySourceTaskSkipper.java:67)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.skipIfInputsEmpty(ExecuteActionsTaskExecuter.java:451)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:45)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:284)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:44)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:33)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:185)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:174)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:79)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:79)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)


* Get more help at https://help.gradle.org

BUILD FAILED in 14s
15:41:57: Task execution finished 'runDistributable --stacktrace'.

So by reading the logs a bit, I can see more or less where the error can come from: it downloads the wix binaries as a zip archive under the name wix311-binaries.zip and then tries to unzip the archive wix311. zip archive, which does not exist (in my components > build > wixToolset folder, I have a folder named wix311.zip, but it is a folder containing the wix311-binaries.zip archive and not a zip archive itself).

I specify that, having just started from a new copy to first test the code of the component that I am proposed to duplicate, I have not really modified any code anywhere.

In short, I'm stuck, I don't see how to fix this problem. Can you help me?

Genie23 avatar Oct 12 '21 13:10 Genie23

As it's already been a week since I posted my problem and I haven't received any solution proposal, I'd like to ask: is my problem without solution?

If yes, tell me, I will continue my research towards other frameworks to achieve my goal which is to realize a commercial management software, which necessarily implies to display graphs to make the data processed by the software more understandable.

Genie23 avatar Oct 19 '21 12:10 Genie23

The same problem, my own project with simple config. When I go ahead and package the wix311.zip folder as a real zip file, the build goes further but than fails with:

Execution failed for task ':unzipWix'.
> Entry wix311-binaries/LICENSE.TXT is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.3/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Checked with gradle: 6.9, 7.2, 7.3

mcpiroman avatar Dec 04 '21 16:12 mcpiroman

The walkaround is to unpackage the downloaded wix311-binaries.zip file somewhere and add an env var WIX_PATH with the path to it.

mcpiroman avatar Dec 04 '21 16:12 mcpiroman

This also happened to me after splitting the project into multiple submodules.

felixdivo avatar Jan 24 '22 13:01 felixdivo

This works for me,do like this

  1. download https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
  2. copy to build/wixToolset
  3. rename file to wix311.zip
  4. execute gradle task agin

TianJieYouYue avatar Jul 21 '22 06:07 TianJieYouYue

I have the same problem, tried the above methods and still can't solve it, can anyone help me to solve this problem? Execution failed for task ':unzipWix'.

Entry wix311-binaries/LICENSE.TXT is a duplicate but no duplicate handling strategy has been set. Please refer to https://docs.gradle.org/7.3/dsl/org.gradle.api.tasks.Copy.html#org.gradle.api.tasks.Copy:duplicatesStrategy for details.

Neil-Tsai avatar Aug 23 '22 14:08 Neil-Tsai

The following code has been a workaround for me. I add this into my root build.gradle.kts:

val osName: String = System.getProperty("os.name")
val isWindows = osName.startsWith("windows", ignoreCase = true)
if (isWindows) {
    val wixZipFile = File(buildDir, "wixToolset/wix311.zip")
    val wixUnzipped = File(buildDir, "wixToolset/unzipped")

    val downloadWixPatch = tasks.create("downloadWixPatch", Download::class) {
        src("https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip")
        dest(wixZipFile)

        doFirst {
            wixZipFile.parentFile.mkdirs()
        }
    }

    tasks.create("unzipWixPatch", Copy::class) {
        dependsOn(downloadWixPatch)

        from(project.zipTree(wixZipFile))
        destinationDir = wixUnzipped

        doFirst {
            wixUnzipped.mkdirs()
        }
    }
}

In my CI I call ./gradlew :unzipWixPatch before doing anything and then set the environment variable for the path:

        env:
          WIX_PATH: "${{ github.workspace }}\\build\\wixToolset\\unzipped"

The issue is that the ./build/wixToolset/wix311.zip is being created as a directory, and the real zip is inside it named wix311-binaries.zip. I've tried moving the file and doing other things, but nothing worked, as we don't have access into the gradle tasks that we'd need. The above code just handles it ourselves manually.

I hope this helps someone else.

ScottPierce avatar Oct 07 '22 13:10 ScottPierce

I tried all the solutions provided above, but the problem did not solve. Is there now an official solution to this problem?

denchic45 avatar Oct 25 '23 19:10 denchic45

@denchic45 Are you trying to launch this demo project? https://github.com/JetBrains/compose-multiplatform/tree/master/components/SplitPane/demo

dima-avdeev-jb avatar Oct 27 '23 14:10 dima-avdeev-jb

@dima-avdeev-jb Not really, in my project a similar error appears when I try to run the "run distributable" task. I tried adding the code in gradle suggested by @ScottPierce and downloading the wix311-binaries.zip archive, but the problem remains. Maybe I did something wrong.

denchic45 avatar Oct 27 '23 16:10 denchic45

@denchic45 Good point to start investigation is try to provide minimal reproducible sample of your Issue. You can share it on GitHub and we can try to check it too.

dima-avdeev-jb avatar Oct 28 '23 16:10 dima-avdeev-jb

@dima-avdeev-jb I create issue #3876

denchic45 avatar Oct 28 '23 18:10 denchic45

@denchic45 Thanks for another one Issue. As I understand - it is another one separated Issue. I think better to remove unrelated link from this discussion.

dima-avdeev-jb avatar Oct 29 '23 05:10 dima-avdeev-jb

@denchic45 Sorry, I changed my mind. Better to stay link here. Thanks!

dima-avdeev-jb avatar Oct 29 '23 05:10 dima-avdeev-jb