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

[bug] Cant bundle after upgrade to 1.3 #6853

Closed
CGQAQ opened this issue May 4, 2023 · 2 comments
Closed

[bug] Cant bundle after upgrade to 1.3 #6853

CGQAQ opened this issue May 4, 2023 · 2 comments
Labels
platform: Windows priority: 1 high scope: bundler The bundler used in our cli to make installers status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@CGQAQ
Copy link
Contributor

CGQAQ commented May 4, 2023

Describe the bug

Details

Running [tauri_bundler::bundle::common] Command C:\Users\T\AppData\Local\tauri/WixTools\candle.exe -arch x64 main.wxs -dSourceDir=F:\work\T\target\release\T.exe
Windows Installer XML Toolset Compiler version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved.

main.wxs
F:\work\T\target\release\wix\x64\main.wxs(101) : error CNDL0107 : Schema validation failed with the following error at line 1, column 5838: The element 'DirectoryRef' in namespace 'http://schemas.microsoft.com/wix/2006/wi' cannot contain text. List of possible elements expected: 'Component Directory Merge ##other:*'.
Error [tauri_cli_node] failed to bundle project: error running candle.exe
 ELIFECYCLE  Command failed with exit code 1.

Reproduction

No response

Expected behavior

No response

Platform and versions

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 112.0.1722.68
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.70.0-nightly (db0cbc48d 2023-03-26)
    ✔ Cargo: 1.70.0-nightly (15d090969 2023-03-21)
    ✔ rustup: 1.25.2 (17db695f1 2023-02-01)
    ✔ Rust toolchain: nightly-x86_64-pc-windows-msvc (default)
    - node: 18.12.1
    - pnpm: 8.3.1
    - yarn: 1.22.19
    - npm: 8.19.2

