0xced / XCDYouTubeKit

YouTube video player for iOS, tvOS and macOS
MIT License
2.93k stars 626 forks source link

Error with some (many) videos: XCDYouTubeVideoErrorDomain Code=-2 #523

Open two4teacompany opened 3 years ago

two4teacompany commented 3 years ago

I'm on the latest version of the pod (v2.15.2), but on many videos actually I get the following error: "XCDYouTubeVideoErrorDomain Code=-2". Is there any solution for this, I have not been able to find anything recent enough on the forum.

Thanks.

ekincelik commented 3 years ago

I have the same problem. Could you please take a look ? @SoneeJohn

Domain: XCDYouTubeVideoErrorDomain
Code:   -2
User Info: {
    NSLocalizedDescription = "Video unavailable";
    NSURL = "https://www.youtube.com/get_video_info?el=embedded&hl=en&ps=default&video_id=6swmTBVI83k";
}
Domain: XCDYouTubeVideoErrorDomain
Code:   -2
User Info: {
    NSLocalizedDescription = "Video unavailable";
    NSURL = "https://www.youtube.com/get_video_info?el=embedded&hl=en&ps=default&video_id=cii6ruuycQA";
}
sixty8 commented 3 years ago

Any news? Is the XCDYouTubeKit obsolete?

[XCDYouTubeKit] Video operation finished with error: The operation couldn’t be completed. (XCDYouTubeVideoErrorDomain error -2.) Domain: XCDYouTubeVideoErrorDomain Code: -2 User Info: { }

s3ton commented 3 years ago

Any news? Is the XCDYouTubeKit obsolete?

[XCDYouTubeKit] Video operation finished with error: The operation couldn’t be completed. (XCDYouTubeVideoErrorDomain error -2.) Domain: XCDYouTubeVideoErrorDomain Code: -2 User Info: { }

XCDYouTubeKit was working up until few days ago, and I'm sure this will be fixed soon. This is something related to YouTube making changes to cause issues to XCDYouTubeKit and similar code.

Praveen-Balpande commented 3 years ago

I have the same issue, installed latest version 2.15.2 by Cococpods.

Domain: XCDYouTubeVideoErrorDomain Code: -2

Below Url is not working in Norway country https://www.youtube.com/watch?v=J6R4u8jSkh4

But in India it is working fine on our devices

Praveen-Balpande commented 3 years ago

@SoneeJohn Can you please look in to the issue which we are facing actually we are in app release phase and have to fix or find out some work around about this issue. Please check it.

Domain: XCDYouTubeVideoErrorDomain Code: -2

Below Url is not working in Norway country https://www.youtube.com/watch?v=J6R4u8jSkh4

But in India it is working fine on our devices

biox86 commented 3 years ago

No response in an entire month for a critical bug like this... it feels like this repo is dead unfortunately.

ekincelik commented 3 years ago

hi everyone,

as I can understand, app is not working because consent.youtube.com is coming up everytime, it tries to retrieve youtube content. I created a branch which is working only on device, not on simulator. But you need to login with your gmail address at the first time you open the app.

https://github.com/ekincelik/XCDYouTubeKit/tree/fix/youtube-consent-issue

someziggyman commented 3 years ago

Here's another test link that does not seem to work with Dutch VPN enabled: https://www.youtube.com/watch?v=zT_zEAVFrNo

and it looks like @ekincelik is right about some sort of a ""pop up" road blocking the process.

[XCDYouTubeKit] Video operation finished with error: Video unavailable Domain: XCDYouTubeVideoErrorDomain Code: -2 User Info: { NSLocalizedDescription = "Video unavailable"; NSURL = "https://www.youtube.com/get_video_info?el=embedded&hl=en&ps=default&video_id=zT_zEAVFrNo"; } Maybe downloading that get_video_info file might bee helpful...

Praveen-Balpande commented 3 years ago

@ekincelik Still it is not working with some urls and giving me error with reason string "Video unavailable". Please check it.

Domain: XCDYouTubeVideoErrorDomain Code: -2

Below Url is not working https://www.youtube.com/watch?v=J6R4u8jSkh4

devbest555 commented 3 years ago

live videoIDs : hartiIFC1s4, azl07ua79pa can everybody test these videos in your side using XDCYouTubeVideoKit?