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] Tauri Panics On New App Creation #10701

Closed
slimandslam opened this issue Aug 20, 2024 · 5 comments
Closed

[bug] Tauri Panics On New App Creation #10701

slimandslam opened this issue Aug 20, 2024 · 5 comments
Labels
status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@slimandslam
Copy link

Describe the bug

Did $ yarn create tauri-app --rc
Running yarn went ok
Running $ yarn tauri ios init caused a panic

Reproduction

$ yarn create tauri-app --rc
yarn create v1.22.22
[1/4] 🔍  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] 🔗  Linking dependencies...
[4/4] 🔨  Building fresh packages...
success Installed "[email protected]" with binaries:
      - create-tauri-app
✔ Project name · tauri-rc
✔ Identifier · com.tauri-rc.app
✔ Choose which language to use for your frontend · TypeScript / JavaScript - (pnpm, yarn, npm, bun)
✔ Choose your package manager · yarn
✔ Choose your UI template · React - (https://react.dev/)
✔ Choose your UI flavor · JavaScript
...
...
...

THEN
yarn [works fine]
THEN

$ yarn tauri ios init
yarn run v1.22.22
$ tauri ios init
thread '<unnamed>' panicked at src/mobile/mod.rs:283:6:
called `Result::unwrap()` on an `Err` value: IdentifierInvalid { identifier: "app.tauri-rc.com", cause: NotAsciiAlphanumeric { bad_chars: ['-'] } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
    Error Tauri CLI unexpected panic
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
$

Expected behavior

There should be no panic

Full tauri info output

$ yarn tauri info
yarn run v1.22.22
$ tauri info

[✔] Environment
    - OS: Mac OS 14.6.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.0 (051478957 2024-07-21)
    ✔ cargo: 1.80.0 (376290515 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 18.18.0
    - pnpm: 9.0.5
    - yarn: 1.22.22
    - npm: 9.8.1
    - bun: 1.1.7

[-] Packages
    - tauri [RUST]: 2.0.0-rc (no lockfile)
    - tauri-build [RUST]: no manifest (no lockfile)
    - wry [RUST]: no manifest (no lockfile)
    - tao [RUST]: no manifest (no lockfile)
    - @tauri-apps/api [NPM]: 2.0.0-rc.2
    - @tauri-apps/cli [NPM]: 2.0.0-rc.6

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../dist
    - devUrl: http://localhost:1420/
    - framework: React
    - bundler: Vite
✨  Done in 4.83s.
$

Stack trace

No response

Additional context

No response

@slimandslam slimandslam added status: needs triage This issue needs to triage, applied to new issues type: bug labels Aug 20, 2024
@geoctrl
Copy link

geoctrl commented Aug 21, 2024

the issue is that your app identifier app.tauri-rc.com doesn't allow the character -. remove that character and it'll work 👍

change your app identifier in: src-tauri/tauri.conf.json under the property identifier

@slimandslam
Copy link
Author

Yes. That is obviously part of the issue. If that is the only problem here then the bug is that the create-app flow is letting the user create illegal identifiers.

@flapili
Copy link

flapili commented Aug 21, 2024

Yes. That is obviously part of the issue. If that is the only problem here then the bug is that the create-app flow is letting the user create illegal identifiers.

I believe that mobiles stuff have more restrictive naming than the desktop part, I think that limit naming possibility to what mobile support is leveling down possibilities depending on the mobile, maybe a solution could be prompt for an alternative name for mobile when init ios/android projects in case it contain illegals characters ?

@ConnorKrammer
Copy link

See also: #9707. Looks like there have been pull requests to address this in the last 24 hours: #10700 and over in the Tao repo, #964.

@FabianLars
Copy link
Member

Closing as duplicate of the linked issue.

@FabianLars FabianLars closed this as not planned Won't fix, can't repro, duplicate, stale Aug 21, 2024
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

5 participants