Skip to content

[bug] Cant bundle after upgrade to 1.3 #6853

@CGQAQ

Description

@CGQAQ

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="*">

Metadata

Metadata

Assignees

No one assigned

    Labels

    platform: Windowspriority: 1 highHigh priority bugs/missing features or non-crashing regressionsscope: bundlerThe bundler used in our cli to make installersstatus: needs triageThis issue needs to triage, applied to new issuestype: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions