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] Resources with $ in their name make build step fail on Windows #9657

Open
enkhjile opened this issue May 4, 2024 · 0 comments
Open
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@enkhjile
Copy link

enkhjile commented May 4, 2024

Describe the bug

I'm working on an app that utilizes JNI to call Java. In my Java class, I have inner classes that should be named OuterClass$InnerClass.class after compilation. However, these inner class files cannot be found during the build step. It appears that the $ symbol is being improperly escaped with another $, causing the build step to fail.

Reproduction

  1. Create a Next.js Tauri app using Next.js.
  2. Add a resource with $ in its name to the tauri.conf.json.
  3. Build the app.

Expected behavior

The build step should finish with included resources.

Full tauri info output

[✔] Environment
    - OS: Windows 10.0.22621 X64
    ✔ WebView2: 124.0.2478.67
    ✔ MSVC: 
        - Visual Studio Community 2019
        - Visual Studio Community 2022
    ✔ rustc: 1.77.1 (7cf61ebde 2024-03-27)
    ✔ cargo: 1.77.1 (e52e36006 2024-03-26)
    ✔ rustup: 1.27.0 (bbb9276d2 2024-03-08)
    ✔ Rust toolchain: stable-x86_64-pc-windows-msvc (environment override by RUSTUP_TOOLCHAIN)
    - node: 20.12.0
    - pnpm: 8.15.6
    - npm: 10.5.0

[-] Packages
    - tauri [RUST]: 1.5.4
    - tauri-build [RUST]: 1.5.1
    - wry [RUST]: 0.24.7
    - tao [RUST]: 0.16.7
    - tauri-cli [RUST]: 1.5.11
    - @tauri-apps/api [NPM]: 1.5.3 (outdated, latest: 1.5.4)
    - @tauri-apps/cli [NPM]: 1.5.11 (outdated, latest: 1.5.12)

[-] App
    - build-type: bundle
    - CSP: unset
    - distDir: ../out
    - devPath: http://localhost:3000/
    - framework: React (Next.js)
    - bundler: Webpack

Stack trace

The actual file is named WebFXScan$CImageInfo.class

File: "C:\Users\enkhj\projects\pms-mirai-app\src-tauri\java\adview\webfxscan\WebFXScan$$CImageInfo.class" -> no files found.
Usage: File [/nonfatal] [/a] ([/r] [/x filespec [...]] filespec [...] |
   /oname=outfile one_file_only)
Error in script "C:\Users\enkhj\projects\pms-mirai-app\src-tauri\target\release\nsis\x64\installer.nsi" on line 563 -- aborting creation process
       Error failed to bundle project: `The system cannot find the file specified. (os error 2)`

Additional context

It works fine on MacOS

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

No branches or pull requests

1 participant