Error in invocation of storage.set(object items, optional function callback):No matching signatures.
The Problem
The error message 'Error in invocation of storage.set(object items, optional function callback):No matching signatures' occurs when there is an issue with how you're accessing or manipulating data stored in Chrome's storage system. This problem specifically affects users who have created a Google Chrome extension and are experiencing issues after updating to Chrome 73.This error can be frustrating for developers as it prevents them from successfully deploying their extensions, which may contain critical functionality that relies on this feature.
⚠️ Common Causes
The primary cause of this error is likely due to changes made in the storage API of Google Chrome. Starting with version 73, there were significant updates to how the storage API works, including a change in the way it handles the `set` method. This update may have broken your extension's code that relies on the old behavior.An alternative cause could be a mismatch between the version of the storage API used by your extension and the version of Chrome installed on the user's system.
🔧 Proven Troubleshooting Steps
Updating to the latest version of the storage API
Step 1: Open the Chrome extensions page in your browser and navigate to the 'More tools' menu.Step 2: Click on the 'Developer mode' option, which will enable developer tools for your extension.Step 3: Locate the `storage` section in the `manifest.json` file of your extension and update it to use the latest version of the storage API (version 4 or later).Step 4: Save the changes to the `manifest.json` file and reload the extension. This should resolve any issues related to the old storage API behavior.
Using a polyfill for older versions of Chrome
Step 1: Create a new script in your extension's directory that will serve as a polyfill for the older version of the storage API.Step 2: In this script, you'll need to import and use the `chrome.storage` module from an older version of Chrome (e.g., Chrome 72).Step 3: You can do this by using the `chrome.storage.local` or `chrome.storage.sync` objects, which are compatible with older versions of Chrome.Step 4: In your extension's code, use the polyfill script to access and manipulate data stored in Chrome's storage system. This should allow your extension to work even on older versions of Chrome.
💡 Conclusion
To resolve the 'Error in invocation of storage.set(object items, optional function callback):No matching signatures' error, you can try updating your extension to use the latest version of the storage API or using a polyfill for older versions of Chrome. By following these steps and making the necessary changes to your extension's code, you should be able to successfully deploy your extension on newer versions of Chrome.
Full step-by-step guide with screenshots: Read the complete fix here
Found this helpful? Check out more verified tech fixes at TechFixDocs
Top comments (0)