Repository: JetBrains/compose-multiplatform

Issue #196: packageMsi and packageExe: IOException if rememberScope is used
Created: 2020-12-17T18:45:40Z
An java.io.IOException gets thrown when trying to pack an compose application that uses the androidx.compose.runtime.rememberCoroutineScope() function.
Test structure:

Created default project wizzard "Desktop uses Kotlin 1.4.20" project
typed to run packageMsi -> Working
added "val scope = rememberCoroutineScope()" in line 11 of generated Main
typed to run packageMsi -> Error

Duplicate issue #203: GitHub Action with Windows 2019 environment can not execute `packageMsi` properly
Created: 2020-12-19T11:24:39Z
Description
I am using Compose for Desktop to create my desktop application on mutliplatform.
Now using GitHub Actions I'd like to have a full release pipeline building and releasing for Debian, Windows and macOS.
All this does work well for the Debian and macOS build however the Windows build fails.

I am using the out of the box gradle packageMsi task provided by Compose for Desktop and this is my job file:
  windows_build:
    needs: build
    name: Windows Release
    runs-on: windows-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 14
      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: Create Windows Distribution
        run: ./gradlew packageMsi --info

Question, Bug, or Feature?:

Virtual environments affected

 Ubuntu 16.04
 Ubuntu 18.04
 Ubuntu 20.04
 macOS 10.15
 macOS 11.0
 Windows Server 2016 R2
 Windows Server 2019

Expected behavior
I expected it to run successfully like the other two (debian & macOS). On my local Windows 10 machine packageMsi works fine.
macOS job running fine:
  macos_build:
    needs: build
    name: macOS Release
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v2
      - name: Set up JDK
        uses: actions/setup-java@v1
        with:
          java-version: 14
      - name: Grant execute permission for gradlew
        run: chmod +x gradlew
      - name: Create macOS Distribution
        run: ./gradlew packageDmg

Actual behavior
When the packageMsi build is running the following happens:
> Task :packageMsi
Resource missing. [HTTP GET: https://jcenter.bintray.com/org/jetbrains/skiko/skiko-jvm-runtime-windows-x64/0.1.18/skiko-jvm-runtime-windows-x64-0.1.18.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/org/jetbrains/skiko/skiko-jvm-runtime-windows-x64/0.1.18/skiko-jvm-runtime-windows-x64-0.1.18.pom]
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/skiko/skiko-jvm-runtime-windows-x64/0.1.18/skiko-jvm-runtime-windows-x64-0.1.18.pom to C:\Users\runneradmin\AppData\Local\Temp\gradle_download4455112986421540639bin
Resource missing. [HTTP GET: https://jcenter.bintray.com/org/jetbrains/compose/ui/ui-util/0.3.0-build135/ui-util-0.3.0-build135.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/org/jetbrains/compose/ui/ui-util/0.3.0-build135/ui-util-0.3.0-build135.pom]
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-util/0.3.0-build135/ui-util-0.3.0-build135.pom to C:\Users\runneradmin\AppData\Local\Temp\gradle_download5783026550696149625bin
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-util/0.3.0-build135/ui-util-0.3.0-build135.module to C:\Users\runneradmin\AppData\Local\Temp\gradle_download16761543002843221855bin
Downloading https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-collections-immutable/0.3/kotlinx-collections-immutable-0.3.pom to C:\Users\runneradmin\AppData\Local\Temp\gradle_download9484652639762641776bin
Downloading https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-collections-immutable/0.3/kotlinx-collections-immutable-0.3.module to C:\Users\runneradmin\AppData\Local\Temp\gradle_download1159363415023544460bin
Resource missing. [HTTP GET: https://jcenter.bintray.com/org/jetbrains/compose/ui/ui-util-desktop/0.3.0-build135/ui-util-desktop-0.3.0-build135.pom]
Resource missing. [HTTP GET: https://repo.maven.apache.org/maven2/org/jetbrains/compose/ui/ui-util-desktop/0.3.0-build135/ui-util-desktop-0.3.0-build135.pom]
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-util-desktop/0.3.0-build135/ui-util-desktop-0.3.0-build135.pom to C:\Users\runneradmin\AppData\Local\Temp\gradle_download11215449649374218361bin
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-util-desktop/0.3.0-build135/ui-util-desktop-0.3.0-build135.module to C:\Users\runneradmin\AppData\Local\Temp\gradle_download1917231118012666121bin
Downloading https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-collections-immutable-jvm/0.3/kotlinx-collections-immutable-jvm-0.3.pom to C:\Users\runneradmin\AppData\Local\Temp\gradle_download18250167319153556314bin
Downloading https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-collections-immutable-jvm/0.3/kotlinx-collections-immutable-jvm-0.3.module to C:\Users\runneradmin\AppData\Local\Temp\gradle_download1990316790422400833bin
Downloading https://jcenter.bintray.com/org/jetbrains/kotlinx/kotlinx-collections-immutable-jvm/0.3/kotlinx-collections-immutable-jvm-0.3.jar to C:\Users\runneradmin\AppData\Local\Temp\gradle_download10709887218901575145bin
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/compose/ui/ui-util-desktop/0.3.0-build135/ui-util-desktop-0.3.0-build135.jar to C:\Users\runneradmin\AppData\Local\Temp\gradle_download5464264112915500735bin
Downloading https://maven.pkg.jetbrains.space/public/p/compose/dev/org/jetbrains/skiko/skiko-jvm-runtime-windows-x64/0.1.18/skiko-jvm-runtime-windows-x64-0.1.18.jar to C:\Users\runneradmin\AppData\Local\Temp\gradle_download3227321007858503083bin
Caching disabled for task ':packageMsi' because:
  Build cache is disabled
Task ':packageMsi' is not up-to-date because:
  No history is available.
file or directory 'D:\a\CK3-Workbench\CK3-Workbench\build\classes\java\main', not found
Starting process 'command 'C:\hostedtoolcache\windows\jdk\14.0.2\x64\bin\jpackage.exe''. Working directory: D:\a\CK3-Workbench\CK3-Workbench Command: C:\hostedtoolcache\windows\jdk\14.0.2\x64\bin\jpackage.exe @D:\a\CK3-Workbench\CK3-Workbench\build\compose\packageMsi.args.txt
Successfully started process 'command 'C:\hostedtoolcache\windows\jdk\14.0.2\x64\bin\jpackage.exe''
WARNING: Using incubator modules: jdk.incubator.jpackage
java.io.IOException: Command [light.exe, -nologo, -spdb, -ext, WixUtilExtension, -out, D:\a\CK3-Workbench\CK3-Workbench\build\compose\binaries\main\msi\ck3-workbench-0.0.1.msi, -ext, WixUIExtension, -loc, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.incubator.jpackage2143757616795811554\config\MsiInstallerStrings_en.wxl, -b, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.incubator.jpackage2143757616795811554\config, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.incubator.jpackage2143757616795811554\wixobj\main.wixobj, C:\Users\RUNNER~1\AppData\Local\Temp\jdk.incubator.jpackage2143757616795811554\wixobj\bundle.wixobj]in C:\Users\RUNNER~1\AppData\Local\Temp\jdk.incubator.jpackage2143757616795811554\images\win-msi.image\ck3-workbench exited with 103 code

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':packageMsi'.
> Process 'command 'C:\hostedtoolcache\windows\jdk\14.0.2\x64\bin\jpackage.exe'' finished with non-zero exit value 1

Repro steps

Use packageMsi in a GithHub Action pipeline with the runs-on: windows-latest virtual environment
Start build

Closing comment (2020-12-19T15:05:48Z): Very sure this is related to: #196