Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extch 56 bad url crash fix #132

Open
wants to merge 5 commits into
base: EXTCH-23-update-stele-packages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/main/windows/handleWindowLoadFail.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,20 @@ const handleWindowLoadFail = (window, store, logger) => {
if (
errorDescription === 'ERR_INVALID_URL'
|| errorDescription === 'ERR_NAME_NOT_RESOLVED'
|| errorDescription === 'ERR_CONNECTION_REFUSED'
|| errorDescription === 'ERR_ADDRESS_UNREACHABLE'
) {
const configuredURL = _.get(store.get('kiosk'), 'displayHome');
logger.info(
`App - Stele is configured to load an invalid URL(${configuredURL}) - ${errorDescription}:${errorCode}`,
);
mainWindowNavigateSettings(window, store);
mainWindowNavigateSettings(window, store, '/settings');
} else if (errorCode === -3) {
// This errorCode is a false positive.
// A 'did-finish-load' event will fire immediately after 'did-fail-load'.
// This happens while using a hot-reload development server.
// https://github.com/electron/electron/issues/4396
logger.info('App - Ignoring "did-fail-load" error code: -3');
} else {
logger.error(`App - Unknown web contents load failure - ${errorDescription}:${errorCode}`);
app.quit();
Expand Down