Error when accessing Tab.url property on Yandex Browser
Environment
- Browser and full version: Yandex Browser 100.0.4896.1879 beta
- Extension using this toolkit: Adblock Plus 3.14 (only via Chrome Web Store)
- Commit hash: 0.4.0
Steps to reproduce
- Open yandex.ru in a new tab.
- Install Adblock Plus 3.14 via Chrome Web Store.
- Open a new tab and navigate to yandex.ru.
Actual behavior
- After 2) EWE-related errors shown in background page:
background.js:19876 Uncaught (in promise) TypeError: Cannot read properties of null (reading '1') at parseURL (background.js:19876:32) at new FrameInfo (background.js:23193:87) at background.js:23256:29 at async Promise.all (index 0) at async discoverExistingFrames (background.js:23245:3) at async Module.start (background.js:23346:3) at async startAsyncModule (background.js:23588:3) at async background.js:23618:9 at async startAsyncModule (background.js:25751:3) at async Module.start (background.js:25789:3)
- After 3) EWE-related errors shown in background page:
_generated_background_page.html:1 Error in event handler: TypeError: Cannot read properties of null (reading '1') at parseURL (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:19876:32) at new FrameInfo (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23193:87) at recordFrameFromNavigationEvent (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23288:23) at onCommitted (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23297:3) _generated_background_page.html:1 Error in event handler: TypeError: Failed to construct 'URL': Invalid URL at updatePageFrameStructure (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/ext/background.js:167:17) at chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/ext/background.js:292:7 _generated_background_page.html:1 Error in event handler: TypeError: Cannot read properties of null (reading '1') at parseURL (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:19876:32) at new FrameInfo (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23193:87) at recordFrameFromNavigationEvent (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23288:23) at onCommitted (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23297:3) _generated_background_page.html:1 Error in event handler: TypeError: Failed to construct 'URL': Invalid URL at updatePageFrameStructure (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/ext/background.js:167:17) at chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/ext/background.js:292:7 _generated_background_page.html:1 Error in event handler: TypeError: Cannot read properties of null (reading '1') at parseURL (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:19876:32) at new FrameInfo (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23193:87) at recordFrameFromNavigationEvent (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23288:23) at onCommitted (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23297:3) _generated_background_page.html:1 Error in event handler: TypeError: Cannot read properties of null (reading '1') at parseURL (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:19876:32) at new FrameInfo (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23193:87) at recordFrameFromNavigationEvent (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23288:23) at onHistoryStateUpdated (chrome-extension://cfhdojbkjhnklbpkdaibdccddilifddb/background.js:23301:3)
- Filters don't work.
Expected behavior
- No errors are being thrown.
- Filters work as expected.
Further information
This issue was originally reported at adblockinc/ext/adblockplus/adblockplusui#1160 (closed).
This problem appears because the Tab
object, which the browser provides to us, doesn't contain a url
property.