This article mainly explains why the chrome kernel plug-in development reports an error: Unchecked runtime.lastError: Extensions using event pages or Service Workers must pass an id parameter to chrome.contextMenus.create The reasons and solutions.
Date: June 10, 2023
Author: Ren Congcong
Error phenomenon:
To view the error reporting path, click the following entry on the Google Chrome extension interface to pop up!
Error message:
Related reasons and solutions
Reason 1. The plug-in is a right-click menu function type, and the declared parameters are missing
Explanation: When you make the right-click menu, you did not declare the permissions in the json file, or did not fill in the complete parameters in the bg.js file.
Solution:
"permissions": [