quasarframework/quasar · warning

Received a message with unknown type: "${message.type}".

Error message

Received a message with unknown type: "${message.type}".

What it means

#onMessage handles reassembled messages of type 'event-response' or 'event-send'; anything else falls through to this warning. It means a fully reassembled (or full) message carried a messageType the bridge doesn't implement — a protocol/version mismatch or a corrupted sender.

Source

Thrown at app-vite/exports/bex/private/bex-bridge.js:900

        })
        .catch(err => {
          this.#sendMessage({
            id: message.id,
            to: message.from,
            messageType: 'event-response',
            messageProps: {
              error: {
                message: err.message,
                stack: err.stack || 'no stack available'
              }
            }
          })
        })

      return
    }

    this.warn(
      `Received a message with unknown type: "${message.type}".`,
      message
    )
  }
}

View on GitHub (pinned to 4841521b5f)

Solutions

  1. Reload/rebuild all extension contexts so every side runs the same bridge version
  2. Inspect the attached message object and fix the sender's messageType to 'event-send' or 'event-response'
  3. If using a forked/patched bridge, keep message type names in sync with upstream
  4. Reject or filter foreign messages at the port listener before they reach the bridge

Example fix

// before: custom packet with invented type
{ type: 'full', messageType: 'event-request', ... }
// after
{ type: 'full', messageType: 'event-send', ... }
Defensive patterns

Strategy: validation

Validate before calling

// validate messageType before dispatching custom packets
const MSG_TYPES = new Set(['event-send', 'event-response'])
if (!MSG_TYPES.has(messageType)) {
  throw new Error(`Unsupported messageType: ${messageType}`)
}

Type guard

const isBridgeMessage = m =>
  m !== null && typeof m === 'object' &&
  ['event-send', 'event-response'].includes(m.type) &&
  typeof m.id !== 'undefined'

Prevention

When it happens

Trigger: A message reassembled from chunks (or received as 'full') whose messageType is not 'event-send'/'event-response' — e.g. bridge versions disagree on message type names, or a custom sender set messageType manually.

Common situations: Mixed bridge versions across contexts after a partial extension update; hand-rolled packets injected with an invented messageType; typo when constructing messages in forked bridge code.

Related errors


AI-assisted analysis of quasarframework/quasar@4841521b5f (2026-08-30). Data as JSON: /api/errors/92991f3d5a3b0d63. Report an issue: GitHub.