Render process async/await error not output in console
See original GitHub issueDescribe the bug
The error happened inside the async/await cannot be output int he electron console, only can output correctly outside the async/await scope or try/catch the error and console.log manually.
To Reproduce
- After vue create testvuecli3electron & yarn & yarn electron:serve, I can see Electorn app run successfully
- Add the scripts as below in the
Home.vue
async mounted() {
console.log("before");
await console.log("await");
const a = b.c;
console.log("finish");
}
- There is no any error output in the console.(refer to below screenshot)
Expected behavior Display the same error as in browser console.
Screenshots

Environment (please complete the following information):
- OS and version: 10.12.6
- Node version: v8.11.4
- npm version: 6.4.0
- yarn version (if used): 1.9.4
- vue-cli-plugin-electron-builder version : 1.0.0-rc.4
- other vue plugins used: (no)
- custom config for vcp-electron-builder: (no)
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (10 by maintainers)
Top Results From Across the Web
async await is not working and console not returning an error
1 Answer 1 ... You don't return anything from RaceInfo , and race is undefined in callback passed to RaceInfo().then(...) ...
Read more >Common Mistakes in JavaScript Async Function Error Handling
1. Error thrown from async function is a rejected promise · 2. Async function as a param.
Read more >javascript - await does not wait for Promise to finish
So it's a bit weird. The "waiting" happens within that aync function, not your initial js function. consider this example
Read more >Async Await JavaScript Tutorial – How to Wait for a Function to ...
Failing to provide the async keyword will result in a syntax error when trying to use await inside a regular function. Because of...
Read more >Async/Await Error Handling - Beginner JavaScript - Wes Bos
Go into our playground and copy the async-await.html file and rename it to async-await-error-handling.html . Go and delete everything except for these two ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@nklayman For example in main.js
I have the same problem with Electron 3. But “only” in development mode. In production, the errors will be logged to console.
For the time being use: