react-native-vlc-media-player icon indicating copy to clipboard operation
react-native-vlc-media-player copied to clipboard

Not able to stream RTSP on IOS. EXC_BAD_ACCESS when run

Open CVHOANG-coder opened this issue 1 year ago • 18 comments

I am trying to live stream using RTSP, the url is wokring fine in the actual media player but it's not working and show error: EXC_BAD_ACCESS when trying to stream it using VLCPlayer. Both simulator and real device

image

CVHOANG-coder avatar Jun 24 '24 04:06 CVHOANG-coder

any solution ?

gustavo-bonfim avatar Jul 08 '24 17:07 gustavo-bonfim

I faced this issue building in an Mac M1. The app crashes on simulator but works fine in real device. The temporary solution for me was building with different arch using: yarn ios --simulator "iPhone 15" --destination arch=x86_64

gustavo-bonfim avatar Jul 09 '24 19:07 gustavo-bonfim

I'm facing this error as well, is there any more solutions to it?

maddisonbruckelmyer01 avatar Jul 31 '24 15:07 maddisonbruckelmyer01

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

CVHOANG-coder avatar Aug 01 '24 06:08 CVHOANG-coder

That doesn't seem to work for me

maddisonbruckelmyer01 avatar Aug 01 '24 23:08 maddisonbruckelmyer01

I faced this issue building in an Mac M1. The app crashes on simulator but works fine in real device. The temporary solution for me was building with different arch using: yarn ios --simulator "iPhone 15" --destination arch=x86_64

npx react-native run-ios --simulator="iPhone 15 Pro" --destination arch=x86_64 that's work for me to thx

hakanakin avatar Aug 14 '24 02:08 hakanakin

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

Thank, I used it and it stopped crashing

tunm1228 avatar Aug 15 '24 09:08 tunm1228

valid url : encodeURI(),

where to do this??

roshansinghg avatar Aug 16 '24 06:08 roshansinghg

encodeURIComponent

If your account or password contains special characters, use encodeURIComponent

tunm1228 avatar Aug 16 '24 06:08 tunm1228

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

I am just getting rtmp live streaming link from backend like uri: "rtmp://a704d90f9059140b6aa1bc1e9a918f45-1788519902.ap-south-1.elb.amazonaws.com:1935/live/4db23812-6918-49ef-80ee-d02e64d6a6fb", working fine for iOS 17.2 and lower but crashing above that.

roshansinghg avatar Aug 16 '24 06:08 roshansinghg

replace special symbol in url path. Example '@' to '%40'. valid url : encodeURI(), encodeURIComponent(). I fix it

I am just getting rtmp live streaming link from backend like uri: "rtmp://a704d90f9059140b6aa1bc1e9a918f45-1788519902.ap-south-1.elb.amazonaws.com:1935/live/4db23812-6918-49ef-80ee-d02e64d6a6fb", working fine for iOS 17.2 and lower but crashing above that.

Your path has no special characters, so this is not the case I encountered.Please learn more.

tunm1228 avatar Aug 16 '24 06:08 tunm1228

I'm facing the same problem. Enconding the URL as @tunm1228 sugested did not work for me. The app stops crashing but the player is not able to play the video. My RTSP camera stream URL is "rtsp://admin:[email protected]:554/Streaming/channels/101".

I've created a sample repository with the problem occurring: https://github.com/diegods-ferreira/react-native-vlc-media-player-ios-crashing

diegods-ferreira avatar Aug 19 '24 15:08 diegods-ferreira

I'm trying to stream HLS and I get the same crash.

fredrikburmester avatar Aug 20 '24 17:08 fredrikburmester

Hey, if you’re using <TouchableWithoutFeedback></TouchableWithoutFeedback> and your app crashes, you should replace it with a different option.

hakanakin avatar Aug 27 '24 01:08 hakanakin

I can say that I'm not using TouchableWithoutFeedback and it is still crashing for me.

fredrikburmester avatar Aug 27 '24 06:08 fredrikburmester

I was able to solve my problem with RTSP streaming. It turns out I had to request for Apple's Multicast Networking Entitlement permission so my app could stream. Apparently this had been going since iOS 17 and I just now realised. But once I got permission for multicast networking my app stopped crashing.

For anyone who wants to know how to request this permission, here it is: https://forums.developer.apple.com/forums/thread/663271?answerId=639455022#639455022

diegods-ferreira avatar Aug 29 '24 13:08 diegods-ferreira

I am trying to play a live video with an .FLV file, but it also encounters the same error as mentioned above. I have tried the solutions above, but none of them worked. I am using React Native 0.72.14.

chienvuvan99 avatar Sep 05 '24 08:09 chienvuvan99

@chienvuvan99 I did not try using this lib for .flv files so I wouldn't know if it would work for them, I'm sorry. As I said, my solution solved my problem with RTSP streaming =/

diegods-ferreira avatar Sep 07 '24 22:09 diegods-ferreira

This issue is stale because it has been open for 60 days with no activity.

github-actions[bot] avatar Nov 07 '24 02:11 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Nov 21 '24 02:11 github-actions[bot]