kheina-com / Blue-Blocker

Blocks all Twitter Blue verified users on twitter.com
Mozilla Public License 2.0
321 stars 28 forks source link

Queuing works, but not seeing any blocks any more #276

Open cjshrader opened 2 months ago

cjshrader commented 2 months ago

I'm seeing this on two different PCs and was seeing it on my phone too, but a reinstall seemed to have fixed it there. I'm seeing users get queued for blocking (I'm at 560 queued right now) but I'm not seeing any get blocked at all. Occasionally I will see an error pop up saying to submit a github issue.

I've attached a relevant chunk of my console log, let me know if I can provide anything else.

twitter.com-1714861269176.log

rougetimelord commented 2 months ago

A few questions: which version of BlueBlocker are you using? (This should be listed in the top right corner of the popup) What browser(s) are you using? Are you using any extensions along with BlueBlocker?

A few notes trying to diagnose the issue: There's an error in src/shared.ts where a sendMessage call is not getting a response. The only calls to sendMessage in src/shared.ts are in logic to integrate with other extensions. I think that error is causing the second error in the log? The Uncaught TypeError lines are from Twitter code, not the extension.

cjshrader commented 2 months ago

Thank you for your response.

The version is 0.4.1 (I believe the latest) and the browser is Chrome. I do have many other extensions which have worked fine in the past but I can't rule out that one of them may have updated and started causing issues. Should I try disabling everything except Blue Blocker and seeing if it works? Is that a good enough test?

On my phone when I was having this issue I was on Kiwi browser and only had two extensions: uBlock Origin and Blue Blocker.

rougetimelord commented 2 months ago

I do have many other extensions which have worked fine in the past but I can't rule out that one of them may have updated and started causing issues. Should I try disabling everything except Blue Blocker and seeing if it works?

The only extension that I can think of that may be causing issues is Soupcan? Which seems like it's ruled out if the same error was also happening without it being installed.

rougetimelord commented 2 months ago

Ok looking at this again, I think the first error is sending out the event that is then triggering the second error. We should probably look over the multi-tab event handler and make sure it doesn't error out if it gets an error event. Still not sure what is causing the initial error in chrome.runtime.sendMessage

cjshrader commented 2 months ago

Just to try and provide more information, I disabled all addons and restarted Chrome. When looking at Twitter again, it blocked one single person, then did nothing for around 4 minutes, then popped up the error message saying to create a github issue. I've grabbed the console logs starting from that person being queued in case there's anything helpful, there is something about requestAnimationFrame taking too long but the rest looks the same to me.

twitter.com-1714955516804.log

We should probably look over the multi-tab event handler

Sorry, when you say "we" here do you mean the smart people who know this plugin or is there something I can look at here? If there's any more info I can provide I'm happy to do so, I just need to be pointed at where as I'm not too good at this web dev stuff.

cooljeanius commented 2 months ago

Just to try and provide more information, I disabled all addons and restarted Chrome. When looking at Twitter again, it blocked one single person, then did nothing for around 4 minutes, then popped up the error message saying to create a github issue. I've grabbed the console logs starting from that person being queued in case there's anything helpful, there is something about requestAnimationFrame taking too long but the rest looks the same to me.

twitter.com-1714955516804.log

We should probably look over the multi-tab event handler

Sorry, when you say "we" here do you mean the smart people who know this plugin or is there something I can look at here? If there's any more info I can provide I'm happy to do so, I just need to be pointed at where as I'm not too good at this web dev stuff.

I don't even see that string anywhere in the Blue-Blocker repo when searching with git grep; are you sure it's being emitted by Blue-Blocker?

cjshrader commented 2 months ago

The error I'm referring to is this one:

https://github.com/kheina-com/Blue-Blocker/blob/b4376ea4e1a6be81935c6b75ef65ba462d0ef854/src/shared.ts#L275

Unless you meant a different error message? Beyond that I can't tell you if Blue Blocker is generating it, I'm just trying to provide the full console log to be helpful.

cooljeanius commented 2 months ago

The error I'm referring to is this one:

https://github.com/kheina-com/Blue-Blocker/blob/b4376ea4e1a6be81935c6b75ef65ba462d0ef854/src/shared.ts#L275

Unless you meant a different error message?

I meant the one saying "We should probably look over the multi-tab event handler"

rougetimelord commented 2 months ago

Oh no, that's not an error, I'm just commenting that it seems like the initial error is getting sent to the same handler

On Mon, May 6, 2024 at 11:36 Eric Gallager @.***> wrote:

The error I'm referring to is this one:

https://github.com/kheina-com/Blue-Blocker/blob/b4376ea4e1a6be81935c6b75ef65ba462d0ef854/src/shared.ts#L275

Unless you meant a different error message?

I meant the one saying "We should probably look over the multi-tab event handler"

— Reply to this email directly, view it on GitHub https://github.com/kheina-com/Blue-Blocker/issues/276#issuecomment-2096668304, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADLFRYQ5BWUQF4Y57KQVZCDZA7ES3AVCNFSM6AAAAABHHFCSWSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJWGY3DQMZQGQ . You are receiving this because you commented.Message ID: @.***>

cooljeanius commented 2 months ago

oh derp I didn't realize that was a quote from a previous comment...

Lumpef commented 1 month ago

I seem to be having the same issue as described here. I'm still able to add to the queue, but blocks are not processing.

However, blocks DO seem to begin processing again when the block interval setting is set low. (Fast) I usually keep it near its longest interval (50s+) to avoid Twitter locking me out, and noticed I was not seeing the blocks being processed.

While the extension is fully functional and blocking properly, changing the block interval from 5s, to 50s (without refreshing the page) causes the error to appear after browsing for a few minutes with no blocks being processed.

Setting a block interval between 5s-25s and refreshing the page seems to restore the blocking functionality. Once blocking is functional from a lower interval, I'm then able to increase the interval as high as ~25s without refreshing and it continues functioning. Somewhere between ~30s to ~35s and above the blocking seems to stop.

Lowering the block interval from an initially higher (non-blocking) number, like 35s, down to 5s and NOT refreshing does not fix the issue, it only begins blocking again once I refresh the page.

I hope this is in any way helpful for you all figuring out the issue! Happy to provide any more information I can. Thank you for all your hard work on this extension.

My set up: Chrome version: 124.0.6367.202 BlueBlocker version: 0.4.1

I should mention that my queue is quite large. (17,400+) I also have the following extensions which modify Twitter: 'BlueLiteBlocker' 'Control Panel for Twitter' 'uBlock Origin Dev Build' 'Eight Dollars'

Twitter log: twitter.com-1715734947453.log

rougetimelord commented 1 month ago

Both reports have the following in common:

chunk-cf29f431.js:1 [Blue Blocker] unexpected error occurred while processing block queue Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received
rougetimelord commented 1 month ago

I think that the error is happening because the extension is not sending a response back fast enough from here: https://github.com/kheina-com/Blue-Blocker/blob/b4376ea4e1a6be81935c6b75ef65ba462d0ef854/src/background/index.ts#L74-L78

Maybe??? Honestly I'm kind of mystified

Chain of events:

  1. Block queue consumer calls checkBlockQueue
  2. checkBlockQueue calls QueuePop
  3. QueuePop sends an extension API message internally
    • Message has action: PopFromQueueAction
  4. Listener in src/index.ts is triggered
    • Listener returns true, indicating a response is coming
  5. Listener calls PopUserFromQueue
  6. Hypothetically while awaiting the promise from PopUserFromQueue the message channel closes, causing the error

The added info about block intervals making it so the error doesn't happen is useful, but I'm not super sure where it comes in in the chain of events.

cjshrader commented 1 month ago

I thought sharing my exact configuration would help.

image

My block interval was 35s and my popup timer was 30 seconds.

I tried changing block interval to 15 seconds and refreshed like @Lumpef mentioned and I am seeing blocks happen now, I've had it going for a few minutes now.