Skip to content

Conversation

@taooceros
Copy link
Member

@taooceros taooceros commented Jan 4, 2023

might close #1504

Note:
I am not so sure why the autoupdater may crash flow itself...I guess it is because the Elapsed callback is triggered from the main thread, but I cannot find evidence to support it, because based on document, this happens only when SynchronizingObject is set which is not we have done.

Though, I have suppressed the error of general exception from updater, so now at least it will be safer to use the autoupdater.

@github-actions

This comment has been minimized.

@jjw24
Copy link
Member

jjw24 commented Jan 7, 2023

Done an update test to ensure working as expected?

@jjw24 jjw24 added the bug Something isn't working label Jan 7, 2023
@jjw24 jjw24 added this to the 1.11.1 milestone Jan 7, 2023
@github-actions

This comment has been minimized.

@jjw24
Copy link
Member

jjw24 commented Jan 7, 2023

Can you please fix spelling errors 'Uodate', 'settigns'.

@github-actions
Copy link

github-actions bot commented Jan 7, 2023

@check-spelling-bot Report

🔴 Please review

See the 📂 files view or the 📜action log for details.

Unrecognized words (4)

autoupdater
IPublic
sessionending
Uninstaller

To accept ✔️ these unrecognized words as correct and remove the previously acknowledged and now absent words, run the following commands

... in a clone of the [email protected]:Flow-Launcher/Flow.Launcher.git repository
on the safer_updater branch (ℹ️ how do I use this?):

curl -s -S -L 'https://raw.githubusercontent.com/check-spelling/check-spelling/main/apply.pl' |
perl - 'https://github.com/Flow-Launcher/Flow.Launcher/actions/runs/3862695136/attempts/1'

To have the bot do this for you, reply quoting the following line:
@check-spelling-bot apply updates.

If the flagged items are 🤯 false positives

If items relate to a ...

  • binary file (or some other file you wouldn't want to check at all).

    Please add a file path to the excludes.txt file matching the containing file.

    File paths are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your files.

    ^ refers to the file's path from the root of the repository, so ^README\.md$ would exclude README.md (on whichever branch you're using).

  • well-formed pattern.

    If you can write a pattern that would match it,
    try adding it to the patterns.txt file.

    Patterns are Perl 5 Regular Expressions - you can test yours before committing to verify it will match your lines.

    Note that patterns can't match multiline strings.

@taooceros taooceros linked an issue Jan 8, 2023 that may be closed by this pull request
{
Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
if ((e is HttpRequestException or WebException or SocketException || e.InnerException is TimeoutException))
Log.Exception($"|Updater.UpdateApp|Check your connection and proxy settings to github-cloud.s3.amazonaws.com.", e);
Copy link
Member

Choose a reason for hiding this comment

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

Looking at this, I wonder if we need to notify users when these type of errors occur?

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we did? In the later part when silentupdate is false

Comment on lines +138 to +144
// check update every 5 hours
var timer = new PeriodicTimer(TimeSpan.FromHours(5));
await _updater.UpdateAppAsync(API);

while (await timer.WaitForNextTickAsync())
// check updates on startup
await _updater.UpdateAppAsync(API);
Copy link
Member

Choose a reason for hiding this comment

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

is this a double up of await _updater.UpdateAppAsync(API);? Doesnt it run once timer is instantiated?

@jjw24
Copy link
Member

jjw24 commented Jan 17, 2023

@taooceros have you tested updating with this change?

@taooceros
Copy link
Member Author

@taooceros have you tested updating with this change?

I can't reproduce the original error,but since I only add a try catch case it should be safe.

@jjw24 jjw24 modified the milestones: 1.11.1, 1.12.0 Jan 22, 2023
@jjw24 jjw24 enabled auto-merge January 22, 2023 22:11
@jjw24 jjw24 merged commit 9be71e8 into dev Jan 22, 2023
@jjw24 jjw24 deleted the safer_updater branch January 22, 2023 22:12
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

Development

Successfully merging this pull request may close these issues.

Flow launcher terminates silently BUG: Auto-update throwing exceptions

3 participants