AdguardTeam / AdguardBrowserExtension

AdGuard browser extension
https://adguard.com/
GNU General Public License v3.0
2.91k stars 321 forks source link

Remove usage of deprecated navigator api #2165

Open scrutinizer11 opened 1 year ago

scrutinizer11 commented 1 year ago

Issue Details

Additional Information

Sometimes, but often enough to get a noticeable effect, Adguard Extension crashes when I launch Chromium. Chromium sends a notification about that telling me to reload it. Very often the setup is multiple open tabs with resource-intensive content such as several tabs with media sites (YouTube, Netflix etc.).

Birbber commented 1 year ago

@scrutinizer11 Hi, I wasn't able to reproduce the issue with the same extensions in chrome 104. I suspect some of these extensions might affect the work of AdGuard. Could you try disabling some of them and monitor the issue? Also a screenshot of the notification would be helpful.

zzebrum commented 1 year ago

@scrutinizer11 any news?

scrutinizer11 commented 1 year ago

No news. Still crashes. It's nothing special to show other than the notification Adguard extension has crashed. Click this balloon to reload it. That's it. It can happen several times in a row during a short interval.

scrutinizer11 commented 1 year ago

One tab was playing YouTube content, another one was an online forum. The extension crashed more than once and the active tab (the forum) got rid of its contents, so the tab became completely blank. Facebook is susceptible to this misbehaviour too. The extension's management pane displayed the error

Uncaught (in promise) Error: Could not establish connection. Receiving end does not exist.

The error pointed to this code:

Adguard-error.log

maximtop commented 1 year ago

@scrutinizer11 I didn't find any errors in the code you sent. The error you are referring can't be the cause of crashing. Can you share your extension settings and the websites open in the tabs?

scrutinizer11 commented 1 year ago

I didn't say the code contained the error. I said that the quoted error pointed to the code snippet that showed up on the extension's management pane.

I enclose a JSON file with the settings, as you requested. As to the tab configuration, I have it varying frequently so it's difficult to recall the exact pattern at which the tabs turn up at the time of the bug cropping up because the crashes occur out of the blue. I did notice though, that for the most part, they happen when one or several tabs with resource-hogging content are opened. Usually, it's Facebook and Youtube among others. Open any number of tabs above 2 including any demanding site. 20220829_080824_adg_ext_settings_4.1.1.txt

scrutinizer11 commented 1 year ago

Cannot load extension with file or directory name metadata. Filenames starting with "" are reserved for use by the system.

ag-warning-30·08·2022 17·05.txt

scrutinizer11 commented 1 year ago

Now it crashes like crazy on every Chromium launch, every tab opening (even this page). A new error. Screen Shot 2022-09-04 at 15 59 31

maximtop commented 1 year ago

Can you describe the steps to reproduce the error in the last comment?

scrutinizer11 commented 1 year ago

Just launch the browser with several tabs or open them after the launch. Some of those have to be opened on YouTube, Facebook or a similar site. It's a good chance it may then kick off the trigger setting a crash cycle in motion. In some cases, even opening such sites as GitHub leads to a crash as well. Better yet, use a machine from 2012 with any Mac operating system.

maximtop commented 1 year ago

Are the settings the same as you've sent before?

maximtop commented 1 year ago

@scrutinizer11 I've asked QA to test on Mohave 10.14, but they could not reproduce crashes.

scrutinizer11 commented 1 year ago

I have discovered something accidentally but am not sure if this is related and what it means. I clicked on Inspect Views background.js:1 just upon reloading the extension after it crashed: it opened the referred "view" and under Issues I saw this:

Screen Shot 2022-09-14 at 02 41 00

Is it in any way helpful?

maximtop commented 1 year ago

@scrutinizer11 we will remove usage of described api, but it is unlikely to be the cause of the crashes

scrutinizer11 commented 1 year ago

ADG-error_2022-09-25_02-41-46-660

maximtop commented 1 year ago

ADG-error_2022-09-25_02-41-46-660

Have you reloaded the extension? This error may occur if the extension background page was reloaded while the content script was sending messages.

scrutinizer11 commented 1 year ago

Yes, I reloaded it after it crashed the page in question cleared its contents. The thing crashes a hell of a lot, coinciding with the page blanking, at the beginning and the middle of the browsing session.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.