Chrome错误:软件包无效:"CRX_VERSION_NUMBER_INVALID" [英] Chrome error: Package is invalid: 'CRX_VERSION_NUMBER_INVALID'

查看:1492
本文介绍了Chrome错误:软件包无效:"CRX_VERSION_NUMBER_INVALID"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以帮助解决此错误吗?当我尝试安装(拖放.crx文件)自定义chrome扩展程序时,它就会出现.该扩展程序可以在另一台计算机上正常工作.

Can somebody help with this error? It comes up when I'm trying to install (drag and drop .crx file) custom chrome extension. The extension is working fine on another computers.

{ "manifest_version": 2,

  "name": "Foo",
  "description": "Bar",
  "version": "2.0",

  "browser_action": {
    "default_title": "Foo",
    "default_icon": "icon.png",
    "default_popup": "popup1.html"
  },

  "background": {
    "scripts": [ "back.js" ]
  },

  "permissions": ["<all_urls>", "tabs", "activeTab", "storage"],

  "content_scripts": [
    {
      "matches": ["*://foo.bar.ms/*"],
      "js": ["websites/facebook/authorization.js"],
      "run_at": "document_start"
    },
    {
      "matches": ["*://*.facebook.com/*"],
      "js": ["jquery-3.2.1.min.js", "utils.js", "websites/facebook/to_friends.js"],
      "run_at": "document_idle",
      "exclude_matches":["*://*.facebook.com/","*://*.facebook.com/?stype*","*://*.facebook.com/login.php*","*://*.facebook.com/pg/*"]
    },
    {
      "matches": ["https://foo.bar/"],
      "js": ["jquery-3.2.1.min.js", "utils.js", "websites/facebook/waiting.js"],
      "run_at": "document_end"
    },
    {
      "matches": ["*://*.facebook.com/pg/*"],
      "js": ["jquery-3.2.1.min.js", "utils.js", "websites/facebook/to_group_posts.js"],
      "run_at": "document_idle"
    }
  ]
}

推荐答案

我已经在这里写过这是由于用于打包分发扩展的浏览器的CRX格式与您的浏览器所使用的CRX格式不同导致的.

This is caused due to the CRX format of the browser used to package the extension for distribution being different from the CRX format being used by your browser.

在Chrome 67中为使用Chrome 57的客户端打包扩展程序时遇到了这个问题.

I had this issue when packaging an extension in Chrome 67 for a client using Chrome 57.

该问题的解决方案是找出目标用户使用的Chrome版本,并将扩展程序打包为该版本.看了源代码后,Chrome 67似乎支持CRX2和CRX3格式.我认为chrome的早期版本使用的是CRX1.

The solution to the problem is to find out what version of Chrome the target user is using and package your extension with that version. Having looked at the source code it looks like Chrome 67 is supporting CRX2 and CRX3 formats. I imagine earlier versions of chrome were using CRX1.

Chrome商店分发扩展程序时,您不会遇到此问题,因为它们能够根据您的浏览器版本的要求使用CRX版本向您发送经过签名的程序包.

When an extension is distributed by the Chrome store you do not experience this problem as they are able to send you a signed package using the CRX version as required by your browser version.

这篇关于Chrome错误:软件包无效:"CRX_VERSION_NUMBER_INVALID"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