Skip to content
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

TypeError: this.nativeUtils().setKeepDeviceAwake is not a function (it is undefined) #63

Open
itsmnjn opened this issue Feb 5, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@itsmnjn
Copy link

itsmnjn commented Feb 5, 2025

Expected behavior

The Daily.co React Native SDK (@daily-co/react-native-daily-js) should work with React Native's New Architecture (Fabric) when enabled in Expo SDK 52.

Describe the bug (unexpected behavior)

When using the Daily.co SDK with React Native's New Architecture enabled in Expo 52, calling Daily.createCallObject() and attempting to join a call fails with the following error:

TypeError: this.nativeUtils().setKeepDeviceAwake is not a function (it is undefined)

The call works correctly when New Architecture is disabled, confirming this is specifically a New Architecture compatibility issue.

Steps to reproduce

  1. Create a new Expo 52 project
  2. Enable New Architecture by setting "newArchEnabled": true in app.json
  3. Install and configure @daily-co/react-native-daily-js
  4. Attempt to join a Daily call
  5. Observe the setKeepDeviceAwake error

System information

  • Device: iOS device
  • OS: iOS 18.1.1
  • Framework: Expo SDK 52
  • React Native New Architecture: Enabled
  • @daily-co/react-native-daily-js: [0.70.0]

Additional context

This appears to be a compatibility issue between the Daily.co native modules and React Native's New Architecture (Fabric). The error occurs because the native module bridge is not properly configured for the new architecture, specifically the setKeepDeviceAwake method.

The issue can be temporarily worked around by disabling New Architecture ("newArchEnabled": false), but this isn't a long-term solution as New Architecture is becoming the standard.

Request: Please update the react-native-daily-js library to support React Native's New Architecture.

@itsmnjn itsmnjn added the bug Something isn't working label Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant