bug: solve autoUpdater network errors
I was browsing through countly for errors with ipfs-desktop, I searched for errors that have impacted at least 100 users occurring since the beginning of the year (from 2023-01-01 to 2023-02-04 (today)) and got the following output:
| _id | error | is_new | is_resolved | lastTs | latest_version | name | nonfatal | not_os_specific | os | reports | users | session_count | session_max | session_min | session_total | javascript |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| bd50650212b263b83192daab491abbdc7142e342 | [updater] Error: net::ERR_NETWORK_IO_SUSPENDED | TRUE | FALSE | 1675530408 | 0.0 | [updater] Error: net::ERR_NETWORK_IO_SUSPENDED | TRUE | TRUE | Windows_NT | 2610 | 473 | 1305 | 755 | 1 | 10087 | TRUE |
| d69cd40909b2b631885757f09603c26194aef916 | [updater] Error: net::ERR_NETWORK_CHANGED | TRUE | FALSE | 1675523500 | 0.0 | [updater] Error: net::ERR_NETWORK_CHANGED | TRUE | TRUE | Windows_NT | 1936 | 482 | 821 | 456 | 1 | 12483 | TRUE |
| f0f8891b3e2aa1a1ab5f8924a1922b710418af07 | FetchError: request to http://127.0.0.1:5001/api/v0/id failed, reason: net::ERR_NETWORK_CHANGED at ClientRequest. |
TRUE | FALSE | 1675522397 | 0.0 | FetchError: request to http://127.0.0.1:5001/api/v0/id failed, reason: net::ERR_NETWORK_CHANGED | TRUE | TRUE | Windows_NT | 1735 | 180 | 1257 | 160 | 1 | 8816 | TRUE |
| ef9754948e3c28f0051618bf3af4494b62daf1ad | go-ipfs version: 0.7.0 Repo version: 10 System version: amd64/windows Golang version: go1.14.4 | TRUE | FALSE | 1675509530 | 0.0 | Error: Initializing daemon... | TRUE | TRUE | Windows_NT | 1391 | 386 | 307 | 553 | 1 | 3923 | TRUE |
| 1da0920d591f40abe98a3d4bdb7121700ddb2a4b | [updater] Error: net::ERR_NAME_NOT_RESOLVED | TRUE | FALSE | 1675490995 | 0.0 | [updater] Error: net::ERR_NAME_NOT_RESOLVED | TRUE | TRUE | Windows_NT | 2378 | 877 | 885 | 637 | 1 | 14969 | TRUE |
| 72c08ab879452fd9064c433f47e06530a813264d | [updater] Error: net::ERR_INTERNET_DISCONNECTED | TRUE | FALSE | 1675457974 | 0.0 | [updater] Error: net::ERR_INTERNET_DISCONNECTED | TRUE | TRUE | Darwin | 1822 | 501 | 735 | 397 | 1 | 12089 | TRUE |
| 7d6abf56bb7fdff6d162afcd6088d3869900deb0 | [updater] Error: net::ERR_CONNECTION_RESET | TRUE | FALSE | 1675197270 | 0.0 | [updater] Error: net::ERR_CONNECTION_RESET | TRUE | TRUE | Darwin | 539 | 140 | 142 | 730 | 1 | 3476 | TRUE |
| 019554576dd54512cadc328567acd9f20698d9e9 | SyntaxError: Unexpected end of JSON input at JSON.parse ( |
TRUE | FALSE | 1673327800 | 0.0 | SyntaxError: Unexpected end of JSON input | TRUE | TRUE | Windows_NT | 194 | 129 | 7 | 25 | 1 | 43 | TRUE |
We can "ignore" two of those:
- snap installs (no longer supported)
- Extremely out-of-date go-ipfs version (0.7.0)
And I believe all of the rest (except for one) are errors with the internet/network during the auto-updater process.
We should implement something similar to https://github.com/electron-userland/electron-builder/issues/2398#issuecomment-413117520 to handle the electron-updater failures.
Don't know how to do these things
I think the main action item here is to stop emitting errors that are normal IPFS network errors, or are normal laptop user networking errors, to our metrics server.