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 crash on appication from unknown source #723

Merged
merged 2 commits into from
Oct 23, 2023
Merged

Fix crash on appication from unknown source #723

merged 2 commits into from
Oct 23, 2023

Conversation

Programistich
Copy link
Contributor

Background

Now we have crash on install

Changes

Return no updates on unknown source

Test plan

Try to install app from unknown source

@@ -9,7 +9,7 @@ import javax.inject.Inject
@ContributesBinding(AppGraph::class, SelfUpdaterSourceApi::class)
class SelfUpdaterUnknown @Inject constructor() : SelfUpdaterSourceApi {
override suspend fun checkUpdate(manual: Boolean): SelfUpdateResult {
throw NotImplementedError()
Copy link
Member

Choose a reason for hiding this comment

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

What about try catch in SelfUpdaterApiImpl#startCheckUpdate?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sense

@@ -29,6 +29,9 @@ class SelfUpdaterApiImpl @Inject constructor(
}
return try {
selfUpdaterSourceApi.checkUpdate(manual = manual)
} catch (e: Exception) {
info { "Self update error: $e" }
Copy link
Member

Choose a reason for hiding this comment

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

NIT: In this case you should use error logger

@LionZXY LionZXY added this pull request to the merge queue Oct 23, 2023
Merged via the queue into flipperdevices:dev with commit 6c8f194 Oct 23, 2023
5 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.

2 participants