Cannot watch age-restricted video
Official Instance
- [ ] The bug is reproducible on the official hosted instance, or is API-related.
Describe the bug
When trying to watch a video that is age restricted it shows "Error code: 152 - 18" and a stacktrace (see below)
Occurred on my own local instances, cannot reproduce on piped.video as that instance does not load any videos/searches right now.
To Reproduce
- Open an age-restricted Video (E.g. eF80xlM1Wsg)
- Notice it not loading but printing an Error Code
Expected behavior
The video to play as the readme says that there is "No age restriction". (Alternatively a human-readable message about playing not being possible right now due to age restrictions, but playing the video would of course be preferred although I assume this is up to newpipe-extractor and the video itself doesn't play in NewPipe either right now :/)
Logs/Errors
org.schabi.newpipe.extractor.exceptions.ContentNotAvailableException: Error code: 152 - 18
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.checkPlayabilityStatus(YoutubeStreamExtractor.java:894)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.fetchHtml5EmbedClient(YoutubeStreamExtractor.java:971)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.fetchHtml5Client(YoutubeStreamExtractor.java:931)
at org.schabi.newpipe.extractor.services.youtube.extractors.YoutubeStreamExtractor.onFetchPage(YoutubeStreamExtractor.java:823)
at org.schabi.newpipe.extractor.Extractor.fetchPage(Extractor.java:60)
at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:77)
at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:72)
at org.schabi.newpipe.extractor.stream.StreamInfo.getInfo(StreamInfo.java:67)
at me.kavin.piped.server.handlers.StreamHandlers.lambda$streamsResponse$0(StreamHandlers.java:54)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.lang.VirtualThread.run(VirtualThread.java:329)
Browser, and OS with Version.
My Piped instance itself is running via Docker, latest image version as of now (sha256:1f38b992ce02a50afddbbf68be1ac11cff6953d36fd8fa2b98c08a19f8ef06e7)
Browser is Firefox 144.0.2 on Pop!_OS 22.04 LTS
Additional context
No response
This problem is impossible to solve without letting a user login to their age verified google account. This issue is in theory solved with the likes of PipePipe, their solution is to use the users google account strictly for content which requires it. However that is an android app and most people do not host their own Piped instance. Implementing this would cause huge security concerns as many would be logging into random instances. Though because this issue is not solvable anymore I do agree that "No age restriction" feature should really not be included on the front page of the github.