My IOS app crashed when joined a channel.
See original GitHub issueHi 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:
- Created 9 months ago
- Reactions:1
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
same here
I’m having the same problem