Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to add the new rule. #3

Open
ForeverFloating opened this issue Jan 19, 2018 · 3 comments
Open

Failed to add the new rule. #3

ForeverFloating opened this issue Jan 19, 2018 · 3 comments
Labels

Comments

@ForeverFloating
Copy link

I added 227 websites to PawBlock, but once I tried adding another site, it gave me the error "Failed to add the new rule" at the top of the options page for the extension. I can add any site if the number of total sites is under 227, but I cannot seem to resolve the issue without deleting already blocked websites from the list to reduce the total number below 227.

@dguo
Copy link
Owner

dguo commented Jan 21, 2018

Hi, thanks for reporting. I'll try to reproduce the issue and get to the bottom of it.

@dguo
Copy link
Owner

dguo commented Jan 22, 2018

This is happening due to Chrome limiting the amount of storage space available for each key in the storage object (where the extension persists data).

https://stackoverflow.com/questions/13373187/can-i-increase-quota-bytes-per-item-in-chrome

It makes sense that there is an overall limit, but I'm curious as to why they would limit the amount of space per key. Firefox doesn't seem to do that.

The workaround seems to be to split it into multiple keys. I'd also have to only do it on Chrome because the constant (chrome.storage.sync.QUOTA_BYTES_PER_ITEM) is only available there. It seems like a messy but worthwhile solution since wanting to add more than 227 rules is reasonable.

I'll try to get to it within the next week or two.

@dguo
Copy link
Owner

dguo commented Jan 22, 2018

Note to self: I should also improve the error message. There is a hard limit to the total space available, and the user should be informed that they can't add any more due to lack of space.

@dguo dguo added the bug label Jan 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants