You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4565788
Browse filesBrowse the repository at this point in the historyBrowse files
- Android: Re-throw CancellationException in 3 Flow-collection coroutines (listenForProgress, listenForEvents, observeWorkCompletion) so structured concurrency propagates correctly
- Android: HttpDownloadWorker no longer deletes temp file on network error; partial download is preserved so next retry can use Range header to resume
- Android: ImageProcessWorker uses maxOf(1, min(...)) — prevents sampleSize=0 when one dimension already fits, avoids ambiguous min() import
- iOS: CryptoWorker validates file size before Data(contentsOf:) to prevent OOM on large files; uses SecRandomCopyBytes for random salt instead of hardcoded string
- Integration tests: Add GROUP 9 — DartWorker constraint & delay enforcement, reproducing and verifying fix for issue #1
Copy file name to clipboardExpand all lines: CHANGELOG.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -80,9 +80,28 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
80
80
81
81
-**Example app: Stale version strings** — updated to v1.0.5
82
82
83
+
-**Android: `CancellationException` silently swallowed in Flow-collection coroutines** (`NativeWorkmanagerPlugin.kt`)
84
+
-**Root cause:** Three `catch (e: Exception)` blocks in `listenForProgress`, `listenForEvents`, and `observeWorkCompletion` caught `kotlinx.coroutines.CancellationException` (a subtype of `Exception`), preventing structured concurrency from propagating coroutine cancellation
85
+
-**Impact:** Coroutines leaked when the Flutter plugin was detached (e.g., hot reload, app restart); could cause event-sink callbacks after disposal
86
+
-**Fix:** Added `catch (e: kotlinx.coroutines.CancellationException) { throw e }` before the generic `catch (e: Exception)` block in all three locations
-**Root cause:** The `catch (e: Exception)` block unconditionally called `tempFile.delete()`, destroying the partial download that resume logic depends on
90
+
-**Impact:** Resume downloads (`enableResume = true`) always restarted from byte 0 on any network error, wasting bandwidth
91
+
-**Fix:** Removed the unconditional temp-file deletion; the file is now preserved so the next retry can use the `Range: bytes=N-` header to resume
92
+
93
+
-**iOS: `CryptoWorker` loads arbitrarily large files into RAM before size check** (`CryptoWorker.swift`)
94
+
-**Root cause:**`Data(contentsOf: inputURL)` was called before `SecurityValidator.validateFileSize()`, so large files caused an OOM crash rather than a clean error
95
+
-**Fix:** Moved `validateFileSize()` guard to run before reading the file; added random salt generation (`SecRandomCopyBytes`) replacing the hardcoded string salt, improving encryption security
96
+
97
+
-**Android: `ImageProcessWorker` uses `min()` without explicit import** (`ImageProcessWorker.kt`)
98
+
-**Root cause:**`min(widthRatio, heightRatio)` without an explicit `import kotlin.math.min` could resolve to `java.lang.Math.min` in some Kotlin compiler configurations, producing a compile warning or error
99
+
-**Fix:** Changed to `maxOf(1, min(widthRatio, heightRatio))` using Kotlin's built-in `maxOf`; the `max(1, …)` also prevents `sampleSize = 0` when one image dimension already fits within the requested bounds
100
+
83
101
### Added
84
102
-**Device integration test suite** (`example/integration_test/device_integration_test.dart`)
85
103
- Covers all trigger types, ExistingPolicy (REPLACE/KEEP), all 11 workers, chains, tags, cancellation, events and progress streams
104
+
-**GROUP 9 — DartWorker constraint & delay enforcement** — reproduces and verifies the fix for issue #1: `requiresNetwork` and `initialDelay` are now correctly applied to the WorkManager `WorkRequest` for all task types
86
105
- Run with: `flutter test integration_test/device_integration_test.dart --timeout=none`
0 commit comments