Skip to content

picker.saveDocuments fails on iOS and Android with Expo (build) after "save" click #855

@clanth

Description

@clanth

I have searched open and closed issues for this issue.

  • I have searched open and closed issues.

I have read and understood the license (link below).

  • I have read and understood the license.

Minimal reproducible example

See App.tsx attached

What platform(s) does this occur on?

iOS

Did you reproduce on a real device or emulator / simulator?

emulator / simulator

Steps to reproduce

saveDocuments opens a dialog, provides the UI and file name as expected, and on click "save"/"move" it fails.
Expo Go isn't used.

On iOS (18,5) emulator saveDocuments fails with the provided error.
On Android (SDK 36) saveDocuments creates an empty file and fails with no error or feedback provided.

See App.tsx:

import RNFS from "react-native-fs";
import { saveDocuments } from "@react-native-documents/picker";
...
const tempPath = RNFS.TemporaryDirectoryPath.replace(/\/$/, "") + "/test.csv";
await RNFS.writeFile(tempPath, "test,data\n", "utf8"); 

await saveDocuments({
     sourceUris: [tempPath],
     fileName: "test.csv",
     mimeType: "text/csv",
   }); // <-- exception raises on iOS
console.log(`saveDocuments::done`); // <-- never caller on Android

Short env info:

   "react": "19.0.0",
   "react-native": "0.79.6",
   "expo": "53.0.22",
   "react-native-documents/picker": "10.1.5"

If the issue is related to specific file(s), I have linked the files so that others can reproduce exactly what I see.

  • I have attached files necessary to reproduce the problem (if applicable).

Stacktrace of the crash (if applicable)

[PlugInKit] [u 26E89BC6-CDB0-4E84-B413-2FA131A04605:m (null)]
[com.apple.DocumentManagerUICore.Service(1.0)] Connection to plugin interrupted while
in use.
[DocumentManager] The view service did terminate with error: Error
Domain=_UIViewServiceInterfaceErrorDomain Code=3 "(null)" UserInfo={Message=Service
Connection Interrupted}

Your computer environment

System:
  OS: macOS 15.6
  CPU: (8) arm64 Apple M2
  Memory: 174.23 MB / 24.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 23.11.0
    path: /opt/homebrew/bin/node
  Yarn: Not Found
  npm:
    version: 11.4.2
    path: /opt/homebrew/bin/npm
  Watchman:
    version: 2025.05.19.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.16.2
    path: /opt/homebrew/bin/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 24.5
      - iOS 18.5
      - macOS 15.5
      - tvOS 18.5
      - visionOS 2.5
      - watchOS 11.5
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.3 AI-243.25659.59.2432.13423653
  Xcode:
    version: 16.4/16F6
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.15
    path: /opt/homebrew/opt/openjdk@17/bin/javac
  Ruby:
    version: 2.6.10
    path: /usr/bin/ruby
npmPackages:
  "@react-native-community/cli":
    installed: 20.0.0
    wanted: latest
  react:
    installed: 19.0.0
    wanted: 19.0.0
  react-native:
    installed: 0.79.6
    wanted: 0.79.6
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: true
iOS:
  hermesEnabled: true
  newArchEnabled: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions