RomainLK / ytc-filter

Web extension for when Youtube chat is too fast
MIT License
56 stars 15 forks source link

2.1.3 TypeError Spam in DevConsole #72

Closed ralinchan closed 3 years ago

ralinchan commented 3 years ago

I'm running 2.1.3 and it looks like YTC suddenly stopped working. Chrome's DevConsole is showing spam of this error.

Symptoms of the error include not wanting to open the popout window, not increasing count of filtered messages, not sure if it's even filtering messages at all

Uncaught (in promise) TypeError: Cannot read property 'feeds' of undefined at VueComponent.filters (loading.js:45659) at Watcher.get (loading.js:4312) at Watcher.evaluate (loading.js:4417) at VueComponent.computedGetter [as filters] (loading.js:4615) at _callee3$ (loading.js:45906) at tryCatch (loading.js:31748) at Generator.invoke [as _invoke] (loading.js:31978) at Generator.next (loading.js:31803) at ytc_filtervue_type_script_lang_js_asyncGeneratorStep (loading.js:45356) at _next (loading.js:45358)

RomainLK commented 3 years ago

Thanks for the report, this seems like a hard bug to track. I have a list of question I hope you can help me with.

This error was in the embedded ytcFilter right? Since the error, do you also have it on all other videos? Where did you watch this video in particular? Youtube or another website? Do you have any other extensions or Greasemonkey script which can alter Youtube? Most important: could you also provide me with a backup of your storage. You need to paste this in the console: chrome.storage.local.get(s => console.log(JSON.stringify(s)))

In the meantime, to fix this, you can try to uninstall the extension, close the browser, then reinstall. Additionally there is the beta of version 2.1.4 if you want to try which includes a number of fixes: https://github.com/RomainLK/ytc-filter/releases/tag/v2.1.4-beta.1

ralinchan commented 3 years ago

What I can report so far seems to be that it is an error that I cannot reliably reproduce nor am I sure what causes it to happen. Currently, I have not restarted the browser since reporting this error but returning to the same video where I copied this error from, I no longer am getting this specific error but YTC Filter still appears to be malfunctioning (the chat replay is going but the chat counter is not increasing - I can't test the filters since it's an archived video so I can't enter in a message to see if the filters work).

What i'm seeing now in the same video instead is a boatload of:

[ytcFilter] Unsupported chat action {addLiveChatTickerItemAction: {…}}

Picking a different video that i've never watched before also gets me this error so it seems like if I get a string of errors from YTC while it is happening, I will get the same error regardless of video for archived videos.

Testing it in a video that is currently streaming I get a similar error but with different parameters:

[ytcFilter] Unsupported chat action {clickTrackingParams: "CAEQl98BIhMI_f6Yyvm87gIVUsecCh3g-Qo5", addChatItemAction: {…}}

I am watching the videos on Youtube.

The videos I tested are:

Where I initially noticed the error - https://www.youtube.com/watch?v=UgvSq9eQBvk Video I tested that I hadn't yet watched - https://www.youtube.com/watch?v=QR_9KzgdEu0

Video that at this time is currently streaming that I tested - https://www.youtube.com/watch?v=mghBi8M7c5w

I don't think any extensions I have alter Youtube. The only one I can think of that I have that might interact with Youtube is Google Translate's extension. Otherwise, I have standard extensions, uBlock Origins, HTTPS anywhere, Noscript, Kaspersky.

I copied what you said into console and it spit out:

VM39:1 Uncaught TypeError: Cannot read property 'local' of undefined at :1:16

Edit:

Just installed the 2.1.4 Beta

It's now spamming the Unsupported Chat Action Error like 5-8 of them at a time:

[ytcFilter] Unsupported chat action {addChatItemAction: {…}}

It looks like this error corresponds to when it updates the chat filtered count and it appears to happen maybe every 15-20 seconds so every 15-20 seconds the chat lines filtered count will increase rather than any live update and the console will flood with 5-10 lines of this error.

Edit 2:

There's only one livestream going on so I can't say with certainty but with the 2.1.4 beta, it appears that specific error is only occurring with archive videos. Watching a stream live, the chat filter count updates normally and the only message that continuously shows up in Dev Console is

[ytcFilter] Non interesting actions {responseContext: {…}, continuationContents: {…}}

RomainLK commented 3 years ago

Thanks for all the details. There is a number of normal stuff going on. I guess I better writethose explanations somewhere as it's not intuitive. I should add these to 2.1.4's help.

Messages count has a slight change since 2.1. At first it will increment as you see the Youtube chat being updated as it's using the Mutation observer, but at some point, it will switch to the Fetch interceptor which work in batch. The total count will increase more sporadically, but in bigger quantity. This is normal, I may need to add this to the tooltip for the stats.

Unsupported chat action are for paid stickers and so on. Non interesting actions are whatever Google sends that I can't make sense. I should remove those messages as it's normal.

Also for my code extract, I forgot to tell you that you need to run in either in the console of the popout, or if it's not accessible, you need to go to the extensions page of your browser > enable developer mode > ytcFilter > inspect background page. This will open the console for the background process. Though if you installed the beta, chance are the information I want about the initial TypeError is no longer here. It's ok, I will think about it.

RomainLK commented 3 years ago

I have added a fail save for the missing feed in 2.1.4

2.1.4 released for Firefox. Chrome will be slightly later, after some testing has been done with Firefox and when Google finishes reviewing it.

RomainLK commented 3 years ago

2.1.6 is out / review for Chrome. I have removed the alarming log as it's more noise than needed. That plus the fail safe of 2.1.4 should address the concerns of this ticket.