Skip to content

Conversation

JulienLavocat
Copy link
Contributor

@JulienLavocat JulienLavocat commented Jul 15, 2025

Description of Changes

Connection to an instance fails with React Native, this is the error:
[Error: Exception in HostFunction: Expected argument 0 of method "connect" to be a string, but got an object]
This error was caused by React Native implementation of Websocket, in our SDK we use an instance of Url to pass all the parameters like token, compression, etc. but React Native requires this parameter to be a string and not Url | string.

Testing

  • Setup a React Native app if you're brave enough and try to connect to a SpacetimeDB instance

Copy link

changeset-bot bot commented Jul 15, 2025

⚠️ No Changeset found

Latest commit: 7a8f2e7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

Copy link

pkg-pr-new bot commented Jul 15, 2025

Open in StackBlitz

npm i https://pkg.pr.new/@clockworklabs/spacetimedb-sdk@198

commit: 7a8f2e7

@JulienLavocat JulienLavocat requested a review from jsdt July 15, 2025 14:27
@JulienLavocat JulienLavocat merged commit e2f0427 into main Jul 15, 2025
8 checks passed
@JulienLavocat JulienLavocat deleted the fix-react-native branch July 15, 2025 17:15
@JulienLavocat JulienLavocat restored the fix-react-native branch July 21, 2025 11:46
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