#Tauri v2 beta: Error with tauri plugins

36 messages · Page 1 of 1 (latest)

primal wing
#

New tauri v2 setup, I try to add tauri plugins (fs and dialog) but faces with compilation issue (see image).

Is it a wrong setup on my side or a real issue?

#

Text error for better copy/pasting:



error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> C:\Users\kevin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-fs-2.0.0-beta.0\src\commands.rs:805:20   
    |
805 |     global_scope: &GlobalScope<'_, Entry>,
    |                    ^^^^^^^^^^^ -- help: remove this lifetime argument
    |                    |
    |                    expected 0 lifetime arguments
    |
note: struct defined here, with 0 lifetime parameters
   --> C:\Users\kevin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-2.0.0-beta.3\src\ipc\authority.rs:404:12        
    |
404 | pub struct GlobalScope<T: ScopeObject>(ScopeValue<T>);
    |            ^^^^^^^^^^^

error[E0107]: struct takes 0 lifetime arguments but 1 lifetime argument was supplied
   --> C:\Users\kevin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\tauri-plugin-fs-2.0.0-beta.0\src\commands.rs:806:21   
    |
806 |     command_scope: &CommandScope<'_, Entry>,
    |                     ^^^^^^^^^^^^ -- help: remove this lifetime argument
    |                     |
    |                     expected 0 lifetime arguments
    |
zinc sand
#

This is currently an issue in the latest beta
#contributing message

You can try to rollback 1 beta versions

primal wing
#

Thanks for the info.
Pretty new to rust/env, do you know how to downgrade 1 beta version?

covert flint
#

I feel this is a Windows-specific error, and unfortunately there doesn‘t seem to be a fix for it at present. The offending crate is tauri-plugin-shell version 2.0.0-beta.0 - you could maybe try to switch to an alpha version.

You can do that by going into your-project/src-tauri/Cargo.toml and changing the specified version for tauri-plugin-shell to 2.0.0-alpha

glossy canyon
#

The = means "exactly this version".

primal wing
#

Thanks for the info!

#

Going to try right away

glossy canyon
#

You might need to run cargo update in src-tauri as well. I can never remember when Cargo changes the lock file.
Just tried, no need to do this step.

primal wing
#

Perfect, thanks for your help, booting my PC to try 😄

#

I don't have luck at all

#

setting tauri to =2.0.0-beta.2 gives me this error on npm run tauri dev

#

I missed a step or something 🤔

glossy canyon
#

Seems the lock file is missing from the repository.

primal wing
#

Well, i can't fix that myself then 😦

glossy canyon
#

You can, just got to find the crate that's causing it.

primal wing
#

If i'm understand well: tauri_utils

#

But if i want to rollback tauri-utils i need to rollback tauri-build as well. Doing it to check

#

All good! thaks for your help!

glossy canyon
#

I'm still getting failing builds. What did you have for your Cargo.toml?

buoyant viper
primal wing
#

Rolling back to a previous version fixed the issue for now (unfortunatly no other solutions was found)

#

here's the conf i changed to make it work

#

changing the version of:

  • tauri-build
  • tauri
  • tauri-utils
primal wing
#

After changing tauri and tauri-build version it was not working still.
I had to also manually rollback tauri-utils to a previous one to make everything compile again.

buoyant viper
primal wing
#

is it working for you?

buoyant viper
#

I'll try it now and let you know.

buoyant viper
rapid bear
buoyant viper
glossy canyon
#

The fixed plugins have been published so you can now safely upgrade to 2.0.0-beta.3 although 2.0.0-beta.4 has also been released now.

zinc sand
#

gonna try that out in a second as well! nice