GooseMod / OpenAsar

Open-source alternative of Discord desktop's app.asar
https://openasar.dev
GNU Affero General Public License v3.0
2.54k stars 67 forks source link

[AsarUpdate] Improve error response resilience #112

Closed DeGamersSpelen closed 1 year ago

DeGamersSpelen commented 2 years ago

I restarted discord and magically it wouldn't open...

Opened app.asar with notepad++ and saw this:

\<?xml version="1.0" encoding="utf-8"?>\\ServerBusy\\Egress is over the account limit. RequestId:8f153c3c-301e-002f-0cc8-f82fae000000 Time:2022-11-15T08:01:48.3187599Z\\

So OpenAsar replaced my OpenAsar with a xml error because my internet wasn't working.

avail commented 2 years ago

the OpenAsar .asar file gets downloaded from github, it's possible github was having issues. The updater has no error checking, and I think that github itself always returns 200 regardless.

DeGamersSpelen commented 2 years ago

I suggest there should be error checking.

avail commented 2 years ago

https://github.com/GooseMod/OpenAsar/blob/main/src/updater/updater.js#L85 Feel free to add a handler for ServerBusy cases.

CanadaHonk commented 1 year ago

Done in 0b1d4685cb2c94f42441fc616eb24e69eda04647.