#crash in production build

7 messages · Page 1 of 1 (latest)

empty apex
#

I have a tauri command like this:

#[tauri::command]
fn install_apk() -> Result<bool, String> {
  let output = Command::new("adb")
    .args(&["install", "../resources/settings_apk-debug.apk"])
    .output()
    .expect("Failed to install APK");

  if output.status.success() {
    Ok(true)
  } else {
    Ok(false)
  }
}

That command runs perfectly fine in dev. But when in production build it crashes the app and i have no idea why.
Can someone help?

cursive rain
empty apex
#

@cursive rain tried in debug but did not help as it crashed too. Will look at the path thanks

empty apex
#

@cursive rain so i tried with resolve_resource and it still crashed.
If that s of any help here is the crash log on macos

cursive rain
#

Does it print any error if you execute it in the cli?

empty apex
#

@cursive rain it works when run from the command line!
To be clear, i build in production:

  • open the app with the .app run the tauri command => crash
  • run from the command line GPS Mocker.app/Contents/MacOS/GPS Mocker, run the tauri command => success
cursive rain
#

hmm, that's a bit annoying. What about open GPS Mocker.app or whatever the command was to start the whole .app dir (trying to simulate a "normal" app start)