godbus / dbus

Native Go bindings for D-Bus
BSD 2-Clause "Simplified" License
976 stars 225 forks source link

dbus: wire format error: invalid value for boolean #377

Open raas opened 10 months ago

raas commented 10 months ago

Hi,

I get the above after trying to EncodeTo() then DecodeMessage() on notification messages originating from Google Calendar or Telegram in Firefox -- messages that are fairly large and stuffed with... stuff in the hints field. Attached is a binary format of this (as produced by msg.EncodeTo(&b, binary.LittleEndian)).

broken-message.gz

Everything else I found so far works fine, even other messages that use the hints field. I could not create a reproducer with simple dbus-send.

Code I try to read the data with:

  b, err := os.ReadFile(os.Args[1])
  // 
  r := bytes.NewReader(b)
  msg, err := dbus.DecodeMessage(r)

  if err != nil {
    log.Fatalf("dbus.DecodeMessage: %v", err)
  }

Help? How can I debug this further? dbus itself and various notification daemons seem happy with the message.