youtube-auto-like icon indicating copy to clipboard operation
youtube-auto-like copied to clipboard

Like at % Watched not Working

Open wisnoskij opened this issue 2 years ago • 75 comments

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:

  1. Set the extension to like at any %.
  2. Watch video
  3. See that it is still unliked
  4. Disabled extension and refresh, still unliked
  5. Enable extension and refresh
  6. See it is liked.

Specification

  • OS: Fedora 35
  • 98.0.2
  • V3.4.2

wisnoskij avatar Apr 02 '22 21:04 wisnoskij

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

Taknok avatar Apr 02 '22 22:04 Taknok

The dev one says it is the same version, but is working

wisnoskij avatar Apr 02 '22 22:04 wisnoskij

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.

wisnoskij avatar Apr 02 '22 22:04 wisnoskij

logs.zip

wisnoskij avatar Apr 02 '22 22:04 wisnoskij

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 !

Taknok avatar Apr 02 '22 22:04 Taknok

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:

  1. Going to subscription tabs
  2. Starting video in small player
  3. Pressing i to enter in full player
  4. Wait to forever to like

Taknok avatar Apr 04 '22 16:04 Taknok

Oh, 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.

wisnoskij avatar Apr 04 '22 16:04 wisnoskij

The extension totally works with playlist. I'm using also with watch later and other playlists

Taknok avatar Apr 04 '22 18:04 Taknok

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).

wisnoskij avatar Apr 05 '22 13:04 wisnoskij

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.

Taknok avatar Apr 05 '22 19:04 Taknok

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.

wisnoskij avatar Apr 05 '22 20:04 wisnoskij

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.

wisnoskij avatar Apr 05 '22 20:04 wisnoskij

OK, so the problem is with video.duration and video.currentTime. currentTime is showing as 0 and duration is NaN.

wisnoskij avatar Apr 06 '22 04:04 wisnoskij

Just to keep you updated, I'm trying to reproduce the bug on my computer, but I'm struggling. ETA 12/04: still trying.

Taknok avatar Apr 12 '22 16:04 Taknok

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

wisnoskij avatar Apr 12 '22 16:04 wisnoskij

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 )

wisnoskij avatar Apr 12 '22 16:04 wisnoskij

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.

wisnoskij avatar Apr 12 '22 19:04 wisnoskij

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.

wisnoskij avatar Apr 12 '22 20:04 wisnoskij

Strange indeed. Do you still have the elements missing without any addon activated ?

Taknok avatar Apr 12 '22 20:04 Taknok

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.

wisnoskij avatar Apr 12 '22 21:04 wisnoskij

Ya, it is just YT being stupid https://www.reddit.com/r/youtube/comments/u26qz3/cleaned_cookies_and_did_a_hard_reset_on_the/

wisnoskij avatar Apr 12 '22 21:04 wisnoskij

Youtube released a new layout, is this issue still present ?

Taknok avatar May 16 '22 12:05 Taknok

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.

wisnoskij avatar May 16 '22 23:05 wisnoskij

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 ?

Taknok avatar May 17 '22 05:05 Taknok

Good call, not sure if difference between restart and shutdown, but this morning it is not working again.

wisnoskij avatar May 17 '22 11:05 wisnoskij

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

RubenKelevra avatar May 17 '22 20:05 RubenKelevra

The bug only happens in like % or in other modes too ?

Taknok avatar May 17 '22 20:05 Taknok

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 :/

Taknok avatar May 18 '22 20:05 Taknok

  • Do you have YouTube premium? Yes
  • can you tell me in which country you are? Germany

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.

RubenKelevra avatar May 20 '22 15:05 RubenKelevra

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

Taknok avatar May 20 '22 15:05 Taknok