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] NSIS and WIX fails when application larger than 2GB #7372

Open
pfan94 opened this issue Jul 6, 2023 · 6 comments
Open

[bug] NSIS and WIX fails when application larger than 2GB #7372

pfan94 opened this issue Jul 6, 2023 · 6 comments
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@pfan94
Copy link

pfan94 commented Jul 6, 2023

Describe the bug

Hello, I try to build software installer larger than 2GB but always get this compiler error indicating 2GB size limit. Similar error happens also when I use WIX. I know it is NSIS/WIX side issue but I still want to ask if there is an existing convient way from tauri side to fix this? That would save me a lot time.

Reproduction

  1. create an app larger than 2GB
  2. run yarn tauri build --debug --verbose --bundles nsis

Expected behavior

msi / exe installer successfully created

Platform and versions

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 114.0.1823.67
    ✔ MSVC: Visual Studio Community 2022
    ✔ rustc: 1.67.1 (d5a82bbd2 2023-02-07)
    ✔ Cargo: 1.67.1 (8ecd4f20a 2023-01-10)
    ✔ rustup: 1.25.2 (17db695f1 2023-02-01)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (default)
    - node: 16.16.0
    - yarn: 1.22.19
    - npm: 8.11.0

[-] Packages
    - tauri [RUST]: 1.2.4
    - tauri-build [RUST]: 1.2.1
    - wry [RUST]: 0.23.4
    - tao [RUST]: 0.15.8
    - @tauri-apps/api [NPM]: 1.4.0
    - @tauri-apps/cli [NPM]: 1.4.0

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

Stack trace

MakeNSIS v3.08 - Copyright 1999-2021 Contributors
See the file COPYING for license details.
Credits can be found in the Users Manual.

Processing config: C:\Users\xxx\AppData\Local\tauri\NSIS\nsisconf.nsh
Processing script file: "C:\Users\xxx\src-tauri\target\debug\nsis\x64\installer.nsi" (UTF16LE)

Internal compiler error #12345: error mmapping file (2102998393, 33554432) is out of range.

Note: you may have one or two (large) stale temporary file(s) left in your temporary directory (Generally this only happens on Windows 9x).

Additional context

No response

@pfan94 pfan94 added status: needs triage This issue needs to triage, applied to new issues type: bug labels Jul 6, 2023
@Vang-z
Copy link

Vang-z commented Dec 29, 2023

Same problem I meet💔

@FabianLars
Copy link
Member

I still want to ask if there is an existing convient way from tauri side to fix this?

Nope. As you said, it's a limitation of nsis and wix and they didn't just add this limitation, it's a technical limitation. In nsis case one of the main reasons is caused by nsis being 32bit afaik. Many years ago they also said that time to decompress and do crc checks would be another reason but whatever. And of course not all file system types like fat16 support files this large but that's probably not an issue for us/you either.
There's a community fork trying to lift that limitation here https://sourceforge.net/projects/nsisbi/ but without having looked into it too much i wouldn't be comfortable to add that to tauri. no active maintenance, no docs, but at least source available...

For WiX i don't know the technical reasons but there is at least discussion to make it work in the future. v4 already made it possible for installers themselves to be larger than 2gb but it seems to be a manual process that i don't understand after just a quick look. Also, single files still have to be smaller than 2gb i think.

Sooo, i think a solution for wix is unrealistic but for nsis we could look into that fork if all the extensions we use are available as x64 too. (No ETA, i don't think it'll be a high prio for us any time soon)

@Vang-z
Copy link

Vang-z commented Dec 30, 2023

I still want to ask if there is an existing convient way from tauri side to fix this?

Nope. As you said, it's a limitation of nsis and wix and they didn't just add this limitation, it's a technical limitation. In nsis case one of the main reasons is caused by nsis being 32bit afaik. Many years ago they also said that time to decompress and do crc checks would be another reason but whatever. And of course not all file system types like fat16 support files this large but that's probably not an issue for us/you either. There's a community fork trying to lift that limitation here https://sourceforge.net/projects/nsisbi/ but without having looked into it too much i wouldn't be comfortable to add that to tauri. no active maintenance, no docs, but at least source available...

For WiX i don't know the technical reasons but there is at least discussion to make it work in the future. v4 already made it possible for installers themselves to be larger than 2gb but it seems to be a manual process that i don't understand after just a quick look. Also, single files still have to be smaller than 2gb i think.

Sooo, i think a solution for wix is unrealistic but for nsis we could look into that fork if all the extensions we use are available as x64 too. (No ETA, i don't think it'll be a high prio for us any time soon)

Yes, just yesterday, I tried using nsisbi, but due to my unfamiliarity, it didn't succeed at least. I replaced its files following some simple methods on StackOverflow, and there were no errors during the build process. However, the final result was a failure, with the packaged file only being 100kb. I am still hoping for a mature solution from Tauri. Thank you for your efforts.

@amblamps
Copy link

Also running into this issue now on windows where our cumulative package is larger than 2GB.

@amblamps
Copy link

I was able to replace the NSIS binaries with the latest NSISBI and build, however Windows Defender detects it as

Detected: Trojan:Win32/Bearfoos.A!ml

Which could be a false positive.

@altunenes
Copy link

any hope about this? :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: Windows status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
Status: 📬Proposal
Development

No branches or pull requests

5 participants