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.

My IOS app crashed when joined a channel.

See original GitHub issue

Issue Description

Hi there, I’m developing my React Native app on a MacBook Pro M1. My app was successfully built, and everything worked fine until a user joined a channel, and then my app crashed. Actually, your example is working fine with my MacBook, and the user can join a channel. I followed your setup, but I still don’t know why my app crashed when a user joined a channel. Here is my logic to join a channel when a user accepts a call:

async function setupVoiceSDKEngine() {
        try {
            if (Platform.OS === 'android') {await requestAudioPermission()};

            rtcEngine.current = createAgoraRtcEngine();
            rtcEngine.current.registerEventHandler({
                onJoinChannelSuccess: (_connection, elapsed) => {
                    console.log("Join channel success", _connection);
                    setJoinChannelSuccess(true);
                },
                onUserJoined: (_connection, uid) => {
                    console.log("User joined", uid);
                    setRemoteUsers([uid]);
                },
                onUserOffline: (_connection, uid, reason) => {
                    console.log("User offline", uid, reason);
                    setRemoteUsers([]);
                },
                onError: (err, msg) => {
                    console.log("Join doesn't succed", err, msg);
                },
                onLeaveChannel: (_connection, status) => {
                    console.log("User leaved channel");
                },
            });

            rtcEngine.current.initialize({
                appId
            });

            rtcEngine.current?.enableAudio();

            setLocalAudioTrack(true);
        } catch (e) {
            console.log("Initialize engine", e);
        };
    };
    useEffect(() => {
        const autoJoinChannel = async () => {
            await setupVoiceSDKEngine();
            joinChannel(callToken, channelName, agoraID);
        };
        autoJoinChannel();
  }, []);

My app will work fine if I build app with MacBook chip intel.

Issue Analytics

  • State:open
  • Created a month ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
jafar-jabrcommented, Dec 23, 2022

same here

1reaction
Antonio-Melocommented, Dec 22, 2022

I’m having the same problem

Read more comments on GitHub >

github_iconTop Results From Across the Web

If an app on your iPhone or iPad stops responding, closes ...
If an app on your iPhone or iPad stops responding, closes unexpectedly, or won't open ; Close and reopen the app. Force the...
Read more >
9 Fixes for When Your iPhone Apps Keep Crashing
In this case, try exiting the app completely before relaunching it. Access the App Switcher, swipe to the opened app, and swipe up...
Read more >
How to Fix Crashing Apps on an iPhone or iPad - How-To Geek
If you're experiencing crashing, freezing, or buggy apps, here's how you can fix your problem.
Read more >
What to do when your apps keep crashing - Popular Science
The process for iOS and iPadOS is very similar to the one for Android: Try clearing the data cache, restarting the phone, updating...
Read more >
Network requests make the app crash on real iOS devices in ...
Actual results: On my iPhone 5 with iOS 10.3.4, the app crashes without any crash report. On the stable channel, it does work...
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