From a8e31bb2e881ec69438b3a70493a42c0fab0b89a Mon Sep 17 00:00:00 2001 From: Janez T Date: Mon, 9 Mar 2026 19:59:29 +0100 Subject: [PATCH] Investigate DEVICE_QUERY timeout --- lib/services/packet_capture_storage_service.dart | 7 +++++++ pubspec.lock | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/services/packet_capture_storage_service.dart b/lib/services/packet_capture_storage_service.dart index dd7a68a..61caab5 100644 --- a/lib/services/packet_capture_storage_service.dart +++ b/lib/services/packet_capture_storage_service.dart @@ -61,6 +61,9 @@ class PacketCaptureStorageService { File? _file; Future _resolveFile() async { + if (kIsWeb) { + throw UnsupportedError('Packet capture file storage is not supported on web'); + } if (_file != null) return _file!; final dir = await getApplicationSupportDirectory(); final file = File('${dir.path}/$_fileName'); @@ -73,6 +76,7 @@ class PacketCaptureStorageService { Future appendLogs(List logs) async { if (logs.isEmpty) return; + if (kIsWeb) return; try { final file = await _resolveFile(); final sink = file.openWrite(mode: FileMode.append); @@ -98,6 +102,7 @@ class PacketCaptureStorageService { } Future> loadRecent({int limit = 500}) async { + if (kIsWeb) return const []; try { final file = await _resolveFile(); if (!await file.exists()) return const []; @@ -116,6 +121,7 @@ class PacketCaptureStorageService { } Future count() async { + if (kIsWeb) return 0; try { final file = await _resolveFile(); if (!await file.exists()) return 0; @@ -127,6 +133,7 @@ class PacketCaptureStorageService { } Future clear() async { + if (kIsWeb) return; try { final file = await _resolveFile(); if (await file.exists()) { diff --git a/pubspec.lock b/pubspec.lock index 70d0096..bf11dc1 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -796,7 +796,7 @@ packages: description: path: "." ref: main - resolved-ref: "81a24ca3051d5b3de5dcb0db927b1118ed7de736" + resolved-ref: "84b133069cbf9ce8e261ed13ac3051388f355878" url: "https://github.com/dz0ny/meshcore_client.git" source: git version: "0.1.0"