appwrite / appwrite/sdk-for-react-native

🐛 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
Dominant language
TypeScript
Stars
4.3k
Forks
36
Avg merge
2h 50m
Merged PRs (30d)
1

Description

### 👟 Reproduction steps

1. Create an Expo SDK 55 application with these dependencies:

```json
{
"expo": "55.0.3",
"expo-file-system": "55.0.9",
"react-native": "0.83.2",
"react-native-appwrite": "0.34.0"
}
```

2. Upload a local file using `Storage.createFile()`.

`react-native-appwrite` imports:

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

Its upload implementation then calls:

```ts
FileSystem.readAsStringAsync(...)
```

A minimal runtime reproduction is:

```ts
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:

```text
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:

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

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

```ts
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:

- https://github.com/appwrite/sdk-for-react-native/issues/1
- https://github.com/appwrite/sdk-for-react-native/issues/45
- https://github.com/appwrite/sdk-for-react-native/issues/54

### 🎲 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

- [x] I checked and didn't find a similar issue.
- [x] I have read the Code of Conduct.

Contributor guide

Open the contributing guide

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.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.