ERROR: [1] Unhandled rejection:
TypeError: Cannot read property 'replace' of null
at Object.requestFromUrl (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_pac.min.js:9760:27)
at chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/background.js:108:37
From previous event:
at ChromeTabs.actionForUrl (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/background.js:106:26)
at ChromeTabs.processTab (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5849:17)
at ChromeTabs.onUpdated (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5821:17)
at chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5802:26
at Array.forEach (<anonymous>)
at Object.callback (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5799:21)
at safeCallbackApply (extensions::uncaught_exception_handler:27:15)
at handleResponse (extensions::sendRequest:67:7)
@olloff The error seems to be hinting about a particular Chrome Tab that contains a URL with no protocol (or the library failed to parse the URL). Can you shed some light on what that URL could be? Any weird URLs, special pages (like Chrome pages?) did you open at that time? Any idea on how to reproduce this?
I was struggling to find a page without https-redirection, so this could be one of SSL error pages, like https://mashable.com/, https://www.tastefullyoffensive.com/ or https://sunline.ua/
Log dumped from 2.5.0 on Chrome 60 (stable) over Windows 7 VM.
Honestly, I doubt you can reproduce this without efforts. The last 100 tries across browser history in same condition gave nothing, so either it's heisenbug, or I do something else that particular moment (changing system of switchy proxy settings, for example).
I'll keep trying, tho.
Thanks for trying. I've seen errors like this from other users a few times so it makes sense to patch this even if I don't know the root cause. Please feel free to keep trying or stop it if it just takes too much effort.
I've got it, but I'm not proud at all.
This situation can occur when Chrome lacks cached or saved proxy credentials.
Issue is repeatable and can occur on step 5 or step 4 (I can miss something, probably). Same happens when page asking for auth as browser startup. Issue happens to raise when extension tries to load an profile, I can do some other tests if needed.
What's more important, I've forgotten to search for similar issues and there was at least one with all info needed: https://github.com/FelisCatus/SwitchyOmega/issues/1151
background.js:19 Options << Options#applyProfile ["direct"]0: "direct"length: 1__proto__: Array(0)
background.js:19 Options << Options#updateProfile [Array(1)]0: ["direct"]length: 1__proto__: Array(0)
background.js:26 [3] Unhandled rejection:
TypeError: Cannot read property 'replace' of null
at Object.requestFromUrl (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_pac.min.js:9760:27)
at chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/background.js:108:37
From previous event:
at ChromeTabs.actionForUrl (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/background.js:106:26)
at ChromeTabs.processTab (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5849:17)
at ChromeTabs.onUpdated (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5821:17)
at chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5802:26
at Array.forEach (<anonymous>)
at Object.callback (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5799:21)
at safeCallbackApply (extensions::uncaught_exception_handler:27:15)
at handleResponse (extensions::sendRequest:67:7)
Log.error @ background.js:26
(anonymous) @ background.js:39
CapturedTrace.fireRejectionEvent @ omega_target.min.js:814
Promise._notifyUnhandledRejection @ omega_target.min.js:1237
(anonymous) @ omega_target.min.js:267
setTimeout (async)
(anonymous) @ omega_target.min.js:266
setTimeout (async)
schedule @ omega_target.min.js:259
Async.invokeLater @ omega_target.min.js:265
Promise._ensurePossibleRejectionHandled @ omega_target.min.js:1225
Promise._rejectUnchecked @ omega_target.min.js:3005
Promise._reject @ omega_target.min.js:2872
Promise._settlePromiseAt @ omega_target.min.js:2912
Promise._settlePromises @ omega_target.min.js:3013
(anonymous) @ omega_target.min.js:288
setTimeout (async)
schedule @ omega_target.min.js:259
Async.settlePromises @ omega_target.min.js:287
Promise._queueSettlePromises @ omega_target.min.js:2953
Promise._rejectUnchecked @ omega_target.min.js:3003
Promise._reject @ omega_target.min.js:2872
Promise._settlePromiseAt @ omega_target.min.js:2912
Promise._settlePromises @ omega_target.min.js:3013
(anonymous) @ omega_target.min.js:288
setTimeout (async)
schedule @ omega_target.min.js:259
Async.settlePromises @ omega_target.min.js:287
Promise._queueSettlePromises @ omega_target.min.js:2953
Promise._rejectUnchecked @ omega_target.min.js:3003
Promise._reject @ omega_target.min.js:2872
Promise._rejectCallback @ omega_target.min.js:2788
Promise._settlePromiseFromHandler @ omega_target.min.js:2829
Promise._settlePromiseAt @ omega_target.min.js:2897
Promise._settlePromiseAtPostResolution @ omega_target.min.js:2561
(anonymous) @ omega_target.min.js:278
setTimeout (async)
schedule @ omega_target.min.js:259
Async.invoke @ omega_target.min.js:277
Promise._then @ omega_target.min.js:2552
Promise.then @ omega_target.min.js:2431
actionForUrl @ background.js:106
ChromeTabs.processTab @ omega_target_chromium_extension.min.js:5849
ChromeTabs.onUpdated @ omega_target_chromium_extension.min.js:5821
(anonymous) @ omega_target_chromium_extension.min.js:5802
(anonymous) @ omega_target_chromium_extension.min.js:5799
safeCallbackApply @ extensions::uncaught_exception_handler:27
handleResponse @ extensions::sendRequest:67
background.js:19 Options << Options#applyProfile ["system"]
background.js:19 external proxy: {levelOfControl: "controllable_by_this_extension", value: {…}}
background.js:19 external proxy: {incognitoSpecific: false, levelOfControl: "controllable_by_this_extension", value: {…}}
background.js:19 external proxy: {levelOfControl: "controllable_by_this_extension", value: {…}}
background.js:19 Options << Options#updateProfile [Array(1)]
background.js:19 ProxyAuth <ip:port> 0 undefined
background.js:19 Options << Options#applyProfile (2) ["system", {…}]
background.js:26 [4] Unhandled rejection:
TypeError: Cannot read property 'replace' of null
at Object.requestFromUrl (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_pac.min.js:9760:27)
at chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/background.js:108:37
From previous event:
at ChromeTabs.actionForUrl (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/background.js:106:26)
at ChromeTabs.processTab (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5849:17)
at ChromeTabs.onUpdated (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5821:17)
at chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5802:26
at Array.forEach (<anonymous>)
at Object.callback (chrome-extension://padekgcemlokbadohgkifijomclgjgif/js/omega_target_chromium_extension.min.js:5799:21)
at safeCallbackApply (extensions::uncaught_exception_handler:27:15)
at handleResponse (extensions::sendRequest:67:7)
Got it.
Can't reproduce this using polipo on Linux. I think this happened because polipo still shows me a page saying "407 Proxy authentication required" even if I cancel the dialog.
Is there any difference about how your proxy server behave? Does it simply drop the connection?
Does it simply drop the connection?
This is most likely reason, yeah. Can't tell if it normal to 3proxy or my instance is miconfigured.
Anyway I've checked it again and spot another symptom: if I change the profile for 2-3 times, exact same error will be thrown to console every time and exact same error page will be shown in browser (i need to discard proxy auth popup every time to see error page).
But after that, browser shows me an empty page instead of error page. A page without an address (not about:blank), where extension button hangs and its not possible to switch profile again on this particular page (other pages are working fine) unless to enter new address or to return to the previous page.
So, eventually, you can be right about
Chrome Tab that contains a URL with no protocol
If I can somehow get the URL then that could be help me to fix the hang...
So, could you do a favor for me and execute the following code in the Console when that empty page shows?
chrome.tabs.query({}, function(r){console.log(r.map(function(e){return e.url}))})
The code above needs to be run in an extension context so you can try opening SwitchyOmega options page first, open the Console there and keep it there while you try reproducing the error using another tab? When that empty tab shows up, please run the code in the Console on the SwitchyOmega options tab and see if there is anything weird there. Thanks!
Patched. Let me know once you have any updates so that I can fix the root cause.
Fixed on v2.5.1. Published on Chrome Web Store. Firefox version still under review.
Most helpful comment
I've got it, but I'm not proud at all.
This situation can occur when Chrome lacks cached or saved proxy credentials.
Issue is repeatable and can occur on step 5 or step 4 (I can miss something, probably). Same happens when page asking for auth as browser startup. Issue happens to raise when extension tries to load an profile, I can do some other tests if needed.
What's more important, I've forgotten to search for similar issues and there was at least one with all info needed: https://github.com/FelisCatus/SwitchyOmega/issues/1151