AdguardTeam / BrowserAssistant

AdGuard Browser Assistant
https://adguard.com/en/adguard-assistant/overview.html
GNU Lesser General Public License v3.0
35 stars 5 forks source link

Browser Assistant runs amok in Firefox #115

Closed GagomeSmirnja closed 2 weeks ago

GagomeSmirnja commented 3 months ago

This problem happened to me already several times.

I run Adguard Browser Assitant in Firefox. Normally it works fine. When I get a notification that a new version of Firefox is available I restart all my browser sessions to update Firefox. All sessions close, Firefox updates and all windows do re-open. And then I hear that the CPU fans begin to increase their noise. I see that CPU utilization goes up to >80%, the fan gets louder and I open the Process Explorer. There I see thousands and thousands of Adguard Browser Assistant processes open and more are opened every second. All I can then do is immediately open the Add-on Manager in Firefox and disable Adguard Browser Extension before my PC slows down significantly becasue of the thousands Adguard Browser Assistant processes.

What may cause this?

Attached is the window from Process Explorer which shows the Adguard Browser Assistant processes ending (the red color) after I successfully disabled it in Firefox.

Firefox version is 124.0.1 OS is Windows 10 64-bit Adguard is 7.16.0 (4542)

20240329_Adguard_Browser_Extension_runs-amok

alexx7311 commented 3 months ago

@GagomeSmirnja Hello! If you restart AdGuard for Windows and/or Firefox, does that help with the problem?

GagomeSmirnja commented 3 months ago

I have enabled Browser Assistant and then restarted Firefox. The sessions from Firefox started very slowly. It took minutes until most of them were open and displayed the full content. And then the Browser Assistant did run amok again. The same problem occured and thousands and thousands of Browser Assistant processes were started. Although I opened the Add-On Manager and disabled Browser Assistant again it took minutes (!!!!) until the system returned to a usable state and all Browser Assistant processes ended. This is really ridiculous! I guess I have to disable Browser Assistant and never enable it again to avoid that. But then what is the point of using it?

Is there some way to analyse this? Do you have some suggestion?

ameshkov commented 3 months ago

Well, the problem is that it looks like a strange Firefox bug, these AdGuard.BrowserExtensionHost.exe processes are spawned by Firefox. More on native messaging just in case: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/Native_messaging

Anyways, let's analyze it from our side, maybe we'll figure out what triggers it.

If you're able to reproduce it, we'll need the following:

  1. Reproduce the issue
  2. Remember the exact time when it started
  3. Export AdGuard logs via the program
  4. Export the assistant logs: Go to Firefox -> about:addons -> gear icon -> Debug Add-ons Click "Inspect" button for AdGuard Assistant -> Go to "Console tab" Right click somewhere there -> "Copy all messages" Save them to a text file

Send all the logs to devteam@adguard.com and mention this Github issue in the email.

GagomeSmirnja commented 3 months ago

Hello, I have now recreated the problem and I tried to collect all the data you have mentioned. But the export of logs from AdGuard took very long. I had already disabled Browser Assistant before the export of logs completed. I will send all data to the e-mail you have mentioned. The problem started at 20:26:18.

zubrRB commented 3 months ago

I have been observing something similar for a long time in Chrome. https://github.com/AdguardTeam/AdguardForWindows/issues/4874#issuecomment-1788811781

ameshkov commented 3 months ago

Huh, then we should escalate this

adbuker commented 3 months ago

Seems, that the issue related to the fixed https://github.com/AdguardTeam/AdguardForWindows/issues/4874. @GagomeSmirnja, you can obtain the build with the fix switching to the nighty channel or wait nor more than a couple a weeks until 7.17 released