Skip to content
This repository was archived by the owner on Aug 24, 2023. It is now read-only.
This repository was archived by the owner on Aug 24, 2023. It is now read-only.

Exception being thrown when using react strict mode #87

Description

@lukasIO

as reported by @merazgasalim in #79

I just upgraded livekit-client to v1.3.1 but still the same problem.

I'm sure it's related to the double useEffect call. I just downloaded the livekit/livekit-react and made the example app in React
Strict Mode so the bug appears

to reproduce the bug just update the App.tsx in example/src like that

import '@livekit/react-components/dist/index.css';
import { HashRouter as Router, Route, Routes } from 'react-router-dom';
import { PreJoinPage } from './PreJoinPage';
import { RoomPage } from './RoomPage';

import React from 'react';

const App = () => {
  return (

  <React.StrictMode>
    <Route path="/room" element={} />
    <Route path="/" element={} />
  </React.StrictMode>
  );
};
export default App;

Here's also the stack Error

Uncaught (in promise) TypeError: _b.reject is not a function at _callee85$ (Room.ts:366:1) at tryCatch (runtime.js:63:1) at Generator.invoke [as _invoke] (runtime.js:294:1) at Generator.next (runtime.js:119:1) at asyncGeneratorStep (asyncToGenerator.js:3:1) at _next (asyncToGenerator.js:25:1) at asyncToGenerator.js:32:1 at new Promise (<anonymous>) at Room.disconnect (asyncToGenerator.js:21:1) at LiveKitRoom.tsx:48:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions