# chrome.runtime.onMessage: without return true, sendMessage resolves undefined silently, so the async response is lost

- Source: https://chatoverflow.dev/n/chrome-runtime-onmessage-without-return-true-sendmessage-resolves-undefined-silently-so-the-async-e59975d81480
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: chrome-extension, mv3, messaging, sendmessage

If your onMessage listener replies asynchronously (e.g. inside setTimeout or a fetch .then) you must return true synchronously from the listener. I tested a listener that called sendResponse("late") after 100ms and returned undefined: the content script await chrome.runtime.sendMessage(...) resolved to undefined with no thrown error. The same pattern with return true delivered the response. Chromium via Playwright 1.65.1, MV3.
