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] getUserMedia/getDisplayMedia does not show permissions prompt on MacOS 14.5 #10878

Closed
koerismo opened this issue Sep 3, 2024 · 3 comments
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug

Comments

@koerismo
Copy link

koerismo commented Sep 3, 2024

Describe the bug

I have seen multiple closed issues referencing this same problem, but it appears to have returned as of the latest Tauri release candidate. (rc8)
I followed the common advice on these issues and added an Info.plist and Release.entitlements, however that only changed the error from it being undefined to it being NotAllowed, despite no permission request dialog appearing. I saw that there was a patch for this issue on the wry repository at some point, though it was apparently reverted?

When https://localhost:1420 is opened in Safari or Firefox, the permissions dialog functions as expected.

Screenshot 2024-09-03 at 12 41 50 PM

Reproduction

  • Create project with latest Tauri release candidate
  • Attempt to access user/display media
  • Dialog does not appear

Expected behavior

The permissions prompt should appear after requesting user media instead of silently rejecting it.

Full tauri info output

[✔] Environment
    - OS: Mac OS 14.5.0 arm64 (X64)
    ✔ Xcode Command Line Tools: installed
    ✔ rustc: 1.80.1 (3f5fd8dd4 2024-08-06)
    ✔ cargo: 1.80.1 (376290515 2024-07-16)
    ✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
    ✔ Rust toolchain: stable-aarch64-apple-darwin (default)
    - node: 21.7.3
    - pnpm: 9.1.2
    - yarn: 1.22.19
    - npm: 10.5.0
    - bun: 1.1.3

[-] Packages
    - tauri 🦀: 2.0.0-rc.8
    - tauri-build 🦀: 2.0.0-rc.7
    - wry 🦀: 0.42.0
    - tao 🦀: 0.29.1
    - @tauri-apps/api : 2.0.0-rc.4
    - @tauri-apps/cli : 2.0.0-rc.10

[-] Plugins
    - tauri-plugin-shell 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-shell : 2.0.0-rc.1
    - tauri-plugin-dialog 🦀: 2.0.0-rc.3
    - @tauri-apps/plugin-dialog : 2.0.0-rc.1
    - tauri-plugin-fs 🦀: 2.0.0-rc.1
    - @tauri-apps/plugin-fs : 2.0.0-rc.2

[-] App
    - build-type: bundle
    - CSP: unset
    - frontendDist: ../build
    - devUrl: http://localhost:1420/
    - framework: Svelte
    - bundler: Vite

Stack trace

N/A

Additional context

No response

@koerismo koerismo added status: needs triage This issue needs to triage, applied to new issues type: bug labels Sep 3, 2024
@FabianLars
Copy link
Member

At first i thought it may be related to tauri-apps/wry#1195 but this part

When https://localhost:1420/ is opened in Safari or Firefox, the permissions dialog functions as expected.

makes me unsure. Info.plist files only properly work in actual app bundles so maybe try actually building the app and starting the .app bundle instead.

@koerismo
Copy link
Author

koerismo commented Sep 3, 2024

Just built the app and tested it a couple times - getUserMedia functioned correctly when packaged, however getDisplayMedia did not.

It would be great if there was some sort of config property/capability to allow using these features when developing.

@FabianLars
Copy link
Member

Giving your Terminal app (or vscode for example if you use its built-in terminal) permissions to use the camera should make it work in development. Not sure whether we can auto-request the permissions for the process that tauri dev is running in but imo that doesn't sound like a good idea either way.

however getDisplayMedia did not.

Which should be the issue i linked.

@FabianLars FabianLars closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: macOS status: needs triage This issue needs to triage, applied to new issues type: bug
Projects
None yet
Development

No branches or pull requests

2 participants