Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Like at % Watched not Working #59

Open
wisnoskij opened this issue Apr 2, 2022 · 75 comments
Open

Like at % Watched not Working #59

wisnoskij opened this issue Apr 2, 2022 · 75 comments
Assignees
Labels

Comments

@wisnoskij
Copy link

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
@Taknok Taknok self-assigned this Apr 2, 2022
@Taknok Taknok added the bug label Apr 2, 2022
@Taknok
Copy link
Owner

Taknok commented Apr 2, 2022

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

@wisnoskij
Copy link
Author

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

@wisnoskij
Copy link
Author

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
Copy link
Author

logs.zip

@Taknok
Copy link
Owner

Taknok commented Apr 2, 2022

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
Copy link
Owner

Taknok commented Apr 4, 2022

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

@wisnoskij
Copy link
Author

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.

@Taknok
Copy link
Owner

Taknok commented Apr 4, 2022

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

@wisnoskij
Copy link
Author

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

@Taknok
Copy link
Owner

Taknok commented Apr 5, 2022

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.

@wisnoskij
Copy link
Author

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
Copy link
Author

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
Copy link
Author

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

@Taknok
Copy link
Owner

Taknok commented Apr 12, 2022

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

@wisnoskij
Copy link
Author

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
Copy link
Author

wisnoskij commented Apr 12, 2022

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
Copy link
Author

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
Copy link
Author

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.

@Taknok
Copy link
Owner

Taknok commented Apr 12, 2022

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

@wisnoskij
Copy link
Author

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
Copy link
Author

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

@Taknok
Copy link
Owner

Taknok commented May 16, 2022

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

@wisnoskij
Copy link
Author

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.

@Taknok
Copy link
Owner

Taknok commented May 17, 2022

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 ?

@wisnoskij
Copy link
Author

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

@RubenKelevra
Copy link

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

@Taknok
Copy link
Owner

Taknok commented May 17, 2022

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

@Taknok
Copy link
Owner

Taknok commented May 18, 2022

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

@wisnoskij
Copy link
Author

Will verify tomorrow after a reboot. I thought I saw the issue still persist after I saw the update.

@wisnoskij
Copy link
Author

I have not noticed any problems since the update, but I have been very busy so have not done much explicit testing.

@wisnoskij
Copy link
Author

wisnoskij commented Jun 25, 2022

3.5.0
I got the issue to happen. If I remember correctly, it used to be reproducible with 100% accuracy after I figured out the trigger. It seems to be like 10-30% chance now, unless it is some issue to do with half loading the home page or some weird trick like that, I cannot reproduce the issue most times, but I just got it to happen twice. Maybe it is based on the order the mods are loaded in or something like that.

Addendum: Just shutdown FF and started it back up again like 10 times and could not get the issue again.

@RubenKelevra
Copy link

95% with which plugin version ?

I'm running right now the 3.5.0 The issue for the last 5% is SponsorBlock I think.

Just an educated guess, but I think this is going on:

  • Auto Like waits for the time marked for x % to pass, which never happens, because
  • Sponsor Block finds a advertisement and skips over this timemarker

The solution would be (in general for all types of skipping) to just count the watch time in the current tab, and if it's over x % a like will be sent.

This also avoids liking content where you just skip to a certain portion and doesn't watch the whole thing. :)

@Taknok
Copy link
Owner

Taknok commented Jun 25, 2022

@RubenKelevra The code is already doing this, meaning if you start a vidéo and immediately click to the end, the plugin should like the video.

if (nowInPercent >= percentageAtLike) {

The plugin get the current time of the vidso, meaning if you jump to 30min after 5s of playing the currentTime will be 30min.

I will look the behavior with sponsor block again and on a longer period, because I'm not using it personally.

@RubenKelevra
Copy link

Ah okay. No I don't think you have to worry about it then. It's just, that sometimes videos don't get liked and I just don't know why.

Regarding your current approach: I think it's better get the actual time the user plays back the video and only after x% of watch time compared to the length of the video it will get liked.

Meaning that if I for example open a video which is clickbait and I skip forward to the highlight portion of the video, it will be liked, despite that I only watched a couple of seconds of it.

Regarding Sponsor Block: Give the add-on a look, its great :)

