daily-co / react-native-daily-js

https://docs.daily.co/reference/rn-daily-js
BSD 2-Clause "Simplified" License
36 stars 13 forks source link

Missing JavaScript file/folder #49

Closed nsjames closed 8 months ago

nsjames commented 9 months ago

Expected behavior

Able to join or leave rooms.

Describe the bug (unexpected behavior)

I am trying to get Daily to work with a react native Expo project. I downgraded from 50 to 49 in order to get it to work but am facing a strange issue that I cannot track down related to a missing JavaScript file or folder.

Error: ENOENT: no such file or directory, open '/Users/nsjames/code/my-app/JavaScript'
    at Object.readFileSync (node:fs:453:20)
    at getCodeFrame (/Users/nsjames/code/my-app/node_modules/metro/src/Server.js:879:18)
    at Server._symbolicate (/Users/nsjames/code/my-app/node_modules/metro/src/Server.js:962:22)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Server._processRequest (/Users/nsjames/code/my-app/node_modules/metro/src/Server.js:418:7) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: '/Users/nsjames/code/my-app/JavaScript'

It seems that it expects a file to exist there, as when I create it I get this error:

image

Steps to reproduce

I have not attempted to create a small reproduction case as this is a large project that has potential edge cases (such as going from 50 to 49)

My code is simple:

import Daily from '@daily-co/react-native-daily-js';
import {DailyCall} from "@daily-co/react-native-daily-js/type-overrides/@daily-co/daily-js";

export default function DailyStreaming() {
    useEffect(() => {
        const callObject:DailyCall = Daily.createCallObject();
        callObject.load();
        callObject.join(...);
    }, []);

    return null;

}

System information

Package versions:

"expo": "49",
"react-native": "0.72.10",
"@daily-co/config-plugin-rn-daily-js": "^0.0.3",
"@daily-co/react-native-daily-js": "^0.49.0",
"@daily-co/react-native-webrtc": "111.0.0-daily.2",
nsjames commented 9 months ago

It does seem to allow me to join rooms now somehow, but it throws this not long after

image
nsjames commented 9 months ago

Looks like a lot of the problems were caused by callObject.load();

Though I'm still seeing instability while in calls.

filipi87 commented 8 months ago

Hi @nsjames ,

Are you able to reproduce this issue using our Expo demo ? It is currently using Expo 49 as well.

I would also recommend to update to use our latest version of react-native-daily-js, or at least the same version that we are using inside our demo.

In order to use @daily-co/react-native-daily-js": "^0.56.0 you will also need to add these dependencies:

"expo-random": "^13.6.0",
"react-native-get-random-values": "^1.10.0".

After that, I suggest you clean the code, and rebuild it again.Inside the Readme from our demo, we also describes how to execute it locally.

filipi87 commented 8 months ago

We are now supporting Expo 50.

You will need to use the latest version of our @daily-co/config-plugin-rn-daily-js 0.0.4, and the required dependencies. More details here.

You can also check this PR, where we changed our demo app to use Expo 50.