thin-edge/thin-edge.io

c8y mapper panics with malformed registration messages

Opened this issue · 0 comments

Describe the bug
c8y mapper panics with this error.

thread 'tokio-runtime-worker' panicked at crates/core/tedge_api/src/store/pending_entity_store.rs:162:49:
called `Option::unwrap()` on a `None` value
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2024-07-09T16:23:02.121644225Z ERROR Runtime: Actor CumulocityMapper-9 has finished unsuccessfully: JoinError(JoinError::Panic(Id(28), ...))    

To Reproduce
Run these commands in this order.

tedge mqtt pub -r 'te/device/child02//' '{"@type":"child-device"}'
tedge mqtt pub -r 'te/device/child02//' '{"@type":"service"}'
tedge mqtt pub -r 'te/device/child02//' '{"@type":"child-device"}'

Expected behavior
No panic. This scenario, changing @type should be treated as an error.

Screenshots

Environment (please complete the following information):

  • OS [incl. version]
  • Hardware [incl. revision]
  • System-Architecture [e.g. result of "uname -a"]
  • thin-edge.io version [main branch (after 1.1.1 release)] 6fc5699

Additional context