@Taknok
Copy link
Owner

Taknok commented Aug 17, 2022

Even with sponsor block enabled to skip everything, I cannot reproduce the issue with more than 200 videos played :/

@Taknok
Copy link
Owner

Taknok commented Aug 17, 2022

If someone having this issue can look into the html code and the addon code. It will gladly help :/

@Taknok
Copy link
Owner

Taknok commented Nov 12, 2022

Is the issue fix with the new version of the addon ? (I will close in 7 days without answer, feel free to comment for re-opening it)

@wisnoskij
Copy link
Author

I forgot to check this morning, but I have seen this issue since the new YT format and the extension update for it. I will try to remember to check specifically the next time I start my computer. The issue seemed unchanged.

@wisnoskij
Copy link
Author

Turns out my first tab still had this issue ongoing, so I can absolutely state that this issue persists unchanged.

@Taknok
Copy link
Owner

Taknok commented Feb 12, 2023

Does 3.6.2 fix this issue ?

@wisnoskij
Copy link
Author

wisnoskij commented Feb 12, 2023

Yes, I am fairly certain it is working for me now.

@Taknok
Copy link
Owner

Taknok commented Feb 12, 2023

Ok, I will wait one more week before closing it.

@Taknok Taknok closed this as completed Mar 16, 2023
@RubenKelevra
Copy link

RubenKelevra commented Mar 16, 2023

Hey @Taknok, I've noticed that it seems to be broken, still (or again?) (sometimes):

  • So I use the following settings right now:

Screenshot from 2023-03-16 16-41-37

  • SponsorBlock is running, and the video has the end-section skipped
  • The video is originally 3:15, while it has only 2:55 playtime because of the skipped section at the end.
  • I had the “autoplay next” feature enabled

So it's a new tab, I've opened youtube.com, searched for a video, loaded it. SponsorBlock would skip the end and then “autoplay next” would just play the next video.

I did go “back” in the browser, and the video wasn't liked.

I tried reproducing it three times, but every time the video would be liked. So it's rare, that it's not working.

I'm running version 3.6.2.

@Taknok Taknok reopened this Mar 16, 2023
@Taknok
Copy link
Owner

Taknok commented Mar 17, 2023

Hi,
Can you activate the logs (guide https://youtu.be/C4fQXRYwbrs?t=68) and send it back here when you see the issue ? You just have to activate the log, use youtube normally, and when seeing the bug do ctrl + shift + K scroll to find the logs and paste here.

@wisnoskij
Copy link
Author

Can confirm, just noticed a video not get liked 5 minutes ago. Enabled debug so if it happened again I will have logs.

@wisnoskij
Copy link
Author

Hmm, yes seems different this time. The videos just don't ever get liked. I even tried instant like and it failed.

https://pastebin.com/CywpPUrj

Looks like they changed the button ids or something like that.

@Taknok
Copy link
Owner

Taknok commented Mar 18, 2023

Hi,
I pushed a fix. Can you try the version on dev branch ? And tell me if the issue is fixed ?
Guide: https://youtu.be/C4fQXRYwbrs?t=68

@wisnoskij
Copy link
Author

Yes, I tested instant like for every video and it worked right off.

@Taknok
Copy link
Owner

Taknok commented Mar 18, 2023

The new version is sent to firefox for validation.

@Taknok
Copy link
Owner

Taknok commented Mar 19, 2023

Does the new version fix the issue ?

@wisnoskij
Copy link
Author

wisnoskij commented Mar 19, 2023 via email

@Taknok
Copy link
Owner

Taknok commented Mar 19, 2023

Ok, I will close it in 1 week if no one says otherwise.

@JoelleEmmily
Copy link

JoelleEmmily commented May 1, 2023

Same issue

Uncaught (in promise) Error: creatorBlock is null 2 undefined

@Taknok
Copy link
Owner

Taknok commented May 1, 2023

Ok, it seems that a new youtube version is released as the script cannot grab the creator block. I will look into it.

@Taknok
Copy link
Owner

Taknok commented Sep 9, 2023

Is this issue still present on the new youtube grid version ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants