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(adb): UAD-ng doesn't start when ADB isn't installed #220

Closed
AnonymousWP opened this issue Feb 7, 2024 · 4 comments · Fixed by #343
Closed

bug(adb): UAD-ng doesn't start when ADB isn't installed #220

AnonymousWP opened this issue Feb 7, 2024 · 4 comments · Fixed by #343
Labels
bug Something isn't working

Comments

@AnonymousWP
Copy link
Member

Describe the bug

When ADB is absent on a system, UAD-ng doesn't start at all. It also doesn't tell me ADB isn't installed.

Expected behavior

I expect UAD-ng to start and inform me that ADB is required but isn't present/installed.

You have a solution?

Implement a check when starting UAD-ng.

UAD-ng log

2024-02-07 10:21:35 ERROR [src\core\config.rs:79] Failed to read config file: System cannot find the specified file. (os error 2)
2024-02-07 10:21:35 ERROR [src\core\config.rs:81] Restoring default config file
2024-02-07 10:21:35 ERROR [src\core\sync.rs:72] ADB: program not found
2024-02-07 10:21:35 ERROR [src\core\sync.rs:73] ADB was not found
2024-02-07 10:21:59 ERROR [src\core\sync.rs:72] ADB: program not found
2024-02-07 10:21:59 ERROR [src\core\sync.rs:73] ADB was not found
2024-02-07 10:22:31 ERROR [src\core\sync.rs:72] ADB: program not found
2024-02-07 10:22:31 ERROR [src\core\sync.rs:73] ADB was not found

@AnonymousWP AnonymousWP added the bug Something isn't working label Feb 7, 2024
@AnonymousWP AnonymousWP added this to the v1.0.1 release milestone Feb 7, 2024
@Frigyes06
Copy link
Member

see #198

@AnonymousWP
Copy link
Member Author

see #198

Yeah but my point is that we need something more verbose.

@AnonymousWP
Copy link
Member Author

It's not just about being verbose. UAD-ng just doesn't start at all and the user is not notified by it, unless the user checks logs. That's a very user-unfriendly way.

@AnonymousWP
Copy link
Member Author

Would something like this work?

match command.output() {
    Err(e) => {
        // Log the error for debugging purposes
        error!("ADB: {}", e);
        error!("ADB was not found");

        // Display error message to the user using a message box
        message_box(None, "Error", "ADB was not found. Please make sure ADB is installed and accessible.", MessageBoxButtons::Ok, MessageBoxIcon::Error);

        // Exit the program
        std::process::exit(1);
    }
    // Handle Ok arm here if needed
}

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