Skip to content

Automatically detect Tauri v1/v2 #16142

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

Open
rodolfoBee opened this issue Apr 28, 2025 · 2 comments
Open

Automatically detect Tauri v1/v2 #16142

rodolfoBee opened this issue Apr 28, 2025 · 2 comments

Comments

@rodolfoBee
Copy link
Member

Problem Statement

When using Sentry within a Tauri application, what gets detected from the user agent is somewhat misleading, e.g. Ubuntu/Safari. While not exactly false, since it is using gtk-webkit, it is not telling the whole story, so I think it would be a nice feature to detect the tauri version and platform instead.

Solution Brainstorm

To detect Tauri v1, you just have to look if window.TAURI is present; for v2, it is window.TAURI_INTERNALS. Tauri v1 supports Linux/Ubuntu, MacOS X and Windows. Tauri v2 additionally supports Android and iOS.

So instead of Ubuntu/Safari, it would be great to see Ubuntu/Tauri in the future.

Original request from Zendesk.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Apr 28, 2025
@mydea
Copy link
Member

mydea commented Apr 28, 2025

So which "field" should become Tauri? The browser? is there a version?

@timfish
Copy link
Collaborator

timfish commented Apr 29, 2025

My guess is that the web views used across each platform result in a user agent that results in a strange browser or device to be listed.

For example the web view in Tauri on macOS results in the client being listed as something like "Apple Mail". This is probably caused by whatever library Sentry uses for user agent parsing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants