Updated the question:
We are using custom Lightning Console App. Here is a simplified version of our LWC to explain the problem. Any idea?
sampleWireContextEventWarning.html
<template>
<lightning-button variant="brand" label="Brand action" title="Brand action"
onclick={handleClick} class="slds-m-left_x-small"
></lightning-button>
</template>
sampleWireContextEventWarning.js
import { LightningElement } from 'lwc';
import { NavigationMixin } from 'lightning/navigation';
export default class SampleWireContextEventWarning extends NavigationMixin(LightningElement) {
handleClick(event){
this[NavigationMixin.Navigate]({
type: 'standard__recordPage',
attributes: {
recordId: "500r0000004QblbAAC",
objectApiName: "Case",
actionName: "view"
},
});
}
}
When I include this component to a page in App Builder and click on the button, I could see the navigation to the Case Record happening, but I could still see the warning in the browser console.
[LWC warning]: Invalid event type "WireContextEvent" dispatched in element . Event name should only contain lowercase alphanumeric characters. aura_proddebug.js:242 at SampleWireContextEventWarning.dispatchEvent (https://static.lightning.force.com/cs32/auraFW/javascript/NlYMGsCv2IRRXpX5txmc5Q/aura_proddebug.js:7245:28) aura_proddebug.js:242 at SampleWireContextEventWarning.wrappedMethod [as dispatchEvent] (https://static.lightning.force.com/cs32/auraFW/javascript/NlYMGsCv2IRRXpX5txmc5Q/aura_proddebug.js:19687:31) aura_proddebug.js:242 at t.get (https://micps--cpsuat.lightning.force.com/components/laf/contextService.js:2:1896) aura_proddebug.js:242 at m (https://micps--cpsuat.lightning.force.com/components/laf/contextService.js:2:1204) aura_proddebug.js:242 at n (https://micps--cpsuat.lightning.force.com/components/laf/contextService.js:2:1389) aura_proddebug.js:242 at Object.a.getContextValues (https://micps--cpsuat.lightning.force.com/components/laf/contextService.js:2:3199) aura_proddebug.js:242 at d (https://micps--cpsuat.lightning.force.com/components/laf/navigationService.js:2:192) aura_proddebug.js:242 at i.navigateTo (https://micps--cpsuat.lightning.force.com/components/laf/navigationService.js:2:611) aura_proddebug.js:242 at SampleWireContextEventWarning.[Navigate] (https://micps--cpsuat.lightning.force.com/components/force/navigation.js:2:415)