Skip to content
This repository has been archived by the owner on Nov 15, 2017. It is now read-only.

'Your list of blocked hosts' resets to zero when updating to newer version of HTTPSB #193

Closed
my-password-is-password opened this issue Feb 21, 2014 · 10 comments

Comments

@my-password-is-password
Copy link
Contributor

HTTPSB just updated to v0.8.1.3 for me from the Chrome Web Store and I had the facebook hostnames in my "Your list of blocked hosts". The 5 hostnames are still there in the textarea but it resets to "Your list of blocked hosts: 0 used out of 0" and in the matrix facebook is no longer hidden with the rest of the blacklisted.

@gorhill
Copy link
Owner

gorhill commented Feb 21, 2014

Could you look at the console of the extension (assuming you didn't reload the extension since then), and see if there is an error message?

@my-password-is-password
Copy link
Contributor Author

I already restarted my browser so the console is empty. Next update I'll check right away before doing anything else.

@my-password-is-password
Copy link
Contributor Author

I was able to reproduce this by using "Load unpacked extension..." too. I had v0.8.1.1 and just did a pull commits, then did a "Reload" in chrome://extensions/. It updated and still said "5 used out of 5". I restart the browser and it resets to zero but the 5 hostnames are still there. There were no error messages only "HTTP Switchboard> Beginning to intercept net requests at 2014-02-21T23:08:53.735Z " in the console.
I'm using Chromium 33

@gorhill
Copy link
Owner

gorhill commented Feb 21, 2014

Thanks! I was trying to figure what could be wrong with the code, but if there is a way to reproduce it that will be much easier. I will go and try it.

@gorhill
Copy link
Owner

gorhill commented Feb 21, 2014

I couldn't reproduce using the above steps. What version of Chrome are you using?

@gorhill
Copy link
Owner

gorhill commented Feb 21, 2014

Actually, I forgot that I commented out error logging for the "normal" error case of when the cached entry is not found: https://github.com/gorhill/httpswitchboard/blob/master/js/assets.js#L122. Uncommenting this will allow the error to be reported.

A requested file or directory could not be found at the time an operation was processed is normal if there are no custom list. Any other error is of interest to me. I will change the code for next release to report error at the console if it is one which is unexpected.

@my-password-is-password
Copy link
Contributor Author

It was probably the chromium build I was using. I was using Chromium 33.0.1750.0 which was the closest one I find to the current stable version (Google Chrome): 33.0.1750.117 (252094). I uncommented that line and there were nothing but the ""HTTP Switchboard> Beginning to intercept..." message after the restart.

I went back to Chromium 32.0.1700.0 and this problem doesn't exist.

I'm just going to install regular Chrome 33 and test it.

@my-password-is-password
Copy link
Contributor Author

Ok, I installed regular Chrome 33.0.1750.117 m and the problem exist.

1.) Load unpacked extension... ( i'm using commit "related to #193: report unexpected error cases" )
2.) Add the 5 facebook hostnames to "Your list of blocked hosts" and apply changes.
3.) Go to chrome://extensions/ and do a Reload of the unpacked extension
4.) Go back to "Ubiquitous rules" tab in HTTPSB

Hostnames still there in the textarea but it reset to zero for me. No errors in the console either.

blockhostreset

@gorhill
Copy link
Owner

gorhill commented Feb 23, 2014

Ok, I get it. It's easy to forget all is async, and in Chromium 33, it appears the request for cached file occurs before the request for file system.

@my-password-is-password
Copy link
Contributor Author

Thank you. Works nicely.

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