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.

Can't handle optional nested submessages when parsing MCAP file

See original GitHub issue

Description

If I generate an MCAP log with a channel whose type has multiple layers of nested sub-messages (in this schema, MessageType.fetchers[0].channel.schema.root_table.name is a potentially valid reference), but don’t specify one of the sub-fields, foxglove studio barfs complaining about an undefined reference.

In this, case we have the below logfile: foo.mcap.gz

Which just contains a single channel/schema and a single message on that channel. The schema for the channel is:

{"$schema":"https://json-schema.org/draft/2020-12/schema","properties":{"fetchers":{"items":{"properties":{"channel":{"properties":{"destination_nodes":{"items":{"properties":{"name":{"type":"string"},"priority":{"type":"number"},"time_to_live":{"type":"number"},"timestamp_logger":{"type":"number"},"timestamp_logger_nodes":{"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"frequency":{"type":"number"},"logger":{"type":"number"},"logger_nodes":{"items":{"type":"string"},"type":"array"},"max_size":{"type":"number"},"name":{"type":"string"},"num_readers":{"type":"number"},"num_senders":{"type":"number"},"num_watchers":{"type":"number"},"read_method":{"type":"number"},"schema":{"properties":{"enums":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"is_union":{"type":"boolean"},"name":{"type":"string"},"underlying_type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"},"values":{"items":{"properties":{"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"object":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"union_type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"},"value":{"type":"number"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"file_ext":{"type":"string"},"file_ident":{"type":"string"},"objects":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"type":"array"},"root_table":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"services":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"calls":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"request":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"response":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"source_node":{"type":"string"},"type":{"type":"string"}},"type":"object"},"channel_index":{"type":"number"},"count":{"type":"number"},"latency":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"name":{"type":"string"},"phased_loops":{"items":{"properties":{"count":{"type":"number"},"handler_time":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"},"name":{"type":"string"},"wakeup_latency":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"pid":{"type":"number"},"send_failures":{"type":"number"},"senders":{"items":{"properties":{"channel":{"properties":{"destination_nodes":{"items":{"properties":{"name":{"type":"string"},"priority":{"type":"number"},"time_to_live":{"type":"number"},"timestamp_logger":{"type":"number"},"timestamp_logger_nodes":{"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"frequency":{"type":"number"},"logger":{"type":"number"},"logger_nodes":{"items":{"type":"string"},"type":"array"},"max_size":{"type":"number"},"name":{"type":"string"},"num_readers":{"type":"number"},"num_senders":{"type":"number"},"num_watchers":{"type":"number"},"read_method":{"type":"number"},"schema":{"properties":{"enums":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"is_union":{"type":"boolean"},"name":{"type":"string"},"underlying_type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"},"values":{"items":{"properties":{"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"object":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"union_type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"},"value":{"type":"number"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"file_ext":{"type":"string"},"file_ident":{"type":"string"},"objects":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"type":"array"},"root_table":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"services":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"calls":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"request":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"response":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"source_node":{"type":"string"},"type":{"type":"string"}},"type":"object"},"channel_index":{"type":"number"},"count":{"type":"number"},"size":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"timers":{"items":{"properties":{"count":{"type":"number"},"handler_time":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"},"name":{"type":"string"},"wakeup_latency":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"watchers":{"items":{"properties":{"channel":{"properties":{"destination_nodes":{"items":{"properties":{"name":{"type":"string"},"priority":{"type":"number"},"time_to_live":{"type":"number"},"timestamp_logger":{"type":"number"},"timestamp_logger_nodes":{"items":{"type":"string"},"type":"array"}},"type":"object"},"type":"array"},"frequency":{"type":"number"},"logger":{"type":"number"},"logger_nodes":{"items":{"type":"string"},"type":"array"},"max_size":{"type":"number"},"name":{"type":"string"},"num_readers":{"type":"number"},"num_senders":{"type":"number"},"num_watchers":{"type":"number"},"read_method":{"type":"number"},"schema":{"properties":{"enums":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"is_union":{"type":"boolean"},"name":{"type":"string"},"underlying_type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"},"values":{"items":{"properties":{"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"object":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"union_type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"},"value":{"type":"number"}},"type":"object"},"type":"array"}},"type":"object"},"type":"array"},"file_ext":{"type":"string"},"file_ident":{"type":"string"},"objects":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"type":"array"},"root_table":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"services":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"calls":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"},"request":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"},"response":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"bytesize":{"type":"number"},"documentation":{"items":{"type":"string"},"type":"array"},"fields":{"items":{"properties":{"attributes":{"items":{"properties":{"key":{"type":"string"},"value":{"type":"string"}},"type":"object"},"type":"array"},"default_integer":{"type":"number"},"default_real":{"type":"number"},"deprecated":{"type":"boolean"},"documentation":{"items":{"type":"string"},"type":"array"},"id":{"type":"number"},"key":{"type":"boolean"},"name":{"type":"string"},"offset":{"type":"number"},"optional":{"type":"boolean"},"required":{"type":"boolean"},"type":{"properties":{"base_type":{"type":"number"},"element":{"type":"number"},"fixed_length":{"type":"number"},"index":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"},"is_struct":{"type":"boolean"},"minalign":{"type":"number"},"name":{"type":"string"}},"type":"object"}},"type":"object"},"type":"array"},"documentation":{"items":{"type":"string"},"type":"array"},"name":{"type":"string"}},"type":"object"},"type":"array"}},"type":"object"},"source_node":{"type":"string"},"type":{"type":"string"}},"type":"object"},"channel_index":{"type":"number"},"count":{"type":"number"},"handler_time":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"},"wakeup_latency":{"properties":{"average":{"type":"number"},"max":{"type":"number"},"min":{"type":"number"},"standard_deviation":{"type":"number"}},"type":"object"}},"type":"object"},"type":"array"}},"type":"object"}

The contents of the actual message are:

{"fetchers": [{"count": 123}], "pid": 12345}

Foxglove Studio pops up an error saying Error initializing player: Cannot read properties of undefined (reading 'schema') (the schema here is a reference to the schema sub-object in my type–if I change the name in my type, it changes the name in the error message). It appears that foxglove attempts to read the fetchers[0].channel.schema, but channel is undefined. Interestingly, the logic appears to handle on a single layer of missing sub-messages (so if channels were itself just a flat object with no sub-messages, then not populating it seems to work fine–I assume that https://github.com/foxglove/studio/blob/a20cf7ef51cae38d143a2d76e3e048c84c04a0d7/packages/mcap-support/src/parseJsonSchema.ts is somehow iterating over all the sub-types in a message when attempting to read things).

Also, empty JSON messages ({}) don’t seem to be allowed, even if the schema permits it.

Expected Behavior

The logfile is successfully read and I can view the data that is populated.

Actual Behavior

I get an error and can’t view any data 😦

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
jtbandescommented, Feb 23, 2022

Awesome, thanks for all the references. Feel free to also provide any feedback on the https://github.com/foxglove/mcap repo or in our Slack group if you run into issues with the readers/writers or the spec. It’s still pretty new and we’re happy to have others trying it out!

1reaction
jameskuszmaul-brtcommented, Feb 23, 2022

If it does look like an AOS<->foxglove integration works well, I will probably try to get everything relevant open-sourced so that we have a clean visualization answer for both the FRC team and anyone else that may end up wanting to use AOS.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Unable to Parsing nested Json file in C# - Stack Overflow
I have Json format response from a API call and I want to map the data from the response to each varibales. Json...
Read more >
Parser incorrectly evaluates "parserOptions.project" attribute ...
Summary When an .eslintrc file is nested in a folder in a project, the parserOptions.project attribute in the nested folder is evaluated ...
Read more >
homebrew-core - Homebrew Formulae
a2ps 4.14 Any‑to‑PostScript filter aacgain 1.8 AAC‑supporting version of mp3gain aalib 1.4rc5 Portable ASCII art graphics library aamath 0.3 Renders mathematical expressions as ASCII art
Read more >
Panopticon 2021.1 Streams Installation and Reference Guide
also have the option to use Altair units licensing instead of the XML file. ❑ Properties file - The set of properties in...
Read more >
Untitled :: Relution Documentation
FIX: Add enabled option for status bar handling in Android Enterprise Kiosk ... UPDATE: Update APK file parser to allow parsing of additional...
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