aptabase / tauri-plugin-aptabase

Tauri Plugin for Aptabase: Open Source, Privacy-First and Simple Analytics for Mobile, Desktop and Web Apps
https://aptabase.com
MIT License
32 stars 4 forks source link

Please Support Tauri V2 #3

Closed hhstore closed 1 year ago

hhstore commented 1 year ago

v2 branch not work:

error log:


error: failed to select a version for `gdk-sys`.
    ... required by package `webkit2gtk v0.19.1`
    ... which satisfies dependency `webkit2gtk = "^0.19.1"` of package `tauri v2.0.0-alpha.10`
    ... which satisfies dependency `tauri = "^2.0.0-alpha.10"` of package `app v0.1.0 (/.../packages/v2/src-tauri)`
versions that meet the requirements `^0.16.0` are: 0.16.0

the package `gdk-sys` links to the native library `gdk-3`, but it conflicts with a previous package which links to `gdk-3` as well:
package `gdk-sys v0.15.1`
    ... which satisfies dependency `ffi = "^0.15.1"` of package `gdk v0.15.4`
    ... which satisfies dependency `gdk = "^0.15.0"` of package `webkit2gtk v0.18.2`
    ... which satisfies dependency `webkit2gtk = "^0.18.2"` of package `tauri-runtime-wry v0.13.0`
    ... which satisfies dependency `tauri-runtime-wry = "^0.13.0-alpha.6"` of package `tauri v2.0.0-alpha.10`
    ... which satisfies dependency `tauri = "^2.0.0-alpha.10"` of package `app v0.1.0 (/../packages/v2/src-tauri)`
Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='gdk-sys' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for `gdk-sys` which could resolve this conflict
       Error failed to build app: failed to build app
task: Failed to run task "v2:build:desktop": exit status 1
hhstore commented 1 year ago

find the solution:

[dependencies]
tauri-plugin-aptabase = { git = "https://github.com/aptabase/tauri-plugin-aptabase", branch = "next" }

# tauri-plugin-aptabase = "0.2"  # Wrong configuration.
goenning commented 1 year ago

Did it work?

There's a new feature on main branch that I need to port to the next branch. So I could look at this if it's not working for you

goenning commented 1 year ago

@hhstore I also updated the next branch to include the latest feature with_panic_hook so you can use Aptabase as a lightweight crash analytics too: https://aptabase.com/blog/catching-panics-on-tauri-apps

I don't use Tauri v2 on my apps, so please let me know if you hit any issues with the next branch