question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot Launching Electron... Failed to fetch extension

See original GitHub issue

I create a new vue project using vue cli 3:vue create pc-client , then vue add electron-builder, but fail to launch app by yarn serve:electron. Any helps and advice for me? thanks.

Describe the bug cannot launch an electron app sucssefully when run yarn serve electron

To Reproduce

$ vue create pc-client   #So the code is generated by vue cli by default. I don't modify them.
$ cd my pc-client
$ vue add electron-builder
$ yarn serve:electron

even after try:

yarn add electron-devtools-installer -D
#and 
vue invoke electron-builder

It still fails.

Expected behavior launch electron app normally

Screenshots

Environment (please complete the following information):

  • OS and version: macOS Sierra V10.12.4
  • Node version: v8.11.3
  • npm version: 5.6.0
  • yarn version (if used): 1.7.0
  • vue-cli-plugin-electron-builder version : “^1.0.0-rc.1”
  • other vue plugins used:
  • custom config for vcp-electron-builder:
  • (if possible) link to your repo:
  • my package.json and other all configs are default:
  "name": "pc-client",
  "version": "0.1.0",
  "private": true,
  "scripts": {
    "serve": "vue-cli-service serve",
    "build": "vue-cli-service build",
    "lint": "vue-cli-service lint",
    "test:unit": "vue-cli-service test:unit",
    "test:e2e": "vue-cli-service test:e2e",
    "build:electron": "vue-cli-service build:electron",
    "serve:electron": "vue-cli-service serve:electron",
    "postinstall": "electron-builder install-app-deps"
  },
  "dependencies": {
    "vue": "^2.5.17",
    "vue-router": "^3.0.1",
    "vuex": "^3.0.1"
  },
  "devDependencies": {
    "@vue/cli-plugin-babel": "^3.0.1",
    "@vue/cli-plugin-e2e-cypress": "^3.0.1",
    "@vue/cli-plugin-eslint": "^3.0.1",
    "@vue/cli-plugin-unit-mocha": "^3.0.1",
    "@vue/cli-service": "^3.0.1",
    "@vue/test-utils": "^1.0.0-beta.20",
    "chai": "^4.1.2",
    "electron": "^2.0.2",
    "electron-devtools-installer": "^2.2.4",
    "node-sass": "^4.9.0",
    "sass-loader": "^7.0.1",
    "vue-cli-plugin-electron-builder": "^1.0.0-rc.1",
    "vue-template-compiler": "^2.5.17"
  },
  "main": "dist_electron/bundled/background.js"
}

Additional context

$ yarn serve eclectron

//… App running at:

Note that the development build is not optimized. To create a production build, run yarn build.

Bundling main process:

Hash: f66bb9d91e4b7005676d Version: webpack 4.17.1 Time: 1154ms Built at: 2018-09-02 21:33:03 Asset Size Chunks Chunk Names background.js 641 KiB background [emitted] background Entrypoint background = background.js [./node_modules/rimraf/rimraf.js] 8.78 KiB {background} [built] [./node_modules/unzip-crx/dist/index.js] 2.33 KiB {background} [built] [./node_modules/vue-cli-plugin-electron-builder/lib/createProtocol.js] 1.22 KiB {background} [built] [./node_modules/vue-cli-plugin-electron-builder/lib/installVueDevtools/utils.js] 1.28 KiB {background} [built] [0] multi ./src/background.js 28 bytes {background} [built] [./node_modules/vue-cli-plugin-electron-builder/lib/index.js] 132 bytes {background} [built] [./node_modules/vue-cli-plugin-electron-builder/lib/installVueDevtools/downloadChromeExtension.js] 1.81 KiB {background} [built] [./node_modules/vue-cli-plugin-electron-builder/lib/installVueDevtools/index.js] 1.6 KiB {background} [built] [./src/background.js] 2.1 KiB {background} [built] [electron] external “electron” 42 bytes {background} [built] [fs] external “fs” 42 bytes {background} [built] [https] external “https” 42 bytes {background} [built] [module] external “module” 42 bytes {background} [built] [path] external “path” 42 bytes {background} [built] [url] external “url” 42 bytes {background} [built] + 108 hidden modules

Launching Electron… Failed to fetch extension, trying 4 more times Failed to fetch extension, trying 3 more times Failed to fetch extension, trying 2 more times Failed to fetch extension, trying 1 more times Failed to fetch extension, trying 0 more times (node:8472) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: net::ERR_CONNECTION_TIMED_OUT (node:8472) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
hezhongfengcommented, Dec 17, 2018

@Huqin-China I have confirmed, the reason is the Firewall. 翻墙就好了

2reactions
nklaymancommented, Sep 2, 2018

I don’t get the error when I tried it, so it is probably an issue with your system only. In a working electron instance, run require('electron').remote.app.getPath('userData') in the console. Delete the extensions folder inside of the path returned. Then, try it again.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Vue Devtools Not Loading With Vue Electron Builder
I'm creating an Electron / Vue application, and I cannot get the Vue Devtools ... "electron-builder install-app-deps", "start": "electron .
Read more >
首次启动vue-electron APP时等待很久 - 博客园
INFO Launching Electron... Failed to fetch extension, trying 4 more times Failed to fetch extension, trying 3 more times Failed to fetch ......
Read more >
DevTools Extension - Electron
Electron supports Chrome DevTools extensions, which can be used to extend the ability of Chrome's developer tools for debugging popular web frameworks.
Read more >
electron-fetch | Yarn - Package Manager
A light-weight module that brings window.fetch to electron's background process ... Electron's net module to run browser-specific Fetch polyfill, why not go ...
Read more >
Common Issues | Vue CLI Plugin Electron Builder
electron :serve freezes on Launching Electron... Often this issue is caused when Vue Devtools fails to install. This may happen if Vue Devtools...
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