Skip to content

[bug] isRegistered cause rust panic and not throw error #7105

@kangjun-lee

Description

@kangjun-lee

Describe the bug

If the input parameter is invalid, it should return an error.
But only the console shows the rust panic and the isRegistered request not end.

Reproduction

Run following code in any frontend file.

console.log("TEST")
isRegistered('Ctrl+Shift+Alt+') // <- Stuck here
  .then((status) => {
    console.log('isRegistered', status)
  })
  .catch((err) => {
    console.error('isRegistered error', err)
  })

Expected behavior

Prints error in console

Platform and versions

❯ cargo tauri info

[✔] Environment
    - OS: Mac OS 13.2.1 X64
    ✔ Xcode Command Line Tools: installed
    ✔ 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-aarch64-apple-darwin (environment override by RUSTUP_TOOLCHAIN)
    - node: 18.14.2
    - pnpm: 8.5.0
    - yarn: 3.5.0
    - npm: 9.5.0


[-] Packages
    - tauri [RUST]: 1.3.0
    - tauri-build [RUST]: 1.3.0
    - wry [RUST]: 0.24.3
    - tao [RUST]: 0.16.1
    - @tauri-apps/api [NPM]: 1.3.0
    - @tauri-apps/cli [NPM]: 1.3.1

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

Stack trace

No response

Additional context

image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions