Install
$ agentstack add skill-impertio-studio-tauri-2-claude-skill-package-tauri-errors-build ✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ● Network access Used
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ● Dynamic code execution Used
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
Verified badge
Passed review? Show it. Paste this badge into your README, it links to the public security report.
Reliability & compatibility
Declared compatibility
Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.
We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.
How agent discovery & health will work →About
tauri-errors-build
Quick Diagnosis
When a Tauri 2 build fails, identify the phase first:
Build Pipeline Phases:
1. Frontend build (beforeBuildCommand) --> JS/TS errors
2. Cargo compile (rustc) --> Rust compilation errors
3. Bundler (NSIS/WiX/DMG/deb) --> Platform packaging errors
4. Code signing (codesign/signtool) --> Signing/notarization errors
ALWAYS read the FULL error output. The root cause is often buried above the final error message.
NEVER skip cargo clean when troubleshooting persistent compilation errors -- stale build artifacts cause phantom failures.
Error Lookup Table: Cargo Compilation
ERR-B001: Command function visibility in lib.rs
Error: error[E0255]: the name X is defined multiple times or cryptic macro expansion errors.
Cause: Command functions defined directly in src-tauri/src/lib.rs are marked pub.
Fix: ALWAYS remove pub from command functions in lib.rs. Commands in separate modules MUST be pub.
// WRONG -- in lib.rs
#[tauri::command]
pub fn greet(name: String) -> String { ... }
// CORRECT -- in lib.rs
#[tauri::command]
fn greet(name: String) -> String { ... }
// CORRECT -- in src-tauri/src/commands.rs (separate module)
#[tauri::command]
pub fn greet(name: String) -> String { ... }
ERR-B002: Missing Serialize on error type
Error: the trait bound MyError: Serialize is not satisfied
Cause: Command return type Result requires E to implement serde::Serialize.
Fix: ALWAYS implement Serialize manually for error enums that use thiserror:
#[derive(Debug, thiserror::Error)]
enum AppError {
#[error(transparent)]
Io(#[from] std::io::Error),
#[error("not found: {0}")]
NotFound(String),
}
impl serde::Serialize for AppError {
fn serialize(&self, serializer: S) -> Result
where S: serde::ser::Serializer {
serializer.serialize_str(self.to_string().as_ref())
}
}
ERR-B003: Borrowed references in async commands
Error: implementation of FnOnce is not general enough or lifetime errors in async command signatures.
Cause: Async commands cannot use &str directly due to spawning on the tokio runtime.
Fix: Use owned types (String) or wrap return in Result:
// WRONG
#[tauri::command]
async fn process(value: &str) -> String { value.to_uppercase() }
// CORRECT -- option 1: owned type
#[tauri::command]
async fn process(value: String) -> String { value.to_uppercase() }
// CORRECT -- option 2: wrap in Result
#[tauri::command]
async fn process(value: &str) -> Result { Ok(value.to_uppercase()) }
ERR-B004: Multiple invoke_handler calls
Error: Commands silently not working -- no compilation error.
Cause: Only the LAST .invoke_handler() call on Builder takes effect. Multiple calls do NOT merge.
Fix: ALWAYS use a single generate_handler![] with all commands:
// WRONG -- only cmd2 works
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![cmd1])
.invoke_handler(tauri::generate_handler![cmd2])
// CORRECT
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![cmd1, cmd2])
ERR-B005: Mobile crate-type missing
Error: cannot produce cdylib for app_lib or linking errors on tauri android build / tauri ios build.
Cause: Cargo.toml missing required crate types for mobile targets.
Fix: ALWAYS include all three crate types when targeting mobile:
[lib]
name = "app_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
ERR-B006: Missing mobile entry point
Error: App crashes immediately on mobile, or tauri android build / tauri ios build fails with missing symbol errors.
Cause: Missing #[cfg_attr(mobile, tauri::mobile_entry_point)] macro or incorrect project structure.
Fix: ALWAYS split into lib.rs + main.rs for mobile support:
// src-tauri/src/lib.rs
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.invoke_handler(tauri::generate_handler![])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
// src-tauri/src/main.rs
fn main() {
app_lib::run();
}
Error Lookup Table: Linux Dependencies
ERR-B010: Missing webkit2gtk
Error: Package webkit2gtk-4.1 was not found or error: could not find system library 'webkit2gtk-4.1'
Fix: Install required system dependencies:
# Ubuntu/Debian
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf
# Fedora
sudo dnf install webkit2gtk4.1-devel libappindicator-gtk3-devel librsvg2-devel
# Arch
sudo pacman -S webkit2gtk-4.1 libappindicator-gtk3 librsvg
NEVER install libwebkit2gtk-4.0-dev -- Tauri 2 requires the 4.1 variant.
ERR-B011: Missing build tools
Error: linker cc not found or failed to run custom build command
Fix: Install base build tools:
sudo apt-get install -y build-essential curl wget file libssl-dev libgtk-3-dev \
libayatana-appindicator3-dev
Error Lookup Table: Bundler Errors
ERR-B020: NSIS installer failure (Windows)
Error: NSIS Error or MakeNSIS exited with error
Common causes and fixes:
- Path too long -- shorten
productNameor move project closer to drive root - Missing NSIS -- install via
choco install nsisorwinget install NSIS.NSIS - Icon format wrong -- NSIS requires
.icofiles with specific sizes
ERR-B021: WiX/MSI failure (Windows)
Error: candle.exe exited with error or light.exe exited with error
Fix: Install WiX Toolset v3: dotnet tool install --global wix
ERR-B022: DMG creation failure (macOS)
Error: hdiutil: create failed or DMG size errors
Common causes: Disk space insufficient, or icon file path incorrect in tauri.conf.json.
ERR-B023: AppImage failure (Linux)
Error: AppImage bundling failed or missing appimagetool
Fix: Ensure FUSE is available. On Ubuntu 22.04+:
sudo apt-get install -y libfuse2
ERR-B024: WebView2 bootstrapper (Windows)
Error: Failed to download WebView2 bootstrapper
Fix: Configure offline installation in tauri.conf.json:
{
"bundle": {
"windows": {
"webviewInstallMode": "offlineInstaller"
}
}
}
Error Lookup Table: Code Signing
ERR-B030: macOS unsigned app blocked
Error: "MyApp" is damaged and can't be opened or Gatekeeper rejection.
Fix: At minimum use ad-hoc signing for testing:
{
"bundle": {
"macOS": {
"signingIdentity": "-"
}
}
}
For distribution, ALWAYS use a proper Developer ID certificate.
ERR-B031: macOS notarization failure
Error: The signature of the binary is invalid or notarytool errors.
Checklist:
- Hardened runtime enabled:
"hardenedRuntime": true - Signing identity correct:
"Developer ID Application: Name (TEAMID)" - Environment variables set:
APPLE_API_ISSUER,APPLE_API_KEY,APPLE_API_KEY_PATH - Certificate not expired
ERR-B032: Windows Authenticode failure
Error: SignTool Error or certificate thumbprint not found
Checklist:
- Certificate installed in current user store
- Thumbprint matches:
"certificateThumbprint": "A1B2..." - Timestamp URL reachable:
"timestampUrl": "http://timestamp.comodoca.com"
Error Lookup Table: CI/CD
ERR-B040: GitHub Actions Linux build fails
Error: Various dependency errors in CI.
Fix: ALWAYS include the Linux dependency installation step:
- name: Install Linux dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev
ERR-B041: GitHub token permissions
Error: Resource not accessible by integration or 403 on release creation.
Fix: Set permissions in workflow:
permissions:
contents: write
And ensure repository Settings > Actions > General > Workflow permissions is set to "Read and write."
ERR-B042: Updater artifact build fails
Error: TAURI_SIGNING_PRIVATE_KEY must be set
Cause: "createUpdaterArtifacts": true in config but no signing key.
Fix: Either set the environment variable in CI secrets, or set "createUpdaterArtifacts": false if not using auto-updater.
ERR-B043: Cross-compilation target missing
Error: error[E0463]: can't find crate for std when building for a different architecture.
Fix: Install the target toolchain:
# macOS universal binary
rustup target add aarch64-apple-darwin x86_64-apple-darwin
# Android
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
# iOS
rustup target add aarch64-apple-ios x86_64-apple-ios aarch64-apple-ios-sim
Diagnostic Decision Tree
Build failed?
|
+-- Is it a Rust compilation error?
| +-- Type mismatch in command? --> Check ERR-B001, ERR-B002, ERR-B003
| +-- Symbol/linking error? --> Check ERR-B005, ERR-B006, ERR-B043
| +-- Commands not found at runtime? --> Check ERR-B004
|
+-- Is it a system dependency error?
| +-- Linux? --> Check ERR-B010, ERR-B011
| +-- Windows WebView2? --> Check ERR-B024
|
+-- Is it a bundler error?
| +-- Windows NSIS/WiX? --> Check ERR-B020, ERR-B021
| +-- macOS DMG? --> Check ERR-B022
| +-- Linux AppImage? --> Check ERR-B023
|
+-- Is it a code signing error?
| +-- macOS? --> Check ERR-B030, ERR-B031
| +-- Windows? --> Check ERR-B032
|
+-- Is it a CI/CD error?
+-- Linux deps? --> Check ERR-B040
+-- Permissions? --> Check ERR-B041
+-- Updater keys? --> Check ERR-B042
+-- Cross-compile? --> Check ERR-B043
General Troubleshooting Steps
- ALWAYS run
cargo cleaninsrc-tauri/before retrying - ALWAYS check
tauri infooutput for environment diagnostics - ALWAYS verify
tauri.conf.jsonhas valid JSON (use schema validation) - NEVER ignore warnings -- they often become errors in release builds
- NEVER assume a build works on all platforms because it works on one
Reference Links
- [references/methods.md](references/methods.md) -- Build commands, environment variables, configuration keys
- [references/examples.md](references/examples.md) -- Working build configurations and CI/CD templates
- [references/anti-patterns.md](references/anti-patterns.md) -- Build configuration mistakes with fixes
Official Sources
- https://v2.tauri.app/start/prerequisites/
- https://v2.tauri.app/distribute/
- https://v2.tauri.app/develop/debug/
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: Impertio-Studio
- Source: Impertio-Studio/Tauri-2-Claude-Skill-Package
- License: MIT
- Homepage: https://github.com/OpenAEC-Foundation
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet, be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.