makebrainwaves / BrainWaves

An easy-to-use platform for EEG experimentation in the classroom
MIT License
60 stars 26 forks source link

Error when recording Emotiv data #103

Closed teonbrooks closed 4 years ago

teonbrooks commented 4 years ago

just noticed that we are running to an error when we were trying to record data. i didn't notice this when I was doing quality assurance because I stopped right before that step.

cortex.js:39 Uncaught Error: Missing required params for injectMarker: session
    at new JSONRPCError (http://localhost:1212/dist/main.entry.js:42731:114)
    at Cortex._this2.handleError.error [as handleError] (http://localhost:1212/dist/main.entry.js:42768:13)
    at Cortex.(anonymous function) [as injectMarker] (http://localhost:1212/dist/main.entry.js:42886:23)
    at module.exports../app/utils/eeg/emotiv.js.exports.injectEmotivMarker (http://localhost:1212/dist/main.entry.js:43101:10)
    at timeline (http://localhost:1212/dist/main.entry.js:3957:193)
    at Object.on_start (http://localhost:1212/dist/main.entry.js:44267:15)
    at g (webpack://renderer/./node_modules/jspsych-react/dist/jspsych-react.js?:1:8355)
    at y (webpack://renderer/./node_modules/jspsych-react/dist/jspsych-react.js?:1:6622)
    at Object.i.finishTrial (webpack://renderer/./node_modules/jspsych-react/dist/jspsych-react.js?:1:12789)
    at end_trial (http://localhost:1212/dist/main.entry.js:44676:29)

cc: @jdpigeon

teonbrooks commented 4 years ago

got the session problem fixed but now here's the error:

cortex.js:39 Uncaught (in promise) Error: A record must be started for a marker to be injected.
    at new JSONRPCError (http://localhost:1212/dist/main.entry.js:42731:114)
    at Object.requests.(anonymous function) (http://localhost:1212/dist/main.entry.js:42867:34)
    at Cortex._onmsg (http://localhost:1212/dist/main.entry.js:42793:28)
    at WebSocket.onMessage (webpack://renderer/./node_modules/ws/lib/event-target.js?:120:16)
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
    at Receiver.receiverOnMessage (webpack://renderer/./node_modules/ws/lib/websocket.js?:720:20)
    at emitOne (events.js:116:13)
    at Receiver.emit (events.js:211:7)
    at Receiver.dataMessage (webpack://renderer/./node_modules/ws/lib/receiver.js?:414:14)
JSONRPCError @ cortex.js:39
requests.(anonymous function) @ cortex.js:165
_onmsg @ cortex.js:94
onMessage @ event-target.js:120
emitOne @ events.js:116
emit @ events.js:211
receiverOnMessage @ websocket.js:720
emitOne @ events.js:116
emit @ events.js:211
dataMessage @ receiver.js:414
getData @ receiver.js:346
startLoop @ receiver.js:133
_write @ receiver.js:69
doWrite @ _stream_writable.js:387
writeOrBuffer @ _stream_writable.js:373
Writable.write @ _stream_writable.js:290
socketOnData @ websocket.js:795
emitOne @ events.js:116
emit @ events.js:211
addChunk @ _stream_readable.js:263
readableAddChunk @ _stream_readable.js:250
Readable.push @ _stream_readable.js:208
onread @ net.js:594
cortex.js:39 Uncaught (in promise) Error: A record must be started for a marker to be injected.
    at new JSONRPCError (http://localhost:1212/dist/main.entry.js:42731:114)
    at Object.requests.(anonymous function) (http://localhost:1212/dist/main.entry.js:42867:34)
    at Cortex._onmsg (http://localhost:1212/dist/main.entry.js:42793:28)
    at WebSocket.onMessage (webpack://renderer/./node_modules/ws/lib/event-target.js?:120:16)
    at emitOne (events.js:116:13)
    at WebSocket.emit (events.js:211:7)
    at Receiver.receiverOnMessage (webpack://renderer/./node_modules/ws/lib/websocket.js?:720:20)
    at emitOne (events.js:116:13)
    at Receiver.emit (events.js:211:7)
    at Receiver.dataMessage (webpack://renderer/./node_modules/ws/lib/receiver.js?:414:14)
jdpigeon commented 4 years ago

Add createRecord call when we start a recording on the Collect screen https://emotiv.gitbook.io/cortex-api/records/createrecord