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

[macOS v2.0-beta] APP Crashes at Launch if productName contains Chinese characters #9178

Closed
idootop opened this issue Mar 13, 2024 · 2 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@idootop
Copy link
Contributor

idootop commented Mar 13, 2024

Describe the bug

I recently upgraded from Tauri v1.x to v2.0-beta, and after the upgrade, I discovered that if the productName is in Chinese, the APP crashes at launch.

Using a Chinese package name was normal in v1.0 and there are so many APP using Chinese product name, like 微信, 百度 etc., so I believe this is a new bug introduced in version 2.0.

Reproduction

  • Create a new Tauri project.
  • Set the productName to Chinese, e.g., "测试" (meaning "test").
  • Run tauri dev on macOS to launch the project.
  • The APP window opens and immediately crashes.

Expected behavior

The productName should be allowed to contain Chinese characters without causing the APP to crash at launch.

Full tauri info output

[✔] Environment
    - OS: Mac OS 13.6.3 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.76.0 (07dca489a 2024-02-04)
    ✔ cargo: 1.76.0 (c84b36747 2024-01-18)
    ✔ rustup: 1.26.0 (5af9b9484 2023-04-05)
    ✔ Rust toolchain: stable-x86_64-apple-darwin (default)
    - node: 18.17.1
    - pnpm: 8.15.4
    - npm: 9.6.7

[-] Packages
    - tauri [RUST]: 2.0.0-beta.10
    - tauri-build [RUST]: 2.0.0-beta.8
    - wry [RUST]: 0.37.0
    - tao [RUST]: 0.26.1
    - @tauri-apps/api [NPM]: 2.0.0-beta.5
    - @tauri-apps/cli [NPM]: 2.0.0-beta.9

[-] App
    - build-type: bundle
    - CSP: default-src x-http: x-https: blob: data: filesystem: ws: http: https: 'unsafe-eval' 'unsafe-inline'
    - frontendDist: ../feiyu/dist
    - devUrl: http://localhost:3000/

Stack trace

No response

Additional context

No response

@idootop idootop added status: needs triage This issue needs to triage, applied to new issues type: bug labels Mar 13, 2024
@pewsheen
Copy link
Contributor

pewsheen commented Mar 14, 2024

tauri-apps/wry#1111
Calling [NSBundle bundleWithIdentifier:] with CFBundleDisplayName contains non-ASCII characters and the app crashes for some reason. This looks like an Apple bug.

We've removed the logic that uses the bundleWithIdentifier: tauri-apps/wry#1186. This issue should be fixed after the next Wry and Tauri releases.

@idootop
Copy link
Contributor Author

idootop commented Mar 14, 2024

Awesome, thanks for your help;) I will close this issue after the next Wry and Tauri releases.

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

3 participants