Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9078945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T19:44:27+00:00 2026-06-16T19:44:27+00:00

tl;dr: Sync error about QUOTA_BYTES_PER_ITEM, but my item is small, need help figuring out

  • 0

tl;dr: Sync error about QUOTA_BYTES_PER_ITEM, but my item is small, need help figuring out what’s wrong with it.

So I’m getting this error on a Google Chrome Extension that I don’t think it makes much sense, since what I’m trying to save doesn’t get bigger than 400 bytes (serialized, which is bigger than the same in a JSON string), and considering QUOTA_BYTES_PER_ITEM is 4096, it’s far from that limit.

Either I’m calculating something wrong (most likely), or I’m doing something wrong (not improbable!).

You can see the code of my extension and install it from web store

The part that is important for this problem is the following (CoffeeScript):

# Object: Default settings
defaultSettings =
    type: 'single'
    chars: 14
    howmany: 1
    security:
        lowercase: true
        uppercase: true
        special: true
        punctuation: true
        readable: false

# Object: Current settings
paGenSettings = defaultSettings

# Function: Save Settings
saveSettings = (settings, notify) ->
    if validateSettings settings, true
        # Save settings using the Chrome extension storage API. Try sync, fallback to local
            window.chrome.storage.sync.set { settings: settings }, () ->
                if chrome.runtime.lastError && chrome.runtime.lastError.message && chrome.runtime.lastError.message.indexOf( 'MAX_WRITE_OPERATIONS_PER_HOUR' ) != -1
                    window.chrome.storage.local.set { settings: settings }, () ->
                        paGenSettings = settings

                        if notify
                            showNotification window.chrome.i18n.getMessage( 'settingsSaved' )

                        applySettings()

                        true
                else
                    paGenSettings = settings

                    if notify
                        showNotification window.chrome.i18n.getMessage( 'settingsSaved' )

                    applySettings()

                    true
    true
    else
        false

# Function: Get Settings
getSettings = () ->
    # Get settings using the Chrome extension storage API. Try sync, fallback to local
    window.chrome.storage.sync.get 'settings', (items) ->
        if items.settings
            settings = extend( paGenSettings, items.settings)

            if validateSettings settings, false
                paGenSettings = settings

                applySettings()
            true
        else
            window.chrome.storage.local.get 'settings', (items) ->
                if items.settings
                    settings = extend( paGenSettings, items.settings)

                    if validateSettings settings, false
                        paGenSettings = settings
                applySettings()
            true

If you inspect it, when you save the settings or generate a password (also saves settings), you’ll see the following error popping up:

Error during storage.set: QUOTA_BYTES_PER_ITEM quota exceeded.

I’ve made it fallback to local storage, but I really want it to sync the settings.

So, if this just won’t work, I’ll change the get/set code to use a different key/value for each setting, instead of an object, but I don’t think it makes much sense, as this sync feature is advertised to support objects (and this one is small), so I’m hoping I’m just doing something wrong.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T19:44:27+00:00Added an answer on June 16, 2026 at 7:44 pm

    So I sorted it out.

    The main issue was an “infinite loop” (n00b) I had because of the onChanged listener for chrome.storage ( https://developer.chrome.com/extensions/storage.html#event-onChanged ), where I’d save the settings every time there was a change detected.

    I didn’t read the documentation carefully enough and thought this was to “listen” for changes in the settings that came, for example, from a sync (but it listens to any change), and since I can get the settings from sync, I don’t even need it.

    Removing that listener fixed the problem.

    The new version of the extension (1.0.4) is bug-free as far as I’m aware.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I can't seem to figure out why this falls into a loop after getting
I randomly get this error, and I can't figure out a way to fix
Other than Active Sync not working, are there any other limitations that I need
Larry Osterman writes about a real error found in Microsoft's code, the offending code
I am getting a really strange error from ActiveResource. I have a method that
I'm getting the following error when trying to add files to my mercurial repo.
Creating a custom sync() method in backbone. I would like to do this the
wait_fences: failed to receive reply: 10004003 I continue to get this error. It happens
I am new to Sync Framework. This is using version 2.1 My project involves
This is the error I get when I am first installing Devise and running

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.