Tomo: Error with the sample stage overview
attn @valentin.valls
I got this error on the sample stage overview view while the tiling sequence is running during the rotation (or flat scan) between the two tiling scans:
TypeError: detectorState is undefined
dispatchDetectorFlatUpdate/<
src/providers/tomo.ts:286
283 | // FIXME: Would be better to replace that by a timestamp or a ref to the scanid/frame_no
284 | const detectorState =
285 | state().tomo.ns_detectors.default.results[payload.detector_id];
> 286 | const flat = detectorState.flat !== undefined ? detectorState.flat : -1;
| ^ 287 | const detectors =
288 | this.getNamespace<TomoDetector>('detectors').getInstance('default');
289 | detectors.updateLocal({
middleware/</<
node_modules/redux-thunk/es/index.js:16
dispatch
https://localhost:3000/samplestageoverview:3665:80
dispatch
src/Actions.js:123
120 | if (!(ty in this._actions)) throw new Error(`${ty} not registered on ${this.key} Actions`)
121 | const fn = `dispatch${upperFirst(camelCase(ty))}`
122 | if (this[fn]) {
> 123 | return this.store.dispatch(this[fn](payload))
| ^ 124 | }
125 | const action = this._actions[ty]
126 | if (action.async) return this.store.dispatch(this.asyncAction(ty, payload))
Provider/this.dispatch
src/index.js:75
72 | // dispatch an action
73 | dispatch = (action, payload) => {
74 | if (this.actions) {
> 75 | return this.actions.dispatch(action, payload)
| ^ 76 | }
77 |
78 | return null
onNewFlat
src/messagehandler/TomoMessageHandler.js:47
44 | }
45 |
46 | onNewFlat(data) {
> 47 | tomo.dispatch('DETECTOR_FLAT_UPDATE', data);
| ^ 48 | }
49 |
50 | onNewDark(data) {
./node_modules/component-emitter/index.js/Emitter.prototype.emit
node_modules/component-emitter/index.js:145
emitEvent
node_modules/socket.io-client/build/socket.js:264
onevent
node_modules/socket.io-client/build/socket.js:251
onpacket
node_modules/socket.io-client/build/socket.js:215
./node_modules/component-emitter/index.js/Emitter.prototype.emit
node_modules/component-emitter/index.js:145
ondecoded
node_modules/socket.io-client/build/manager.js:204
./node_modules/component-emitter/index.js/Emitter.prototype.emit
node_modules/component-emitter/index.js:145
add
node_modules/socket.io-parser/dist/index.js:117
ondata
node_modules/socket.io-client/build/manager.js:196
./node_modules/component-emitter/index.js/Emitter.prototype.emit
node_modules/component-emitter/index.js:145
onPacket
node_modules/engine.io-client/lib/socket.js:401
setTransport/<
node_modules/engine.io-client/lib/socket.js:210
./node_modules/component-emitter/index.js/Emitter.prototype.emit
node_modules/component-emitter/index.js:145
onPacket
node_modules/engine.io-client/lib/transport.js:105
onData
node_modules/engine.io-client/lib/transport.js:98
addEventListeners/this.ws.onmessage
node_modules/engine.io-client/lib/transports/websocket.js:113