Skip to content

fix: isolate upload callbacks and always release subscriptions - #146

Closed
OskarEichler wants to merge 1 commit into
birdofpreyru:masterfrom
OskarEichler:codex/rnfs-upload-js
Closed

fix: isolate upload callbacks and always release subscriptions#146
OskarEichler wants to merge 1 commit into
birdofpreyru:masterfrom
OskarEichler:codex/rnfs-upload-js

Conversation

@OskarEichler

@OskarEichler OskarEichler commented Aug 27, 2026

Copy link
Copy Markdown

Fixes

Filter current and deprecated upload callbacks by jobId; clean up on native rejection, synchronous native failure and partial listener registration; normalize file:// upload paths without mutating caller objects; retain response data for non-standard HTTP errors.

Compatibility / breaking changes

No TypeScript signature changes. Upload callbacks no longer receive other jobs. Native setup failures now reject the returned promise instead of escaping synchronously. Unknown HTTP status errors retain error.result and use an HTTP fallback message.

Verification

Actual transpiled entrypoint with event/native doubles: concurrent and deprecated callbacks, rejection, setup/registration failures, invalid files, frozen file URI options, and HTTP 500/599. Baseline cross-job calls/leaks and missing HTTP599 response reproduce; fixed cases pass.

Shared verification

yarn test (ESLint + TypeScript), yarn prepare (module/declarations), and git diff --check pass for the combined review checkout. React Doctor reports 100/100 for the changed JS scope. Native checks are described above; no physical-device, signed-release or production verification is claimed. No checked-in test/spec files were changed. Isolated diagnostics were run outside the repository. Consumer verification at immutable combined pin eb4ee67 (RN 0.87.1): immutable install and lint, both Android Debug flavors, both iOS Simulator Debug schemes, four release-mode Metro bundles, 13 production web builds and four browser-extension builds pass. All 72 installed non-metadata files match reviewed source/rebuilt artifacts. Windows SDK/runtime remains unverified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants