Problems reading data from device after sampling

Has anyone else experienced that the sampling fails because of a timeout, when trying to sample audio through the Nordic Semiconductor nRF5340-DK with the X-NUCLEO-IKS02A1 shield?

Sometimes it works just fine, but quite often it fails when Edge Impulse is reading data from the device. And it doesn’t seem to be any consistency in how many percent the reading reaches before failing. It fails at different percentages every time.

In addition to this, there are a few times where the upload seems to have finished, but then the sample doesn’t appear in the list of collected data.

Anyone with an idea of why this is happening?

Hello!

Could you make sure that the pins from the nRF5340-DK doesn’t touch the X-NUCLEO-IKS02A1 shield?

It can cause some issues while running the firmware.

I’ve tried both keeping a distance between the DK and the shield to make sure the pins don’t touch the shield, and to make a paper insulator as described in this post.

In both cases the problem seems to persist.

Hello @mathias,

Are you using the Web Serial tool from the studio or the CLI daemon?

The first time I added the DK I used the CLI daemon. After that I’ve mostly been using the web serial tool to reconnect the DK, but I’ve also tried the CLI daemon.

The same problems appear both places.

Attached you find one of the errors seen online:
SamplingFailed

Hi @mathias,

I forward your issue with our core engineering team as I do not have a straight answer at the moment.
Regards,

Louis

Thank you very much, @louis!

Hi @mathias my guess would be a faulty (or fault’ish) USB cable so try that first. We can get some more info by looking at the raw debug logs. Could you do the following:

  1. Update the Edge Impulse CLI to v1.13.12 or up (npm install -g edge-impulse-cli@latest).

  2. Run:

    edge-impulse-run-impulse --raw
    
  3. You now have a debug shell, run AT+HELP to verify.

  4. Start a sampling session from here:

First configure the device (e.g. 5000 ms. request):

> AT+SAMPLESETTINGS=idle,16,5000
OK

Then start the session:

> AT+SAMPLESTART=Accelerometer
Sampling settings:
        Interval: 16 ms.
        Length: 5000 ms.
        Name: idle
        HMAC Key: please-set-me
        File name: /fs/idle
Samples req: 312
Starting in 2000 ms... (or until all flash was erased)
Try to write 268 bytes
sample_interval_real_us = 14802 us
Sampling...
Done sampling, total bytes collected: 312
[1/1] Uploading file to Edge Impulse...
Not uploading file, not connected to WiFi. Used buffer, from=0, to=5261.
[1/1] Uploading file to Edge Impulse OK (took 200 ms.)
OK
> 

Then fetch the data (use the ‘Used buffer, from’ data from the previous line):

