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

Error: Invalid header: Does not start with Cr24 #1469

Closed
Zyles opened this issue Jul 10, 2021 · 9 comments
Closed

Error: Invalid header: Does not start with Cr24 #1469

Zyles opened this issue Jul 10, 2021 · 9 comments

Comments

@Zyles
Copy link

Zyles commented Jul 10, 2021

Describe the bug

Unable to compile.

$ npm run electron:serve
Uncaught (in promise) Error: Invalid header: Does not start with Cr24

  "dependencies": {
    "@keyv/sqlite": "^2.0.2",
    "@mapbox/node-pre-gyp": "^1.0.0",
    "axios": "^0.21.1",
    "axios-cache-adapter": "^2.7.0",
    "axios-retry-interceptor": "^1.1.0",
    "cachios": "^2.2.5",
    "core-js": "^3.9.0",
    "electron-oauth-helper": "^5.0.1",
    "electron-store": "^7.0.2",
    "keyv": "^4.0.3",
    "lodash": "^4.17.21",
    "material-design-icons-iconfont": "^5.0.1",
    "moment": "^2.29.1",
    "node-fetch": "^2.6.0",
    "numeral": "^2.0.6",
    "retry-axios": "^2.4.0",
    "sqlite": "^4.0.19",
    "sqlite3": "5.0.0",
    "uniqid": "^5.3.0",
    "validate.js": "^0.13.1",
    "vue": "^2.6.12",
    "vue-router": "^3.5.1",
    "vuetify": "^2.4.4",
    "vuex": "^3.6.2",
    "vuex-electron": "^1.0.3"
  },
  "devDependencies": {
    "@babel/cli": "^7.12.17",
    "@babel/core": "^7.12.17",
    "@babel/eslint-parser": "^7.12.17",
    "@babel/node": "^7.12.17",
    "@babel/plugin-proposal-optional-chaining": "^7.12.17",
    "@vue/cli-plugin-babel": "^3.12.1",
    "@vue/cli-plugin-eslint": "^3.12.1",
    "@vue/cli-service": "^3.12.1",
    "electron": "^11.3.0",
    "electron-builder": "^22.9.1",
    "eslint": "^7.20.0",
    "eslint-config-standard": "^16.0.2",
    "eslint-plugin-html": "^6.1.1",
    "eslint-plugin-import": "^2.22.1",
    "eslint-plugin-node": "^11.1.0",
    "eslint-plugin-promise": "^4.3.1",
    "eslint-plugin-vue": "^7.6.0",
    "sass": "^1.32.8",
    "sass-loader": "^10.1.1",
    "vue-cli-plugin-electron-builder": "^1.4.6",
    "vue-cli-plugin-vuetify": "^0.6.3",
    "vue-template-compiler": "^2.6.12",
    "vuetify-loader": "^1.7.2"
  }

To Reproduce

Install latest packages.

Expected behavior

Be able to compile.

@quantumdot
Copy link

I'm seeing the same error with a previously working and stable build. I executed a npm install after switching branches of my git repository. I made no changes to package.json or package-lock.json

>npm run electron:serve
Uncaught (in promise) Error: Invalid header: Does not start with Cr24
    at crxToZip (webpack:///./node_modules/unzip-crx/dist/index.js?:32:15)
    at eval (webpack:///./node_modules/unzip-crx/dist/index.js?:57:32)    
    at callHanler (webpack:///./node_modules/yaku/lib/yaku.js?:719:16)    
    at tryCatcher (webpack:///./node_modules/yaku/lib/yaku.js?:436:32)    
    at eval (webpack:///./node_modules/yaku/lib/yaku.js?:575:38)
    at flush (webpack:///./node_modules/yaku/lib/yaku.js?:478:17)
    at processTicksAndRejections (internal/process/task_queues.js:76:11)
  "dependencies": {
    "@popperjs/core": "^2.4.2",
    "@types/jszip": "^3.4.1",
    "about-window": "^1.13.4",
    "chai-as-promised": "^7.1.1",
    "core-js": "^3.6.5",
    "custom-electron-titlebar": "^3.2.2",
    "cytoscape": "^3.15.0",
    "cytoscape-avsdf": "^1.0.0",
    "cytoscape-cise": "^1.0.0",
    "cytoscape-fcose": "^2.0.0",
    "d3": "^5.16.0",
    "d3-force": "^2.0.1",
    "d3-hexbin": "^0.2.2",
    "d3-sankey": "^0.12.3",
    "deep-equal": "^2.0.3",
    "electron-store": "^5.1.1",
    "electron-updater": "^4.3.1",
    "file-type": "^14.6.1",
    "hclusterjs": "^1.3.1",
    "html-to-image": "^0.1.1",
    "jqwidgets-scripts": "^9.1.6",
    "lru-cache": "^5.1.1",
    "mime-types": "^2.1.27",
    "node-kmeans": "^1.1.9",
    "node-stream-zip": "^1.11.1",
    "object-sizeof": "^1.6.0",
    "parse-numeric-range": "^1.2.0",
    "popper.js": "^1.16.1",
    "portscanner": "^2.2.0",
    "regenerator-runtime": "^0.13.5",
    "register-service-worker": "^1.7.1",
    "save-svg-as-png": "^1.4.17",
    "threads": "^1.4.1",
    "tslint": "^6.1.2",
    "vue": "^2.6.11",
    "vue-async-computed": "^3.8.2",
    "vue-class-component": "^7.2.3",
    "vue-color": "^2.7.1",
    "vue-drag-resize": "^1.3.2",
    "vue-force-next-tick": "^1.1.0",
    "vue-headful": "^2.1.0",
    "vue-object-merge": "^0.1.8",
    "vue-property-decorator": "^8.4.2",
    "vue-resize": "^0.5.0",
    "vue-router": "^3.2.0",
    "vue-timeago": "^5.1.2",
    "vue-typed-mixins": "^0.2.0",
    "vue-unique-id": "^3.1.0",
    "vuedraggable": "^2.23.2",
    "vuex": "^3.4.0"
  },
  "devDependencies": {
    "@linusborg/vue-simple-portal": "^0.1.4",
    "@types/bootstrap": "^4.5.0",
    "@types/chai": "^4.2.11",
    "@types/d3": "^5.7.2",
    "@types/file-saver": "^2.0.1",
    "@types/mocha": "^7.0.2",
    "@vue/cli-plugin-babel": "^4.4.1",
    "@vue/cli-plugin-e2e-nightwatch": "^4.4.1",
    "@vue/cli-plugin-pwa": "^4.4.1",
    "@vue/cli-plugin-typescript": "^4.4.1",
    "@vue/cli-plugin-unit-mocha": "^4.4.1",
    "@vue/cli-service": "^4.4.1",
    "@vue/test-utils": "^1.0.3",
    "bootstrap-vue": "^2.15.0",
    "canvas": "^2.5.0",
    "chai": "^4.2.0",
    "chromedriver": "^83.0.0",
    "devtron": "^1.4.0",
    "electron": "^9.4.0",
    "electron-log": "^4.2.0",
    "geckodriver": "^1.19.1",
    "lodash": "^4.17.21",
    "lodash.defaultsdeep": "^4.6.1",
    "sass": "^1.26.5",
    "sass-loader": "^8.0.2",
    "selenium-server": "^3.141.59",
    "threads-plugin": "^1.3.1",
    "typescript": "^3.9.3",
    "vue-cli-plugin-electron-builder": "^1.4.6",
    "vue-devtools": "^5.1.3",
    "vue-template-compiler": "^2.6.11"
  }

@aretw0
Copy link

aretw0 commented Jul 22, 2021

Could be the same as this?

@nklayman
Copy link
Owner

Seems like this is a bug in electron-devtools-installer that was fixed in version 3.1.1. @Zyles can you upgrade the version of electron-devtools-installer in your package.json and confirm it fixes the issue?

@Zyles
Copy link
Author

Zyles commented Jul 28, 2021

Seems like this is a bug in electron-devtools-installer that was fixed in version 3.1.1. @Zyles can you upgrade the version of electron-devtools-installer in your package.json and confirm it fixes the issue?

It did not. I also get other errors on another machine after installing 3.1.1:

> electron-builder install-app-deps

  • electron-builder  version=22.9.1
  • rebuilding native dependencies  dependencies=sqlite3@5.0.0, sqlite3@4.2.0 platform=win32 arch=x64
  ⨯ cannot execute  cause=exit status 1
                    out=
    > sqlite3@4.2.0 install E:\project\node_modules\@keyv\sqlite\node_modules\sqlite3
    > node-pre-gyp install --fallback-to-build

errorOut=node-pre-gyp WARN Using request for node-pre-gyp https download
    node-pre-gyp WARN Tried to download(403): https://mapbox-node-binary.s3.amazonaws.com/sqlite3/v4.2.0/electron-v11.3-win32-x64.tar.gz
    node-pre-gyp WARN Pre-built binaries not found for sqlite3@4.2.0 and electron@11.3.0 (electron-v11.3 ABI, unknown) (falling back to source compile with node-gyp)
    gyp ERR! build error
    gyp ERR! stack Error: `C:\Program Files (x86)\MSBuild\14.0\bin\MSBuild.exe` failed with exit code: 1

Seems they removed sqlite3 from the download. Not sure how to progress?

@Zyles
Copy link
Author

Zyles commented Jul 31, 2021

Updated nodejs to latest and the devtools-installer and now I am able to compile.

@Zyles
Copy link
Author

Zyles commented Jul 31, 2021

The error "Error: Invalid header: Does not start with Cr24" remains on my laptop and unable to compile, same repo.

@nklayman
Copy link
Owner

@Zyles make sure the repo is up to date on your laptop, then rm -rf node_modules and reinstall dependencies. I tried with a fresh project and it works fine, so I don't think there's a problem with this plugin. If you can't get it to work on your laptop, you'll need to share the repo with me so I can debug further.

@cjbeattie
Copy link

@Zyles did you manage to fix this? I am getting the same issue with electron-devtools-installer version 3.2.0.

@kenny-reyes
Copy link

kenny-reyes commented Aug 23, 2023

Also for me.
I already tried everything

Edited:
Maybe this will be useful for you @cjbeattie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants