[Bug]When I run `vue-cli-service electron:serve` in windows 10, Uncaught Error append appear and APP launch failed

See original GitHub issue

Describe the bug

When I run vue-cli-service electron:serve , something Error appear, and the electron app load failed.

Could you plz help me, I don’t know how to solve.

To Reproduce Steps to reproduce the behavior:

here is my package.json:

  "scripts": {
    "electron:serve": "vue-cli-service electron:serve",
     ...
   }

then run yarn run electron:serve. Error appear.

 INFO  Launching Electron...
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:79:9)  

Expected behavior Electron APP launch success.

Screenshots image

Environment (please complete the following information):

  • custom config for vcp-electron-builder: none
  • (if possible) link to your repo: https://github.com/emqx/MQTTX
  • terminal output from running vue info: INFO Launching Electron...

Additional context

package.json yarn.lock

ref: Same like this issue in other repo: electron-react-boilerplate/issues/2577

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

6reactions
oceanlvrcommented, Feb 7, 2021

@oceanlvr the project you linked is using a really old version of electron (v5). I think it will work if you upgrade to a more recent electron version.

vue-cli-plugin-electron-builder works in the latest version. I’m not sure what problem it caused. THANKS!

I just follow this change: vue-cli-plugin-electron-builder/releases/tag/v2.0.0-rc.4

import {
  createProtocol,
- installVueDevtools
} from 'vue-cli-plugin-electron-builder/lib'
+ import installExtension, { VUEJS_DEVTOOLS } from 'electron-devtools-installer'

... (around line 77)

-await installVueDevtools()
+await installExtension(VUEJS_DEVTOOLS)

We also facing this, not for all the developers (I think).

@baruchiro After performing the above operations, our team’s vue-cli-server can work normally, maybe you can have a try.

3reactions
nklaymancommented, Feb 26, 2021

@baruchiro See the v2.0.0 release announcement for the migration guide and major changes. Even though it’s marked as RC, it’s more stable than v1. TBH I should have published it as 2.0.0 a while ago, I’ve just been really busy with other work so this has taken a backseat for a little while.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve 'vue-cli-service' is not recognized as an internal ...
I think you are using cmd in windows. Try deleting the node_modules folder and after that run npm i from the cmd. Then...
Read more >
openssl legacy provider | The AI Search Engine You Control
I am running node v16.15 and jdk 17 Facing this problem when i use linux base system but not happening on window with...
Read more >
Easily Build Your Vue.js App For Desktop With Electron
Describe the bug When using vue-cli-plugin-electron-builder with the Electron 6.0.0, it hangs and Electron is not launched if Windows 10's dark mode is ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found