question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error parsing maps

See original GitHub issue

Describe the bug

Saving maps in valetudo seems to be failing. I can see completed map after the first cleanup though. However there are two issues: It never persist over two cleanups or reboot and I cannot see the zones created by the robot, althoug they are in the png file saved in the robot…

Strange is that he is trying to save the map even after device reboot - apparently the map from previous cleanup stays in the robot but it doesn’t get to the Valetudo.

To Reproduce

Screenshots

image

Vacuum Model

Xiaomi branded viomi v7? Model STYTJ02YM

/etc/sysconf/device.conf:model=viomi.vacuum.v7

Valetudo Version

2022.02.0

Expected behavior

Map is saved including the zones and it persist between the cleanups

Additional context

Logs

valetudo.log

Full log file attached, this is just a snippet of the error part.

[2022-02-16T04:08:26.009Z] [DEBUG] Map upload started with: {
  query: {
    ts: '1867295070766',
    suffix: 'urls',
    Expires: '1644985154',
    index: '0',
    method: '_sync.gen_tmp_presigned_url'
  },
  params: { filename: undefined }
}
[2022-02-16T04:08:26.089Z] [ERROR] Error parsing map. Dump saved in /tmp/mapdata34
[2022-02-16T04:08:26.091Z] [ERROR] unhandledRejection {
  reason: Error: Invalid pixels array
      at new MapLayer (/snapshot/Valetudo/backend/lib/entities/map/MapLayer.js:29:19)
      at ViomiMapParser.convertToValetudoMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:280:25)
      at ViomiMapParser.parse (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:216:21)
      at ViomiV7ValetudoRobot.parseMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiValetudoRobot.js:510:50)
      at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:470:42
      at runMicrotasks (<anonymous>)
      at processTicksAndRejections (node:internal/process/task_queues:96:5),
  stack: 'Error: Invalid pixels array\n' +
    '    at new MapLayer (/snapshot/Valetudo/backend/lib/entities/map/MapLayer.js:29:19)\n' +
    '    at ViomiMapParser.convertToValetudoMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:280:25)\n' +
    '    at ViomiMapParser.parse (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:216:21)\n' +
    '    at ViomiV7ValetudoRobot.parseMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiValetudoRobot.js:510:50)\n' +
    '    at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:470:42\n' +
    '    at runMicrotasks (<anonymous>)\n' +
    '    at processTicksAndRejections (node:internal/process/task_queues:96:5)',
  promise: Promise {
    <rejected> Error: Invalid pixels array
        at new MapLayer (/snapshot/Valetudo/backend/lib/entities/map/MapLayer.js:29:19)
        at ViomiMapParser.convertToValetudoMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:280:25)
        at ViomiMapParser.parse (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiMapParser.js:216:21)
        at ViomiV7ValetudoRobot.parseMap (/snapshot/Valetudo/backend/lib/robots/viomi/ViomiValetudoRobot.js:510:50)
        at /snapshot/Valetudo/backend/lib/robots/MiioValetudoRobot.js:470:42
        at runMicrotasks (<anonymous>)
        at processTicksAndRejections (node:internal/process/task_queues:96:5)
  }
}
[2022-02-16T04:08:26.096Z] [DEBUG] <<< cloud: {"result":["ok"],"id":43}
[2022-02-16T04:08:26.097Z] [DEBUG] << cloud: ignoring response for non-pending request {"result":["ok"],"id":43}
[2022-02-16T04:08:26.098Z] [WARN] Error while saving unparsable map null

valetudo.log mapdata34.zip

Map PNG I got from the robot filesystem 0_png

Map as it looks like during the cleaning in the Valetudo: image

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Hypfercommented, Feb 16, 2022

Port 8053 is the mocked miio cloud provided by valetudo Port 8079 is the mocked fds http server for map uploads provided by valetudo

Basically you have commands, status data etc which is done via miio and large blobs which are uploaded via http to something that is just some blob storage similar to aws s3. In Valetudo, said mock blob storage does not store the blobs but directly processes them, parsing the map into valetudo-specific data structures and then discarding the raw data.

Every n seconds, Valetudo is sending the poll map miio command which in turn makes the robot upload the latest map data to that mock fds endpoint on port 8079 https://github.com/Hypfer/Valetudo/blob/635d7f91c6fd679d0326bb64efb048626fe07f38/backend/lib/robots/viomi/ViomiValetudoRobot.js#L473-L476

0reactions
drticczcommented, Aug 17, 2022

Seems like this has been magically solved by resetting the map and disabling and enabling again the persistent maps in Valetudo… it now just works

Read more comments on GitHub >

github_iconTop Results From Across the Web

Line 0: Parsing error: Cannot read property 'map' of undefined
This error occurs because react-scripts has a direct dependency on the 2.xx range of @typescript-eslint/parser and ...
Read more >
QuickBooks found an error parsing the XML stream
QuickBooks found an error parsing the XML stream. If some fields fail to map or you have special characters, this error can occur....
Read more >
Failed to parse mapping definition - Common causes ... - Opster
The most common problem in Elasticsearch is incorrectly defined mapping which limits the functionality of the field. For example, if the data type...
Read more >
Error Parsing File.... - Google Earth Community
Error while parsing file "/Users/jimthompson/Library/Application ... This clearly indicates that Google Maps is trying to show me several ...
Read more >
Getting an error "An error occurred while parsing this ... - IBM
You will not be able to edit its mapping". I am getting this error for every log source now and cannot map any...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found