Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

Errors in the console log #10

Closed
my-password-is-password opened this issue Oct 25, 2014 · 9 comments
Closed

Errors in the console log #10

my-password-is-password opened this issue Oct 25, 2014 · 9 comments

Comments

@my-password-is-password

When I installed uMatrix in a dev build of Chromium theres was an error for "collect errors".
chromiumcollecterrors

So I checked stable chrome and the errors were also there if you inspect background.html.
consoleerror

  • Error in event handler for webRequest.onBeforeSendHeaders/2: undefined is not a function (traffic.js:475:62)
  • Uncaught TypeError: Cannot read property 'repoObsolete' of undefined (updater.js:48)

Using µMatrix 0.8.0.0-alpha.4

@gorhill
Copy link
Owner

gorhill commented Oct 25, 2014

I just unzipped the package and installed and there is no error. It is as if there is a source with a javascript syntax error. Can you scroll up the console and show me the first lines instead?

@my-password-is-password
Copy link
Author

The first line is

Error in event handler for webRequest.onBeforeSendHeaders/2: undefined is not a function
Stack trace: TypeError: undefined is not a function
    at µMatrix.webRequest.onBeforeSendHeadersHandler (chrome-extension://egcodlnmejbejgffgmjihcknjmlmnobb/js/traffic.js:475:62)
    at subEventCallback (extensions::webRequestInternal:88:32)
    at EventImpl.dispatchToListener (extensions::event_bindings:397:22)
    at Event.publicClass.(anonymous function) [as dispatchToListener] (extensions::utils:93:26)
    at EventImpl.dispatch_ (extensions::event_bindings:379:35)
    at dispatchArgs (extensions::event_bindings:247:26)
    at dispatchEvent (extensions::event_bindings:256:7) 

Launching Chrome and going straight to the console log.
consoleerror2

@gorhill
Copy link
Owner

gorhill commented Oct 25, 2014

Ok, I removed code to hold back the request handler, I need to hold it back until all is installed. I will just do it differently his time, it was kind of clunky before. I suppose you had something net requesting while you enabled uMatrix.

@my-password-is-password
Copy link
Author

It was a request to https://www.google.com/searchdomaincheck?format=url&type=chrome.
umbreakpoint
Should it be µm.scopeFromUrl(....) instead of this? When I changed it the error went away.

@gorhill gorhill reopened this Oct 26, 2014
@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Should it be µm.scopeFromUrl(....) instead of this? When I changed it the error went away

Thanks for spotting this, good code review. I don't actually need to call this function anymore as in HTTPSB, the page hostname is always used now.

@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

I had referer-removal disabled, hence I couldn't repro the bug.

@gorhill gorhill closed this as completed Oct 26, 2014
@my-password-is-password
Copy link
Author

Saw 2 more errors in the console. I have every checkbox in Privacy and Hosts Files checked.

umrepofileerror

umrepoobsoleteerror

Using µMatrix 0.8.0.0-alpha.6.

@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

First one can happen in normal circumstance when behind-the-scene matrix blocks the requests used by uMatrix to fetch remote resource, or if there is no network connection.

Second one is yet another thing I missed to revise when I imported code from uBlock.

@gorhill gorhill reopened this Oct 26, 2014
@gorhill
Copy link
Owner

gorhill commented Oct 26, 2014

Ah yes, I miss the entry in messages.json for the first one.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants