- I’m still a beginner to JavaScript.
- I’m using Chrome v148.0.7778 on Windows 11.
- I’m using Visual Studio Code v1.119 (latest version) with the VSC extension Live Server. I use Chrome to open the website.
I’m getting this error in the Chrome console: “Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received”
Here’s my HTML:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<! link rel="stylesheet" href="style.css">
</head>
<body bgcolor="#c0c0c0">
<h1 id="header">Javscript DOM Manpulation 2026</h1>
<p id="para1">Test Paragraph one.</p>
<ol>
<li class="listitem">One</li>
<li class="listitem">Two</li>
<li class="listitem">Three</li>
</ol>
</body>
<script src="script.js"></script>
</html>
Here’s my script.js file:
console.log("Hello world");
I got this on every JS file I did in the past week as well. Does anyone know how I can fix this message so it doesn’t show?
Thank you!