Skip to content

poc: Expo Fetch #591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

poc: Expo Fetch #591

wants to merge 1 commit into from

Conversation

stevensJourney
Copy link
Collaborator

Overview

We currently use react-native-fetch-api in the React Native SDK to perform fetch operations. This is required since the standard React Native fetch implementation does not support HTTP text streaming.

Some users recently reported errors of the form

[PowerSyncStream] Caught exception when uploading. Upload will retry after a delay. Exception: require(_dependencyMap[11], "rea(...)/BlobManager").createFromOptions is not a function (it is undefined)

Which most likely is caused by react-native-fetch-api.

Expo 52 introduced their own implementation for fetch which supports HTTP streaming.

This PR attempts to require and use Expo's fetch implementation (if available) - we default to react-native-fetch-api if Expo >= 52 is not installed.

Copy link

changeset-bot bot commented May 8, 2025

🦋 Changeset detected

Latest commit: 111a306

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@powersync/react-native Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

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.

1 participant