surrealdb / surrealdb.js

SurrealDB SDK for JavaScript
https://surrealdb.com
Apache License 2.0
301 stars 48 forks source link

Bug : Surrealdb Websocket + React native #322

Open yassinrais opened 3 months ago

yassinrais commented 3 months ago

Describe the bug

When attempting to establish an initial connection to SurrealDB using a WebSocket URL, the connection fails silently. No connection is established, and no error is thrown or reported. The application appears unresponsive with regards to the database connection attempt

Steps to reproduce

Establish a connection to SurrealDB using a WebSocket URL

import { Surreal } from 'surrealdb.js';

const db = new Surreal();

try {
  await db.connect('ws://localhost:8000/rpc');
} catch (error) {
  console.error('Connection error:', error);
}

Expected behaviour

  1. Successful Connection: The application should establish a connection to the SurrealDB instance..
  2. Error Handling: If the connection fails, an error should be thrown or returned instead of nothing...

SurrealDB version

1.5.4 for macos on aarch64

JavaScript SDK version

0.0.1-beta.4

Contact Details

No response

Is there an existing issue for this?

Code of Conduct

triracle97 commented 3 months ago

This one relates to my issue surrealdb/surrealdb#3987