Monday, 13 March 2017

Why does Electron/React app freeze and without sending errors to the log?

I have an Electron/React app with a load screen. The vast majority of the time when I make a mistake the app will send errors to Node or the console and I can debug. But with certain mistakes the app will freeze on the load screen with no logging at all. For example, if I add

const t = 5;
const t = 5;

to src/renderer/app/actiontypes.js I do not get the usual "Uncaught SyntaxError" message and I have to read very carefully through code to figure out what's going wrong.

Here is how the app loads:

main.js

app.on('ready', async () => {
    await installExtensions();
    createLoadingScreen();
    ipcMain.on('robot-load-finished', () => {
        mainWindow.show();
    ...

index.js

function run() {
    ipcRenderer.send('robot-load-finished');
    ...
loadRobotModels().then(run);

Does anyone why this is occurring? Thank you.



via Ben S

No comments:

Post a Comment