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] Geolocation specta build error on fresh project #2279

Closed
birdlavv opened this issue Jan 8, 2025 · 3 comments · Fixed by #2281
Closed

[Bug] Geolocation specta build error on fresh project #2279

birdlavv opened this issue Jan 8, 2025 · 3 comments · Fixed by #2281
Labels
bug Something isn't working plugin: geolocation

Comments

@birdlavv
Copy link

birdlavv commented Jan 8, 2025

Installing the geolocation plugin causes a build error:

use of undeclared crate or module `specta_util`

This error looks related to this fix: tauri-apps/tauri#11871

Steps to reproduce:

  1. Create fresh Tauri project
  2. run tauri ios init
  3. Install Geolocation according to documentation: https://github.com/tauri-apps/plugins-workspace/tree/v2/plugins/geolocation
  4. run tauri ios dev

tauri "info"

[✔] Environment
- OS: Mac OS 15.2.0 arm64 (X64)
✔ Xcode Command Line Tools: installed
✔ rustc: 1.83.0 (90b35a623 2024-11-26)
✔ cargo: 1.83.0 (5ffbef321 2024-10-29)
✔ rustup: 1.27.1 (54dd3d00f 2024-04-24)
✔ Rust toolchain: stable-aarch64-apple-darwin (default)
- node: 22.13.0
- pnpm: 10.0.0
- npm: 10.9.2

[-] Packages
- tauri 🦀: 2.2.0
- tauri-build 🦀: 2.0.4
- wry 🦀: 0.48.0
- tao 🦀: 0.31.1
- @tauri-apps/api : 2.2.0
- @tauri-apps/cli : 2.2.2

[-] Plugins
- tauri-plugin-geolocation 🦀: 2.2.0
- @tauri-apps/plugin-geolocation : 2.2.0

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

[-] iOS
- Developer Teams: [...]

@FabianLars
Copy link
Member

Can you post the full error message please?

@FabianLars FabianLars added bug Something isn't working plugin: geolocation labels Jan 8, 2025
@birdlavv
Copy link
Author

birdlavv commented Jan 8, 2025

Here's the full error:

 Updating git repository `https://github.com/tauri-apps/plugins-workspace`
    Updating crates.io index
     Locking 6 packages to latest compatible versions
      Adding Inflector v0.11.4
      Adding paste v1.0.15
      Adding specta v2.0.0-rc.20
      Adding specta-macros v2.0.0-rc.17
      Adding specta-util v0.0.7
      Adding tauri-plugin-geolocation v2.2.0 (https://github.com/tauri-apps/plugins-workspace?rev=c6169ce2d34eff934390c7d01b75f994ddef8c26#c6169ce2)
   Compiling tauri-plugin-geolocation v2.2.0 (https://github.com/tauri-apps/plugins-workspace?rev=c6169ce2d34eff934390c7d01b75f994ddef8c26#c6169ce2)
   Compiling plug v0.1.0 (/Users/user/Projects/plug/src-tauri)
error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/models.rs:86:48
   |
86 | #[derive(Debug, Clone, Serialize, Deserialize, Type)]
   |                                                ^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/models.rs:76:57
   |
76 | #[derive(Debug, Clone, Default, Serialize, Deserialize, Type)]
   |                                                         ^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/models.rs:56:57
   |
56 | #[derive(Debug, Clone, Default, Serialize, Deserialize, Type)]
   |                                                         ^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/models.rs:49:48
   |
49 | #[derive(Debug, Clone, Serialize, Deserialize, Type)]
   |                                                ^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/models.rs:28:57
   |
28 | #[derive(Debug, Clone, Default, Serialize, Deserialize, Type)]
   |                                                         ^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
 --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/models.rs:9:57
  |
9 | #[derive(Debug, Clone, Default, Serialize, Deserialize, Type)]
  |                                                         ^^^^ use of undeclared crate or module `specta_util`
  |
  = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0433]: failed to resolve: use of undeclared crate or module `specta_util`
  --> /Users/user/.cargo/git/checkouts/plugins-workspace-fd0259fcb18f51ad/c6169ce/plugins/geolocation/src/error.rs:12:35
   |
12 | #[derive(Debug, thiserror::Error, Type)]
   |                                   ^^^^ use of undeclared crate or module `specta_util`
   |
   = note: this error originates in the derive macro `Type` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0433`.
error: could not compile `tauri-plugin-geolocation` (lib) due to 7 previous errors
Failed to run `cargo build`: command ["cargo", "build", "--package", "plug", "--manifest-path", "/Users/user/Projects/plug/src-tauri/Cargo.toml", "--target", "aarch64-apple-ios-sim", "--features", "tauri/rustls-tls", "--lib", "--no-default-features"] exited with code 101
    Error Failed to run `cargo build`: command ["cargo", "build", "--package", "plug", "--manifest-path", "/Users/user/Projects/plug/src-tauri/Cargo.toml", "--target", "aarch64-apple-ios-sim", "--features", "tauri/rustls-tls", "--lib", "--no-default-features"] exited with code 101
 ELIFECYCLE  Command failed with exit code 1.
Command PhaseScriptExecution failed with a nonzero exit code

** BUILD FAILED **


The following build commands failed:
        PhaseScriptExecution Build\ Rust\ Code /Users/user/Library/Developer/Xcode/DerivedData/plug-dvpbkhwgdylergerjonumxbwtiad/Build/Intermediates.noindex/plug.build/debug-iphonesimulator/plug_iOS.build/Script-7410B68769DB8337BA96C7E1.sh (in target 'plug_iOS' from project 'plug')
        Building workspace plug with scheme plug_iOS and configuration debug
(2 failures)
command ["xcodebuild"] exited with code 65
    Error command ["xcodebuild"] exited with code 65
 ELIFECYCLE  Command failed with exit code 1.

@FabianLars
Copy link
Member

thanks. a bit weird that i don't see this myself but the error itself makes sense and you were right about the linked pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working plugin: geolocation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants