Skip to content

Commit cb31597

Browse files
authored
App shell white screen debugging (#239)
* updates logging * parses WellSeries of WellSeries correctly
1 parent edfbd39 commit cb31597

File tree

4 files changed

+14
-3
lines changed

4 files changed

+14
-3
lines changed

api/opentrons/server/main.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -623,11 +623,12 @@ def _get_unique_containers(instrument):
623623
"""
624624
unique_containers = set()
625625
for location in instrument.placeables:
626-
if isinstance(location, containers.placeable.WellSeries):
626+
while isinstance(location, containers.placeable.WellSeries):
627627
location = location[0]
628628
for c in location.get_trace():
629629
if isinstance(c, containers.placeable.Container):
630630
unique_containers.add(c)
631+
break
631632

632633
return _sort_containers(list(unique_containers))
633634

app-shell/app/main/main.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ function createWindow (windowUrl) {
3232
width: 1060,
3333
height: 750
3434
})
35-
mainWindow.loadURL(windowUrl, {"extraHeaders" : "pragma: no-cache\n"})
3635
mainWindow.on('closed', function () {
3736
mainLogger.info('Electron App window closed, quitting App')
3837
rp(windowUrl + 'exit')
@@ -41,17 +40,26 @@ function createWindow (windowUrl) {
4140
app.quit()
4241
})
4342
.catch((err) => {
43+
mainLogger.info('Received an expected error while calling exit route')
4444
mainLogger.info(err)
4545
mainWindow = null
4646
app.quit()
4747
})
4848
})
49+
mainWindow.on('unresponsive', function () {
50+
mainLogger.info('window is unresponsive, reloading')
51+
setTimeout(mainWindow.reload, 500)
52+
})
4953
// Note: Auth0 pop window does not close itself, this will this window when it pops up
5054
setInterval(() => {
5155
BrowserWindow.getAllWindows()
5256
.filter(win => win.frameName === 'auth0_signup_popup')
5357
.map(win => win.close())
5458
}, 3000)
59+
// load the UI (no caching)
60+
setTimeout(() => {
61+
mainWindow.loadURL(windowUrl, {"extraHeaders" : "pragma: no-cache\n"})
62+
}, 200)
5563
return mainWindow
5664
}
5765

@@ -81,6 +89,7 @@ function startUp () {
8189
process.on('uncaughtException', (error) => {
8290
if (process.listeners('uncaughtException').length > 1) {
8391
console.log(error)
92+
mainLogger.info('Uncaught Exception:')
8493
mainLogger.info(error)
8594
}
8695
})

app-shell/app/main/updater.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ var UPDATE_SERVER_URL = 'http://ot-app-releases-2.herokuapp.com'
77

88
function initAutoUpdater () {
99
const mainLogger = getLogger('electron-main')
10-
mainLogger.info('starting ')
10+
mainLogger.info('Initializing Audo Updater')
1111

1212
autoUpdater.on(
1313
'error',

app-shell/app/main/util.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ function waitUntilServerResponds (createWindow, windowUrl) {
99
return createWindow()
1010
})
1111
.catch((err) => {
12+
mainLogger.info('Error while pinging ' + windowUrl)
1213
mainLogger.info(err)
1314
setTimeout(() => {
1415
waitUntilServerResponds(createWindow, windowUrl)

0 commit comments

Comments
 (0)