question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

null is not an object (evaluating 'Agora.init')

See original GitHub issue

Hi,

I am using the SDK for react-native (expo) without success, I try to import the react-native-agora library

import React, { Component } from 'react';
import { View, NativeModules, Text, TouchableOpacity, Platform } from 'react-native';
import { RtcEngine, AgoraView } from 'react-native-agora';

const { Agora } = NativeModules;

{Agora} object gives me emptiness

and if I comment that line (const { Agora } = NativeModules;) Agora.init is null


null is not an object (evaluating 'Agora.init')
- node_modules/moment/moment.js:3497:16 in startOf
- node_modules/moment/moment.js:3140:16 in <anonymous>
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:17029:10 in commitLifeCycles
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:20002:23 in commitLayoutEffects
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:307:15 in invokeGuardedCallbackImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:531:36 in invokeGuardedCallback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19768:10 in commitRootImpl
* [native code]:null in commitRootImpl
- node_modules/scheduler/cjs/scheduler.development.js:643:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:19590:4 in commitRoot
* [native code]:null in commitRoot
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18709:28 in runRootCallback
* [native code]:null in runRootCallback
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5642:32 in runWithPriority$argument_1
- node_modules/scheduler/cjs/scheduler.development.js:643:23 in unstable_runWithPriority
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5638:22 in flushSyncCallbackQueueImpl
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:5627:28 in flushSyncCallbackQueue
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:18796:28 in batchedUpdates$1
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2709:30 in batchedUpdates
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2794:17 in batchedUpdates$argument_0
- node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js:2870:28 in receiveTouches
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:436:47 in __callFunction
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:111:26 in __guard$argument_0
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:384:10 in __guard
- node_modules/react-native/Libraries/BatchedBridge/MessageQueue.js:110:17 in __guard$argument_0
* [native code]:null in callFunctionReturnFlushedQueue

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
tonuegbucommented, Mar 6, 2021

@LichKing-2234 Please does this library support expo at the moment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How do I fix: TypeError: null is not an object (evaluating ...
this prefix is a variable in the agora package and the value is coming from native code. It's working in one and not...
Read more >
null is not an object (evaluating 'AgoraRtcChannelModule ...
When i run my app on the ios, i get the error 'TypeError: null is not an object (evaluating 'AgoraRtcChannelModule.prefix')' Can you give...
Read more >
typeerror: null is not an object (evaluating 'agorartcchannelmodule ...
When i run my app on the ios, i get the error 'TypeError: null is not an object (evaluating 'AgoraRtcChannelModule.prefix')' Can you give...
Read more >
TypeError: null is not an object (evaluating 'WebRTCModule ...
I'm building an React-native-app with openvidu, I've already went through the tutorial and even tested the demo, and made some changes to ...
Read more >
I get this typeerror:null is not an object(evaluating scene.props)
An object is expected somewhere and wasn't provided. So, you will get null is not an object error if the DOM elements have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found