[Error][JS]Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

2024. 12. 18. 19:48ETC/에러노트

 

 

[상황] 코드 블록 상단에 맥 상단바 나오게 만드는 중 다음과 같이 나왔다

 

 

코드 블럭이 이렇게 나온다.. 상단바 가 적용이 안되는 상황.. 

codeblock. js 에는 이상 이없고 

 

css  codeheader 도 잘 추가 되어있다. 

 

inspect 를 긁으니  pre 라는 곳에서 에러가 나는 것같다.ㅏ 

[에러 메세지] Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received

 

[참고] https://zorba10004.tistory.com/360

 

vendor.js:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channe

안녕하세요. 궁금증연구소입니다. 오늘 포스팅 주제는 "vendor.js:1 Uncaught (in promise) Error: A listener indicated an asynchronous response by returning true, but the message channel closed before a response was received 에러"입니

zorba10004.tistory.com

 

이블로그를 참고하니 해당 에러는 

script 태그 위치 때문이라고 한다. 

 

 

script.js 를 주석 처리 해보았다.. 그래도 해결 되지 않는다.  하지만 색깔이 돌아왔다. 

 

하지만 아직도 에러 메세지는 떠있었다.  3개나 있는 것으로 보아 header 쪽에 js 가 문제가 있는게 아닐까? 

 

헤더 쪽에 코드블록 테마 변경 을 위해 맨 밑에 스크립트를 넣어 두었다... 

 

일단 위치는 문제 없는 거 같다. css 를 좀 확인해보자. 

 

[참고 블로그]https://reifier.tistory.com/7

일단 css 가 참고 블로그 설정과 모두 다름을 확인하고 직접 수정하여 해결하였다. 

 

결과