mozilla-rally / rally

A monorepo for Rally project containing Rally SDK, Rally Web Platform and Extensions.
Mozilla Public License 2.0
7 stars 6 forks source link

Extension occasionally logging `Mozilla Rally - unknown message type received: undefined` #471

Open rhelmer opened 2 years ago

rhelmer commented 2 years ago

I'm seeing this regularly in the console:

Mozilla Rally - unknown message type received: undefined

The log points to this line of code: https://github.com/mozilla-rally/rally/blob/c247881a7a473aa5eb2698b4829ca5f3cfe07ba0/extensions/attention-stream/src/background.ts#L368

We should add more logging to get an idea of what this message is, hard to tell what it is and where it's coming from unless we log more info about the sender etc, we should just log the whole message.

rhelmer commented 1 year ago

I caught this in the debugger, I think this is messages from WebScience such as webScience.pageManager.pageVisitStart being received by the youtube listener here: https://github.com/mozilla-rally/rally/blob/8d2bd2e4419e8cdaf944a94ed849107d4636648f/extensions/attention-stream/src/background.ts#L368

If we're going to register a bunch of listeners just listening for their own messages, we probably don't need to log this. Since it's debug logging it's not that big of a deal but at minimum I think we should make the log message a little more specific (mention that it's the youtube listener and this isn't a youtube message, so ignoring)