Closed aldrinc closed 5 years ago
Any of the files on the playlist is local? I see
2019-07-05 13:48:47.105055-0500 AwesomeProject[47205:613908] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[NSURL initFileURLWithPath:]: nil string parameter'
initFileURLWithPath
is called for not network files (when IsNetwork is false, and isAsset is false also)
const isNetwork = !!(uri && uri.match(/^https?:/));
const isAsset = !!(uri && uri.match(/^(assets-library|ipod-library|file|content|ms-appx|ms-appdata):/));
So seems we have the guilty one:
{
name: 'Cap Gun Bottle Opener',
short_description: 'Pop the cap, aim, fire, then just sit back and enjoy your tasty beverage',
woocommerce_id: 7734,
original_url: 'https://shopjustlook.com/product/cap-gun-bottle-opener/',
image_url: 'https://shopjustlook.com/wp-content/uploads/2019/05/NEW-Firing-Cap-Gun-Creative-Flying-Cap-Launcher-Bottle-Beer-Opener.jpg',
video_url: 'ttps://thingd-media-ec5.thefancy.com/video/upload/VEASOON/saleitem/8296324/20190305182744/gunz.mp4',
id: 5d00c67922f9e67a5be003a3
},
notice the video_url
To find errors like this you can filter the playlist to see possible issues:
Assuming data
is the playlist
data.filter((s) => {
const uri = s.video_url;
return !(!!(uri && uri.match(/^https?:/)))
})
If the filter returns and array with length, sth is wrong with that assets.
Bug
I am using react-native-snap-carousel to generate a video feed for a user. Upon application load, I load up 3 "slides" and only mount the video component when the user lands on the slide. Once the user swipes off the video the video is unmounted. This works well until around 7 -9 videos in when the application suddenly crashes. The stack trace shows the RCTVideo setSrc method dispatch action causing the crash.
EDIT: I've isolated the crash to this issue and my understanding is that the application is requesting to load a video multiple times and that the initial request has not been complete before the next request is requested.
https://stackoverflow.com/questions/16073519/nsurlerrordomain-error-code-999-in-ios
Also when I go breakpoint by breakpoint in Xcode I land here:
Additional output even when some videos load.
Environment info
React native info output:
Library version: "react-native-video": "^4.4.2",
Steps To Reproduce
Sample code available below.
SAMPLE DATA
...
Describe what you expected to happen:
Reproducible sample code
https://github.com/aldrinc/react-native-video-example