> AT+READBUFFER=0,5261
... Lots of data (encoded as base64, finally should print '>' again on a new line

Thank you for your response, @janjongboom!

Below you find the output when running the impulse in the debug shell, using the microphone (not the accelerometer as you mentioned above).

>AT+SAMPLESETTINGS=idle,16,5000  
AT+SAMPLESETTINGS=idle,16,5000
OK
>AT+SAMPLESTART=Microphone
AT+SAMPLESTART=Microphone
Sampling settings:
        Interval: 16 ms.
        Length: 5000 ms.
        Name: idle
        HMAC Key: 7e8592acc7b0c9d6affcbc190d5544d6
        File name: /fs/idle
Starting in 0 ms... (or until all flash was erased)
Sampling...
Done sampling, total bytes collected: 624
[1/1] Uploading file to Edge Impulse...
Not uploading file, not connected to WiFi. Used buffer, from=0, to=864.
[1/1] Uploading file to Edge Impulse OK (took 200 ms.)
OK
>AT+READBUFFER=0,864
AT+READBUFFER=0,864
o2lwcm90ZWN0ZWSiY3ZlcmJ2MWNhbGdlSFMyNTZpc2lnbmF0dXJleEA0NjU1MTkzNjhiY2YwNmUxMGVlYWJhYzNhMjA1OTUyNzVlZmEyOWM5MGQ4MzUzYjYwNTQzODNlZjM5ZTZjOGM4Z3BheWxvYWSla2RldmljZV9uYW1lcTUzOkE2OkNGOkFFOkNFOjBEa2RldmljZV90eXBlbU5SRjUzNDBfREsgICBraW50ZXJ2YWxfbXP5LABnc2Vuc29yc4GiZG5hbWVlYXVkaW9ldW5pdHNjd2F2ZnZhbHVlc59uUmVmLUJJTkFSWS1pMTb/DQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwA
>

The model hasn’t been modified to perform very well yet, but I would anyhow expect that data was recorded. Which doesn’t seem to be the case as of now.

And this is what it typically looked like when it failed trying to upload a sample. This attempt was made with a different example, but same kind (the one from a MicroBit v2), of USB cable.

[SER] Configured upload settings
[SER] Sampling started
[SER] Sampling done
[SER] Device not connected to WiFi directly, reading from buffer (bytes 0 - 320240, expecting to read ~426986 bytes...
[SER] Reading 2% complete...
[SER] Reading 4% complete...
[SER] Reading 7% complete...
[SER] Reading 10% complete...
[SER] Reading 12% complete...
[SER] Reading 15% complete...
[SER] Reading 17% complete...
[SER] Reading 20% complete...
[SER] Reading 23% complete...
[SER] Reading 25% complete...
[SER] Reading 28% complete...
[SER] Reading 31% complete...
[SER] Reading 33% complete...
[SER] Reading 36% complete...
[SER] Reading 38% complete...
[SER] Reading 41% complete...
[SER] Reading 44% complete...
[SER] Reading 46% complete...
[SER] Reading 49% complete...
[SER] Reading 51% complete...
[SER] Reading 54% complete...
[SER] Reading 57% complete...
[SER] Reading 59% complete...
[SER] Reading 62% complete...
[SER] Reading 64% complete...
[SER] Reading 67% complete...
[SER] Reading 70% complete...
[SER] Reading 72% complete...
[SER] Reading 75% complete...
[SER] Reading 77% complete...
[SER] Reading 80% complete...
[SER] Reading 83% complete...
[SER] Reading 85% complete...
[SER] Reading 88% complete...
[SER] Reading 91% complete...
[SER] Reading 93% complete...
[WS ] Failed to sample data Timeout when waiting for >  (timeout: 130000) AT+READBUFFER=0,320240

@mathias Can you change the first line to

AT+SAMPLESETTINGS=idle,0.0625,5000

For microphone data? You’d expect some 300K bytes. Wonder if a hard fault or something happens.

Now I got it that “idle” was the label from the accelerometer example(?). So changed this to “pen” which is a label I’m using. Changed the sample interval to 0.0625, and got a lot more data (160 kB collected).

> AT+SAMPLESETTINGS=pen,0.0625,5000
AT+SAMPLESETTINGS=pen,0.0625,5000
OK
> AT+SAMPLESTART=Microphone
AT+SAMPLESTART=Microphone
Sampling settings:
        Interval: 0.06249 ms.
        Length: 5000 ms.
        Name: pen
        HMAC Key: 7e8592acc7b0c9d6affcbc190d5544d6
        File name: /fs/pen
Starting in 3510 ms... (or until all flash was erased)
Sampling...
Done sampling, total bytes collected: 160000
[1/1] Uploading file to Edge Impulse...
Not uploading file, not connected to WiFi. Used buffer, from=0, to=160240.
[1/1] Uploading file to Edge Impulse OK (took 200 ms.)
OK
> AT+READBUFFER=0,160240
AT+READBUFFER=0,160240
o2lwcm90ZWN0ZWSiY3ZlcmJ2MWNhbGdl..............................AHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAA==
>

Had to remove most of the data, as there is a limit to the number of characters that are possible for a post to contain.

@mathias But you get the > at the end reliably right? What’s the length you normally sample for?

edit: We’ll go into this in the meantime and try and reproduce.

After yet another time disconnecting/connecting the shield, and fitting the shield as tight as possible to the DK without the mentioned pins touching and as well having a piece of paper in between, I have now been able to do five 8s samples in a row. Earlier I was only able to do a maximum of two or three in a row before the upload failed.

Regarding the > at the end, I have got that every time I ran the AT+SAMPLESTART=Microphone command in the debug shell, up until now when I didn’t get it, after the last refitting of the shield and the five successful samples in a row.

AT+SAMPLESETTINGS?
AT+SAMPLESETTINGS?
Label: pen
Interval: 0.06249ms.
Length: 8000 ms.
HMAC key: 7e8592acc7b0c9d6affcbc190d5544d6
AT+SAMPLESTART=Microphone
AT+SAMPLESTART=Microphone
Sampling settings:
Interval: 0.06249 ms.
Length: 8000 ms.
Name: pen
HMAC Key: 7e8592acc7b0c9d6affcbc190d5544d6
File name: /fs/pen
Starting in 5580 ms… (or until all flash was erased)
Sampling…
Done sampling, total bytes collected: 256000
[1/1] Uploading file to Edge Impulse…
Not uploading file, not connected to WiFi. Used buffer, from=0, to=256240.
[1/1] Uploading file to Edge Impulse OK (took 200 ms.)
OK
AT+READBUFFER=0,256240
AT+READBUFFER=0,256240
o2lwcm90ZWN0ZWSiY3ZlcmJ2MWNhbGdlSFMyNTZpc2lnbmF0dXJleEAzMGFkOTQ4ODkwNDA4ZG…QsC4gEUAh0CxQHaAeYBBpA

1 Like

Hi @mathias,
I managed to sample 20 sec of data 10 times in a row without any issue. Let’s check if we’re using the same software / firmware, to allocate the issue.

I’m using the serial daemon version v1.13.8

Edge Impulse serial daemon v1.13.8
Endpoints:
    Websocket: wss://remote-mgmt.edgeimpulse.com
    API:       https://studio.edgeimpulse.com/v1
    Ingestion: https://ingestion.edgeimpulse.com

And using a firmware build deployed in the studio.

Hello, @Arjan!

Good to know that it works for someone! Looks like you’re using a version of the serial daemon that’s a bit older than the one I’m using (v1.13.12).

Edge Impulse serial daemon v1.13.12
Endpoints:
    Websocket: wss://remote-mgmt.edgeimpulse.com
    API:       https://studio.edgeimpulse.com/v1
    Ingestion: https://ingestion.edgeimpulse.com

Think I’ll give it a shot with the version you’re using.

I have for most of the time, and also now, been using the firmware found on the Edge Impulse Nordic Semi nRF5340 DK page.

For the record, this was the result of my last 10s sampling attempt:

[WS ] Incoming sampling request {
  path: '/api/training/data',
  label: 'pen',
  length: 10000,
  interval: 0.0625,
  hmacKey: '7e8592acc7b0c9d6affcbc190d5544d6',
  sensor: 'Microphone'
}
[SER] Configured upload settings
[SER] Sampling started
[SER] Sampling done
[SER] Device not connected to WiFi directly, reading from buffer (bytes 0 - 320240, expecting to read ~426986 bytes...
[SER] Reading 2% complete...
[WS ] Failed to sample data Timeout when waiting for >  (timeout: 130000) AT+READBUFFER=0,320240

Tried with the serial daemon v1.13.8 now,

Edge Impulse serial daemon v1.13.8
Endpoints:
    Websocket: wss://remote-mgmt.edgeimpulse.com
    API:       https://studio.edgeimpulse.com/v1
    Ingestion: https://ingestion.edgeimpulse.com

but still got a similar result

[WS ] Incoming sampling request {
  path: '/api/training/data',
  label: 'noise',
  length: 10000,
  interval: 0.0625,
  hmacKey: '7e8592acc7b0c9d6affcbc190d5544d6',
  sensor: 'Microphone'
}
[SER] Configured upload settings
[SER] Sampling started
[SER] Sampling done
[SER] Device not connected to WiFi directly, reading from buffer (bytes 0 - 320240, expecting to read ~426986 bytes...
[SER] Reading 2% complete...
[SER] Reading 4% complete...
[SER] Reading 7% complete...
[SER] Reading 10% complete...
[SER] Reading 12% complete...
[SER] Reading 15% complete...
[SER] Reading 17% complete...
[SER] Reading 20% complete...
[SER] Reading 23% complete...
[SER] Reading 25% complete...
[SER] Reading 28% complete...
[SER] Reading 31% complete...
[SER] Reading 33% complete...
[SER] Reading 36% complete...
[SER] Reading 38% complete...
[SER] Reading 41% complete...
[SER] Reading 44% complete...
[WS ] Failed to sample data Timeout when waiting for >  (timeout: 130000) AT+READBUFFER=0,320240

as before.

Ok, I’ll test with the same firmware you used.

Cool!

Tried again with the latest firmware, and now I actually got a status code with an error:

  statusCode: 500,
  error: 'byte length of Int16Array should be a multiple of 2',
  options: {
    headers: {
      'x-api-key': 'ei_5aca312dea33d633d02d009ce5a3ac4227fdedf9460658a5ccf3e5cfd819e75b',
      'x-file-name': 'noise',
      'x-label': 'noise',
      'Content-Type': 'application/octet-stream'
    },
    body: <Buffer a3 69 70 72 6f 74 65 63 74 65 64 a2 63 76 65 72 62 76 31 63 61 6c 67 65 48 53 32 35 36 69 73 69 67 6e 61 74 75 72 65 78 40 36 38 64 64 64 39 35 66 39 ... 266731 more bytes>,
    encoding: 'binary',
    uri: 'https://ingestion.edgeimpulse.com/api/training/data',
    method: 'POST',
    callback: [Function: RP$callback],
    transform: undefined,
    simple: true,
    resolveWithFullResponse: false,
    transform2xxOnly: false
  },
  response: <ref *1> IncomingMessage {
    _readableState: ReadableState {
      objectMode: false,
      highWaterMark: 16384,
      buffer: BufferList { head: null, tail: null, length: 0 },
      length: 0,
      pipes: [],
      flowing: true,
      ended: true,
      endEmitted: true,
      reading: false,
      sync: false,
      needReadable: false,
      emittedReadable: false,
      readableListening: false,
      resumeScheduled: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: false,
      destroyed: false,
      errored: null,
      closed: false,
      closeEmitted: false,
      defaultEncoding: 'utf8',
      awaitDrainWriters: null,
      multiAwaitDrain: false,
      readingMore: false,
      decoder: [StringDecoder],
      encoding: 'latin1',
      [Symbol(kPaused)]: false
    },
    _events: [Object: null prototype] {
      end: [Array],
      close: [Array],
      data: [Function (anonymous)],
      error: [Function (anonymous)]
    },
    _eventsCount: 4,
    _maxListeners: undefined,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'ingestion.edgeimpulse.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'ingestion.edgeimpulse.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [ClientRequest],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 117372,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    httpVersionMajor: 1,
    httpVersionMinor: 1,
    httpVersion: '1.1',
    complete: true,
    headers: {
      date: 'Thu, 08 Jul 2021 09:19:25 GMT',
      'content-type': 'text/plain',
      'transfer-encoding': 'chunked',
      connection: 'close',
      'x-powered-by': 'Express',
      'access-control-allow-origin': '*'
    },
    rawHeaders: [
      'Date',
      'Thu, 08 Jul 2021 09:19:25 GMT',
      'Content-Type',
      'text/plain',
      'Transfer-Encoding',
      'chunked',
      'Connection',
      'close',
      'X-Powered-By',
      'Express',
      'Access-Control-Allow-Origin',
      '*'
    ],
    trailers: {},
    rawTrailers: [],
    aborted: false,
    upgrade: false,
    url: '',
    method: null,
    statusCode: 500,
    statusMessage: 'Internal Server Error',
    client: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'ingestion.edgeimpulse.com',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'ingestion.edgeimpulse.com',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [ClientRequest],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 117372,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _consuming: true,
    _dumped: false,
    req: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [TLSSocket],
      _header: 'POST /api/training/data HTTP/1.1\r\n' +
        'x-api-key: ei_5aca312dea33d633d02d009ce5a3ac4227fdedf9460658a5ccf3e5cfd819e75b\r\n' +
        'x-file-name: noise\r\n' +
        'x-label: noise\r\n' +
        'Content-Type: application/octet-stream\r\n' +
        'host: ingestion.edgeimpulse.com\r\n' +
        'content-length: 266781\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/api/training/data',
      _ended: true,
      res: [Circular *1],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'ingestion.edgeimpulse.com',
      protocol: 'https:',
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: true,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    request: Request {
      _events: [Object: null prototype],
      _eventsCount: 5,
      _maxListeners: undefined,
      headers: [Object],
      body: <Buffer a3 69 70 72 6f 74 65 63 74 65 64 a2 63 76 65 72 62 76 31 63 61 6c 67 65 48 53 32 35 36 69 73 69 67 6e 61 74 75 72 65 78 40 36 38 64 64 64 39 35 66 39 ... 266731 more bytes>,
      encoding: 'binary',
      uri: [Url],
      method: 'POST',
      readable: true,
      writable: true,
      explicitMethod: true,
      _qs: [Querystring],
      _auth: [Auth],
      _oauth: [OAuth],
      _multipart: [Multipart],
      _redirect: [Redirect],
      _tunnel: [Tunnel],
      _rp_resolve: [Function (anonymous)],
      _rp_reject: [Function (anonymous)],
      _rp_promise: [Promise [Object]],
      _rp_callbackOrig: undefined,
      callback: [Function (anonymous)],
      _rp_options: [Object],
      setHeader: [Function (anonymous)],
      hasHeader: [Function (anonymous)],
      getHeader: [Function (anonymous)],
      removeHeader: [Function (anonymous)],
      localAddress: undefined,
      pool: {},
      dests: [],
      __isRequestRequest: true,
      _callback: [Function: RP$callback],
      proxy: null,
      tunnel: true,
      setHost: true,
      originalCookieHeader: undefined,
      _disableCookies: true,
      _jar: undefined,
      port: 443,
      host: 'ingestion.edgeimpulse.com',
      path: '/api/training/data',
      httpModule: [Object],
      agentClass: [Function: Agent],
      agent: [Agent],
      _started: true,
      href: 'https://ingestion.edgeimpulse.com/api/training/data',
      req: [ClientRequest],
      ntick: true,
      response: [Circular *1],
      originalHost: 'ingestion.edgeimpulse.com',
      originalHostHeaderName: 'host',
      responseContent: [Circular *1],
      _destdata: true,
      _ended: true,
      _callbackCalled: true,
      [Symbol(kCapture)]: false
    },
    toJSON: [Function: responseToJSON],
    caseless: Caseless { dict: [Object] },
    body: 'byte length of Int16Array should be a multiple of 2',
    [Symbol(kCapture)]: false,
    [Symbol(RequestTimeout)]: undefined
  }
}

Testing and testing, but for me it doesn’t fail.

The error indicates data is missing, so it’s starting to look more like a hardware stability related issue (cable, board).