DTK0031: Dock Entry Not a Launcher
Package:
@vitejs/devtools
Message
Dock entry with id "
{id}" is not a launcher
Cause
The internal devtoolskit:internal:docks:on-launch RPC function was called for a dock entry that exists but has a type other than 'launcher'. Only dock entries with type: 'launcher' have an onLaunch handler that can be invoked. This can happen if a dock entry's type was changed after the client UI rendered, or if there is a mismatch between the client and server state.
Example
// A dock entry registered as a non-launcher type
context.docks.register({
id: 'my-plugin:info-panel',
label: 'Info Panel',
type: 'iframe',
iframe: { src: '/.my-plugin/' },
})
// If the client somehow tries to launch this entry, DTK0031 is thrown
// (internally: rpc.call('devtoolskit:internal:docks:on-launch', 'my-plugin:info-panel'))Fix
Only the 'launcher' dock type supports the launch action. If you intended this dock entry to be launchable, register it with type: 'launcher':
context.docks.register({
id: 'my-plugin:dock',
label: 'My Launchable Dock',
type: 'launcher',
launcher: {
status: 'idle',
onLaunch: async () => {
// Perform setup, then optionally switch to an iframe dock
},
},
})If you see this error in the DevTools UI, it likely indicates a state synchronization issue. Refreshing the page should resolve it.
Source
packages/core/src/node/rpc/internal/docks-on-launch.ts