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

fix(cli): Log errors when adb command fails #3493

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

Plebshot
Copy link
Contributor

@Plebshot Plebshot commented Jan 4, 2025

As described in #3436, not having adb in the path (or having other problems with adb) fails silently.

The problem here is that the two adb commands for installing and starting the app are done on a new tokio background task without logging the result. Errors are propagated to the tasks handle, but the handle is detached and therefore never checked.

I wasn't sure what the best way to handle detached errors in the CLI is, so I went with simply logging errors instead of propagating them. Some open questions remain:

  • Should we explicitly add adb as requirement in the docs for the mobile docs?
  • Should we check for system dependencies beforehand for clearer error messages?

Fixes #3436

Copy link
Member

@jkelleyrtp jkelleyrtp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

Eventually we should attach this task to a task pool or something that propagates a failure out, but the logging error is fine for now.

@jkelleyrtp jkelleyrtp merged commit ea8fd16 into DioxusLabs:main Jan 7, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Android build doesn't fail when adb missing from path
2 participants