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.

XHR request cancelled with electron 9 beta 9

See original GitHub issue

Describe the bug Since electron 9 can open pdf (see : https://github.com/electron/electron/issues/12337), I tried to use vue-cli-plugin-electron-builder with electron 9.

But every xhr requests are canceled in production mode, ie after running npm run electron:build and launching the app.

I know electron 9 is not supported by vue-cli-plugin-electron-builder but sending requests with axios without any vue instance is working.

NB : it’s working with electron 9 beta 5

image

Is this bug due to electron 9, vue-cli-plugin-electron-builder or both?

To Reproduce

  • Create empty vue app : vue create empty-vue-app
  • Add vue-cli-plugin-electron-builder : vue add vue-cli-plugin-electron-builder
  • Add vue-resource : npm i vue-resource
  • Make an XHR request in HelloWorld.vue

or clone this project : https://github.com/Brutia/electron-vue-empty-app (I use google URL, normally you should get a CORS error, but the request is canceled)

Replace 9.0.0-beta.9 in package.json by 9.0.0-beta.5 and it will work as expected

Expected behavior Request send and response received

Environment (please complete the following information):

  • OS and version: Windows 10
  • node version: 12.16.1
  • npm version: 6.13.4
  • yarn version (if used):
  • vue-cli-plugin-electron-builder version : 1.4.6
  • electron version: 9.0.0-beta.9
  • other vue plugins used:
  • custom config for vcp-electron-builder:
  • (if possible) link to your repo: https://github.com/Brutia/electron-vue-empty-app

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nklaymancommented, Apr 1, 2020

When I built the app I got the error. This definitely looks like an issue with electron as it only shows up for certain versions and the plugin wouldn’t cause this. You should open an issue on their repo instead.

1reaction
nklaymancommented, Mar 30, 2020

It worked fine for me on linux: image I will have to try on windows and see if that causes it. Since it works fine with a different version of electron, my guess is that it is a problem with electron, not this plugin. Try creating an electron app without this plugin and see if you get the same error.

Read more comments on GitHub >

github_iconTop Results From Across the Web

All XHR request in electron 7.0.0-beta.5 are getting cancelled?
This only happens in the production build version V7.0.0-beta.5, not in development. ... This issue got fixed in the next release of electron....
Read more >
XMLHttpRequest - Web APIs | MDN
Chrome Edge XMLHttpRequest Full support. Chrome1. Toggle history Full support. Edge12... XMLHttpRequest() constructor Full support. Chrome1. Toggle history Full support. Edge12... abort Full support. Chrome1. Toggle...
Read more >
Changelog - Cypress Documentation
Fixed a regression introduced in the Electron browser in Cypress 10.8.0 where the CYPRESS_EVERY_NTH_FRAME environment variable was not being set appropriately ...
Read more >
Recent Development in Beta Titanium Alloys for Biomedical ...
In recent years, AM-produced porous Ti alloys attracted a lot of attention; selective laser melting (SLM) and electron beam melting (EBM) stand in...
Read more >
Will backend code keep on to execute if an Ajax call is ... - Quora
If you really have to have ability to cancel requested operation, then dispatch job with delay from your endpoint, return some kind of...
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