me-web? 0.4: no network failure takes the app down; mobile data read right; the route on the path
- Every network call returns a result whatever fails, not only the exceptions .NET usually throws: on Android the HTTPS client is the platform's own stack, and a network switch mid-request throws others. The outside test as a whole cannot throw; sharing the link falls back to copying it. A last guard (the UI thread, unobserved tasks, Android's raiser) writes errors.log in the app folder and keeps the app running; nothing is sent. - On mobile data the app no longer probes the operator's gateway as if it were a home router: the router card says there is none, a private address on the phone with another public one is the operator's address sharing (CGNAT) and is drawn as its shared exit, the public IPv4 is held by that exit, and the provider's notes are labelled as being about its home lines. These were "router not answering" and "can't tell" on an Iliad phone. - The route's routers appear as stops on the path's wires: the operator's internal ones before its exit, the public ones with their network number towards the internet. - The download speed is timed after the first quarter of the sample, once the connection has ramped up; the path no longer shows the address block's registry country. - Two new strings, drafted in every language. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012CzABvBkbcFqoHdmi8b9WB
This commit is contained in:
1 parent
4b4b37ad8e
commit
20f8b2149f
131 files changed
+416
-37
No files matched your search
@@ -0,0 +1,50 @@
|
||||
using Avalonia.Threading;
|
||||
|
||||
using MeWeb.Shared;
|
||||
|
||||
namespace MeWeb.App.Services;
|
||||
|
||||
public static class ErrorLog
|
||||
{
|
||||
const long MaxBytes = 256 * 1024;
|
||||
static readonly string FilePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "MeWeb", "errors.log");
|
||||
static readonly Lock Gate = new();
|
||||
|
||||
public static void Watch()
|
||||
{
|
||||
Dispatcher.UIThread.UnhandledException += OnDispatcher;
|
||||
TaskScheduler.UnobservedTaskException += OnUnobserved;
|
||||
AppDomain.CurrentDomain.UnhandledException += OnDomain;
|
||||
}
|
||||
|
||||
public static void Write(Exception error)
|
||||
{
|
||||
if (error is null) return;
|
||||
lock (Gate)
|
||||
{
|
||||
try
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(FilePath));
|
||||
if (File.Exists(FilePath) && new FileInfo(FilePath).Length > MaxBytes) File.Delete(FilePath);
|
||||
File.AppendAllText(FilePath, $"{DateTimeOffset.UtcNow:O} me-web? {BuildInfo.Version}{Environment.NewLine}{error}{Environment.NewLine}{Environment.NewLine}");
|
||||
}
|
||||
catch (Exception ex) when (ex is IOException or UnauthorizedAccessException)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void OnDispatcher(object sender, DispatcherUnhandledExceptionEventArgs e)
|
||||
{
|
||||
Write(e.Exception);
|
||||
e.Handled = true;
|
||||
}
|
||||
|
||||
static void OnUnobserved(object sender, UnobservedTaskExceptionEventArgs e)
|
||||
{
|
||||
Write(e.Exception);
|
||||
e.SetObserved();
|
||||
}
|
||||
|
||||
static void OnDomain(object sender, UnhandledExceptionEventArgs e) => Write(e.ExceptionObject as Exception);
|
||||
}
|
||||
Reference in new issue
Block a user