🐛 Bug Report: Storage uploads fail on Expo SDK 55 because the SDK imports a removed FileSystem API

Open Beginner friendly
#112 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
react-native, typescript
Domain
mobile-dev

Research direction

Start with the upload implementation used by Storage.createFile() and the package declaration for expo-file-system. Reproduce the failure with Expo SDK 55, verify the existing upload flow against the legacy API, and confirm that a local file can be read and uploaded without requiring an incompatible module version.

Written by the indexing model from the issue text.

Description

👟 Reproduction steps
  1. Create an Expo SDK 55 application with these dependencies:
{
  "expo": "55.0.3",
  "expo-file-system": "55.0.9",
  "react-native": "0.83.2",
  "react-native-appwrite": "0.34.0"
}
  1. Upload a local file using Storage.createFile().

react-native-appwrite imports:

import * as FileSystem from 'expo-file-system'

Its upload implementation then calls:

FileSystem.readAsStringAsync(...)

A minimal runtime reproduction is:

import * as FileSystem from 'expo-file-system'

await FileSystem.readAsStringAsync('file:///path/to/file')
👍 Expected behavior

react-native-appwrite should support the current Expo FileSystem version permitted by its expo: "*" peer dependency, and Storage.createFile() should read and upload the selected file.

The SDK should not require an obsolete second version of an Expo native module.

👎 Actual Behavior

Expo FileSystem 55 keeps readAsStringAsync only under expo-file-system/legacy. Importing it from the top-level module produces this runtime error:

Method readAsStringAsync imported from "expo-file-system" is deprecated.
You can migrate to the new filesystem API using "File" and "Directory"
classes or import the legacy API from "expo-file-system/legacy".

Consequently, native Appwrite Storage uploads cannot read the file.

react-native-appwrite@0.34.0 still declares:

{
  "expo-file-system": "18.*.*"
}

Changing the SDK import to the following fixes the existing upload implementation on Expo SDK 55:

import * as FileSystem from 'expo-file-system/legacy'

Longer-term, the upload implementation could migrate to Expo’s current File API. The package should also declare a supported Expo/FileSystem compatibility range rather than depending directly on version 18 while accepting every Expo version.

Related issues cover the original FileSystem integration and earlier Expo upgrades, but not this SDK 55 API incompatibility:

🎲 Appwrite version

Different version — Appwrite Cloud. The error occurs locally before the upload request reaches Appwrite.

💻 Operating system

MacOS development host; Expo native application targeting iOS.

🧱 Your Environment
  • Expo SDK: 55.0.3

  • Expo FileSystem: 55.0.9

  • React Native: 0.83.2

  • React: 19.2.0

  • React Native Appwrite SDK: 0.34.0

  • Bun: 1.3.1

  • Expo SDK 55 New Architecture

  • I checked and didn't find a similar issue.

  • I have read the Code of Conduct.

Dominant language
TypeScript
Stars
4.3k
Forks
36
Avg merge
8h 20m
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from appwrite/sdk-for-react-native

All issues in appwrite/sdk-for-react-native

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.