Open wisnoskij opened 2 years ago
Hi,
Thank you for your feedback ! I just tested in on my Firefox 98 and it is working. Maybe you are in a region were they are testing a new youtube version. Could you send the log and the HTML source of youtube to allow me to replicate on my computer ? Here is how to: https://www.youtube.com/watch?v=C4fQXRYwbrs&t=66s
The dev one says it is the same version, but is working
Oh, and now it doesn't work. weird. So I got logs for two different videos one that worked and one that did not. But I assume it is not the video and something external like having the inspection tab open or it is just random. But apparently is is like impossible to zip a file in fedora, so I am not sure how I am going to attach them. But if I just keep installing programs I assume one of them will allow me to zip a archive eventually.
Zip, tar, 7z any standard is okay :)
Your zip is perfect I will look into it to search the origin of the issue. Thank you !
From the logs, it seems that the video is not detected as a video (meaning no watch
string in the URL). Could you describe how you start the video ?
Ex:
i
to enter in full playerOh, That is interesting, and might explain why the only time I noticed it working is the one time I was testing and just searched for a Rick Ashly video on google. Normally I just watch the "watch later" playlist, so maybe the extension does not like playlists? Will test later tonight to see if I can figure out if I can get the ext. to work reliably and fail reliably for me with this new infomation.
The extension totally works with playlist. I'm using also with watch later and other playlists
For some reason it seem way harder to get to fail now. But I just encountered one. (this was the only liker log created for the entire video)
uncaught exception: Multiple run liker-material.js:440:8
await this.update_options();
this.waitForVideo(() => {
It was the only tab open, just watching like normal. Right before that error I got 2
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://play.google.com/log?format=json&hasfast=true&authuser=0. (Reason: CORS request did not succeed). Status code: (null).
The multiple run exception is normal, normally it doesn't prevent script to like, it is triggered when script is already running, to avoir like > unlike in a raw. It doesn't like the video in your case ?
CORS error is done by youtube and not my script.
Its not the video, after that I was able to replicate over and over again until I refreshed the page. Its a first time Youtube is running problem.
After that last problem, every video worked. So I shutdown FF, starting it backup again and the first video shows logs3.txt So it knows it should like the video, but then even after watched the video many times over and over again, it never actually likes the video. Then every subsequent video shows the already running error and nothing else. Even other tab seems to share this same problem, until I refresh a youtube page and everything works.
The problem also seems to affect the "Windowed Fullscreen" extension, which I saw failing at the same times, I have removed the extension to see if it is perhaps some clash between the two that is causing it. But that along with a tampermoneky autoliking script have been having this problem a month ago back on Chrome/windows so it seems to be OS/browser independent.
logs.zip Here are the logs and pages I get from 2 random vidoes watched after restarting FF. I never got any autolikes with either of them. It was the same page, so logs2.txt just contains the new logs, and I left all the non liker-mat. stuff because their is not much and it might help.
The only other thing I could try is disabling all extensions but autoliker. But I even turned off my ad block, so it is only the bring back dislike extension that seems to be doing anything at all.
OK, so the problem is with video.duration and video.currentTime. currentTime is showing as 0 and duration is NaN.
Just to keep you updated, I'm trying to reproduce the bug on my computer, but I'm struggling. ETA 12/04: still trying.
Hmm, well I would just consider it Youtubes problem, and maybe they will fix their stuff eventually.
Here is the video-steam object as it appears in my YT. console-export-2022-4-12_12-31-31.txt
Here is the same thing in troubleshooting mode, it looks the same to me (note I do watch some of the vidoe before captuign the object, so the 0 current time is incorrect. The relevant variables are the same. I assume this is just the new YT version they are testing? I will boot into windows the nest time I start my computer and see if I get the same result, but it sort of looks like it is just their api being broken to me. console-export-2022-4-12_12-38-46.txt )
So without even logging in, on chrome, in windows 11. I got the exact same issue. So probably some regional YT stuff, but it has been going on for awhile.
Lol, ok. now in both chrome and FF, my sidebar is just empty. I dont have subscriptions, i dont have watch later, I just have my home recommended feed. I guess YT just pushed more experimental changes to me? OK, I dont even have my profile menu, so I cannot even report bugs. Ya, I think YT just has me in some alpha software testing program. I pay for premium, so I will have to see if their is anyway to get them to put me back on the stable branch.
Strange indeed. Do you still have the elements missing without any addon activated ?
The sidebar came back, but the profile top right menu is still gone. Did a restart into troubleshooting mode and it is the same. I think I said yes to some "do you want to try out some new features" months ago and I assume that is when it all started.
Ya, it is just YT being stupid https://www.reddit.com/r/youtube/comments/u26qz3/cleaned_cookies_and_did_a_hard_reset_on_the/
Youtube released a new layout, is this issue still present ?
Hmm, Did a reboot and it worked right off, so it seems to be working now. It was still happening a day or two ago for sure, so thus new YT release seemed to have done the trick.
Ok , I keep the issue open then, if within a week there is no issue can you mention it so I can close this issue ?
Good call, not sure if difference between restart and shutdown, but this morning it is not working again.
I can confirm that it has some trouble. Maybe some other add-on is causing interference?
I'm using 'Enhancer for YouTube' and 'SponsorBlock' as well.
Enhancer for YouTube is configured to:
SponsorBlock is configured to skip everything.
System: Arch/KDE/Wayland with Firefox 100.0.1
The bug only happens in like % or in other modes too ?
I can confirm that it has some trouble. Maybe some other add-on is causing interference?
I'm using 'Enhancer for YouTube' and 'SponsorBlock' as well.
Enhancer for YouTube is configured to:
* 'Prevent videos loaded in background tabs from automatically playing' * Pause videos playing in background tabs when a video starts playing in the foreground tab * Launch a mini player when scrolling down to read comments * Automatically hide info cards and end screens * Automatically expand the video player * Use the available space based on the viewport dimensions to expand the video player * Hide chat
SponsorBlock is configured to skip everything.
System: Arch/KDE/Wayland with Firefox 100.0.1
Those parameters are working for me ... Do you have YouTube premium ? If not this may be A/B testing, can you tell me in which country you are ? So I can use a proxy to see the same YouTube version. Plus, logs and HTML may be helping me to solve the issue quicker: https://www.youtube.com/watch?v=C4fQXRYwbrs&t=66s
I'm asking a lot sorry :/
Debug:
yt-autolike start liker-material.js:431:6
options updated liker-material.js:27:6
Get Video. liker-material.js:175:7
No visible ActionsElements found. liker-material.js:41:7
wait 1s for box liker-material.js:158:7
uncaught exception: Multiple run liker-material.js:438:8
ActionsElements found. 2 liker-material.js:57:7
got buttons liker-material.js:124:7
ActionsElements found. liker-material.js:57:7
got buttons liker-material.js:124:7
checking if video is rated liker-material.js:290:6
All mode liker-material.js:331:7
Use list: false liker-material.js:335:6
Should like: true liker-material.js:367:7
Here's the website:
https://ipfs.io/ipfs/bafykbzaceagicxhaiy7gwvw6sl4iopmaen5lldo76birbdhcvmvcftepuivbs
Somehow Github doesn't like websites, even zip compressed ones.
Seems like the video is found first, the HTML change and video element is not valid anymore, leading to :
OK, so the problem is with video.duration and video.currentTime. currentTime is showing as 0 and duration is NaN. @wisnoskij
When you open the youtube page, the video start playing ASAP ? Or you have to press a play button with a background picture on video frame to start loading and playing the video?
Do you see any HTML change, like switch from normal to theater ?
When you open the youtube page, the video start playing ASAP ? Or you have to press a play button with a background picture on video frame to start loading and playing the video?
Yes, it'll autoplay.
Do you see any HTML change, like switch from normal to theater ?
Not really, it looks like it's in theater right from the moment I load the page. So yeah, it'll switch to theater because of "Enhancer for Youtube".
"Instant likes" do work for me fine. I switched to that in the meantime. Would just be nice to "like" videos only when I really watched them for a while.
Ya, instant like always worked for me, the only problem seems to be the the script has no way of knowing the current time, everything else works.
Would just be nice to "like" videos only when I really watched them for a while.
Yes, I'm using % too for this reason. And many other users too (I suppose).
Instant like is working because it does not care about the video element modification. Here is the simplified instant like workflow:
1. Wait the video element
2. Wait the buttons elements
3. Check if liked/disliked on button elements
4. Like
The simplified % workflow:
1. Wait for video
2. Wait for buttons elements
3. Check if already liked/disliked on buttons elements
4. Wait reaching % using the previous detected video element (to determine current time and duration) {1}
5. Check if not liked by user in the mean time with button elements
6. Like
In the % it seems that the video element is modified while waiting {1} so the previously registered video element cannot indicate anymore a proper current time and duration doing an infinite wait.
"My issue" is that I cannot reproduce your bug in order to develop and test a patch. I will try to dev something and make you test it :/ but it is not efficient at all.
@wisnoskij what plugins in Firefox do you use?
@Taknok
Thanks for the efforts! :)
@Taknok If you just want to send some YT API commands, I can try to run them in a console with the bug active to see if they return correct results or fix the issue.
Alternatively, could you just do something like, if (duration = NaN) refresh page;
@RubenKelevra I have tested this issue on multiple OSes, using multiple accounts, on different browsers, and with extensions and without them. It's not an extension issue, the YT API is literally just broken. The only thing I have noticed is that "YouTube Windowed FullScreen" has the exact same issue and wont appear as a in player button if the auto liker is not working.
Hm maybe peek at the Sponsorblock codebase? 🤔 I mean it's working and has to fetch the timecode as well :)
From sponsor source code, it seems that indeed youtube has introduce changes of video element for others elements while playing.
I just pushed something to dev branch to try to fix this issue: https://github.com/Taknok/youtube-auto-like/archive/refs/heads/dev.zip. Can you try it with debug mode (deactivate the extension installed from the store) and tell me if it fix the issue or not (with debug logs if not working please) ? How to install: https://www.youtube.com/watch?v=C4fQXRYwbrs
Hmm, the only time I could get the issue to reproduce itself was when I did not load the extension. So either I am just unlucky and the issue is getting less common, or simply having it loaded fixes other extensions suffering from the same issue as well.
No one can test it ? :/
tested again, still working for me.
Tested with the dev version or the store version ?
I tested the dev version. The store version shows same behaviour.
Don't know what changed but works for me now 95% of the time :)
95% with which plugin version ?
Is the issue still present with the version 3.5.0 ?
Will verify tomorrow after a reboot. I thought I saw the issue still persist after I saw the update.
I have not noticed any problems since the update, but I have been very busy so have not done much explicit testing.
Expected Behavior Like the video at 50% watched during playback.
Actual Behavior Does not ever like the video unless I refresh the page after reaching the threshold
To Reproduce Steps to reproduce the behaviour:
Specification