electron: 3.0 regression: spurious did-fail-load(net::ERR_ABORTED) emits for successful form posts
- Electron Version: v3.0.0-beta.4 x86
- Operating System (Platform and Version): win7 x64 sp1
- Last known working Electron version: 2.0.7 x86
Expected Behavior no did-fail-load events for successful posts
Actual behavior did-fail-load events for successful posts here’s the output from the repro steps
storages cleared
did-start-navigation: file:///C:/tmp/form_post.html
did-navigate: 200 file:///C:/tmp/form_post.html
did-finish_load
did-start-navigation: http://example.org/
did-navigate: 200 http://example.org/
did-fail-load:
{ errorCode: -3,
errorDescription: '',
validatedURL: 'http://example.org/' }
did-finish_load
To Reproduce
run
electron test_app.js file://path_to/form_post.html
test_app.js
'use strict';
//debugger;
const {app, BrowserWindow, session} = require('electron');
let brWin;
app.on('ready', async () => {
await new Promise(resolve => session.defaultSession.clearStorageData({storages: ['cookies', 'localstorage', 'cachestorage']}, () => {
console.log('storages cleared\n');
resolve();
}));
brWin = new BrowserWindow({
width: 1366,
height: 768,
webPreferences: {
nodeIntegration: false,
},
});
brWin.webContents.on('did-start-navigation', (event, url, isInPlace, isMainFrame, frameProcessId, frameRoutingId) => {
if (isMainFrame && !isInPlace)
console.log('did-start-navigation: %s\n', url);
});
brWin.webContents.on('did-navigate', (event, url, httpResponseCode, httpStatusText) => {
console.log('did-navigate: %i %s\n', httpResponseCode, url);
});
brWin.webContents.on('did-fail-load', (event, errorCode, errorDescription, validatedURL, isMainFrame, frameProcessId, frameRoutingId) => {
if (isMainFrame)
console.log('did-fail-load:\n%O\n', {errorCode, errorDescription, validatedURL});
});
brWin.webContents.on('did-finish-load', event => {
console.log('did-finish_load\n');
});
brWin.loadURL(process.argv[2]);
//brWin.webContents.openDevTools({mode: 'right'});
});
app.on('window-all-closed', () => app.exit());
form_post.html
<form action="http://example.org/" method="post">
<input type="submit" name="submit">
</form>
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (8 by maintainers)
Getting did-fail-load on 3.0.X to 5.0.2 when I run http POST and receive 303 redirection. I fixed it by downgrading to version 2.0.18