[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.1
    - tao [RUST]: 0.16.0
    - @tauri-apps/api [NPM]: 1.3.0
    - @tauri-apps/cli [NPM]: 1.3.0

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../dist
    - devPath: http://localhost:5173/
    - framework: React
    - bundler: Vite

Stack trace

No response

Additional context

I found some interesting content of main.wxs, it seems some content has been HTML escape incorrectly

Details

<DirectoryRef Id="INSTALLDIR">
            <Component Id="RegistryEntries" Guid="*">
                <RegistryKey Root="HKCU" Key="Software\troila\5">
                    <RegistryValue Name="InstallDir" Type="string" Value="[INSTALLDIR]" KeyPath="yes" />
                </RegistryKey>
            </Component>
            <Component Id="Path" Guid="cd1833f3-8053-505c-b4bd-b9c163ca2cef" Win64="$(var.Win64)">
                <File Id="Path" Source="F:\work\5\target\release\5.exe" KeyPath="yes" Checksum="yes"/>
            </Component>
            &lt;Directory Id&#x3D;&quot;I4862bd1cb5344602aff99ebb5cc60fb2&quot; Name&#x3D;&quot;_up_&quot;&gt;&lt;Directory Id&#x3D;&quot;Ice4557bb1b7649c5af0dd4591529e2f2&quot; Name&#x3D;&quot;public&quot;&gt;&lt;Component Id&#x3D;&quot;I6960fc080696409080fd7c8321c3577c&quot; Guid&#x3D;&quot;3e33e769-2f78-4b61-9c1c-a35acb28886b&quot; Win64&#x3D;&quot;$(var.Win64)&quot; KeyPath&#x3D;&quot;yes&quot;&gt;&lt;File Id&#x3D;&quot;PathFile_I6960fc080696409080fd7c8321c3577c&quot; Source&#x3D;&quot;F:\work\t\src-tauri\..\public\driveTemplate.xlsx&quot; /&gt;&lt;/Component&gt;&lt;Component Id&#x3D;&quot;I348a7255e83040e397e42f4f5bed4c39&quot; Guid&#x3D;&quot;6055f42f-d4f4-4827-97a3-ba6d335e5ab3&quot; Win64&#x3D;&quot;$(var.Win64)&quot; KeyPath&#x3D;&quot;yes&quot;&gt;&lt;File Id&#x3D;&quot;PathFile_I348a7255e83040e397e42f4f5bed4c39&quot; Source&#x3D;&quot;F:\work\t\src-tauri\..\public\favicon.ico&quot; /&gt;&lt;/Component&gt;&lt;Component Id&#x3D;&quot;I7079f0ff05b445119e4be62759f24d08&quot; Guid&#x3D;&quot;1579aa13-0936-4617-ba83-91cb922a6b07&quot; Win64&#x3D;&quot;$(var.Win64)&quot; KeyPath&#x3D;&quot;yes&quot;&gt;&lt;File Id&#x3D;&quot;PathFile_I7079f0ff05b445119e4be62759f24d08&quot; Source&#x3D;&quot;F:\work\t\src-tauri\..\public\paramTemplate.xlsx&quot; /&gt;&lt;/Component&gt;&lt;Component Id&#x3D;&quot;I0854264d4f5c43a68c02d250409d76e3&quot; Guid&#x3D;&quot;f2563cbc-9060-4140-b88a-2e2b9a72c81e&quot; Win64&#x3D;&quot;$(var.Win64)&quot; KeyPath&#x3D;&quot;yes&quot;&gt;&lt;File Id&#x3D;&quot;PathFile_I0854264d4f5c43a68c02d250409d76e3&quot; Source&#x3D;&quot;F:\work\t\src-tauri\..\public\pointTemplate.xlsx&quot; /&gt;&lt;/Component&gt;&lt;Directory Id&#x3D;&quot;I2a9e77b3205643baa3d1e40b5fa8e34e&quot; Name&#x3D;&quot;scripts&quot;&gt;&lt;Component Id&#x3D;&quot;I79e052961ff046b4ae607e1f48167449&quot; Guid&#x3D;&quot;ee43e2ae-f321-4fbc-a693-23607cd5d8b2&quot; Win64&#x3D;&quot;$(var.Win64)&quot; KeyPath&#x3D;&quot;yes&quot;&gt;&lt;File Id&#x3D;&quot;PathFile_I79e052961ff046b4ae607e1f48167449&quot; Source&#x3D;&quot;F:\work\t\src-tauri\..\public\scripts\xlsxstyle.full.min.js&quot; /&gt;&lt;/Component&gt;&lt;/Directory&gt;&lt;/Directory&gt;&lt;/Directory&gt;
            <Component Id="CMP_UninstallShortcut" Guid="*">

@CGQAQ CGQAQ added status: needs triage This issue needs to triage, applied to new issues type: bug labels May 4, 2023
@FabianLars FabianLars added priority: 1 high platform: Windows scope: bundler The bundler used in our cli to make installers labels May 4, 2023
@FabianLars
Copy link
Member

Here's another log from discord:

    Finished release [optimized] target(s) in 10m 52s
        Info Verifying wix package
 Downloading https://github.com/wixtoolset/wix3/releases/download/wix3112rtm/wix311-binaries.zip
        Info validating hash
        Info extracting WIX
        Info Target: x64
     Running candle for "main.wxs"
       Error failed to bundle project: error running candle.exe
Error: Command failed with exit code 1: tauri build

With --verbose the last lines are as follows:

       Debug [handlebars::render] Rendering helper: "if", params: [PathAndJson { relative_path: Some("webview2_bootstrapper_path"), value: Missing }], hash: {}
       Debug [handlebars::render] Rendering helper: "if", params: [PathAndJson { relative_path: Some("webview2_installer_path"), value: Missing }], hash: {}
       Debug [handlebars::render] Rendering helper: "if", params: [PathAndJson { relative_path: Some("enable_elevated_update_task"), value: Missing }], hash: {}
     Running [tauri_bundler::bundle::windows::msi::wix] candle for "main.wxs"
     Running [tauri_bundler::bundle::common] Command `C:\Users\runneradmin\AppData\Local\tauri/WixTools\candle.exe  -arch x64 main.wxs -dSourceDir=D:\a\asterion\asterion\target\release\Asterion.exe`
Windows Installer XML Toolset Compiler version 3.11.2.4516
Copyright (c) .NET Foundation and contributors. All rights reserved.

main.wxs
D:\a\asterion\asterion\target\release\wix\x64\main.wxs(101) : error CNDL0107 : Schema validation failed with the following error at line 1, column 5536: The element 'DirectoryRef' in namespace 'http://schemas.microsoft.com/wix/2006/wi' cannot contain text. List of possible elements expected: 'Component Directory Merge ##other:*'.
       Error [tauri_cli_node] failed to bundle project: error running candle.exe
Error: Command failed with exit code 1: tauri build --verbose

@FabianLars

This comment was marked as outdated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows priority: 1 high scope: bundler The bundler used in our cli to make installers status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants