AgoraIO-Extensions / agora-rtc-react

Agora RTC React SDK
https://agoraio-extensions.github.io/agora-rtc-react/
MIT License
26 stars 10 forks source link

AgoraRTCReactException: Super constructor null of Sl is not a constructor. #206

Open abu-noman30 opened 1 day ago

abu-noman30 commented 1 day ago

What kind of problem do you need help?

I'm facing an issue with Agora video calling in my production environment. I'm using Agora-RTC-React v2.1.0 and Next.js v14.1.3 for a video calling feature in my app.

The problem occurs only after deployment to production. In my local development environment, everything works perfectly, and video calls run smoothly. However, after deploying to production, the following error shows up in the browser console:

Screenshot 2024-09-18 030437

Since the createCameraVideoTrack function fails due to this error, it is unable to access or create the camera track, leading to the camera not functioning.

abu-noman30 commented 1 day ago

Using Next.js v14.2.12 with agora-rtc-react v2.3.0 resolves the issue. The application runs smoothly in both development and production environments.

At Next.js v14.1.3 which version of agora-rtc-react is applicable?

guoxianzhe commented 9 hours ago

@abu-noman30 you can use agora-rtc-react@2.3.0

abu-noman30 commented 5 hours ago

@guoxianzhe with Next.js v14.1.3 rtc-react v2.1.0 / v2.2.0/ v2.3.0 all producing same error.

guoxianzhe commented 4 hours ago

@abu-noman30 I saw you mentioned that nextjs@14.1.3 works fine in deployment, but not in production. If upgrading to nextjs@14.2.x resolves the issue, I can't think of how reactsdk could help in this situation; it's quite strange. If possible, could you provide a minimal reproduce environment for me?

abu-noman30 commented 2 hours ago

@guoxianzhe how?