function feedback() {
$("#suggestion").val("");
var feedBackNode = document.body;
domtoimage.toPng(feedBackNode).then(function (dataUrl) {
imgDataUrl = dataUrl;
var widthO = feedBackNode.offsetWidth;
var heightO = feedBackNode.offsetHeight;
var v = 1;
var max = 550;
if (widthO > heightO) {
if (widthO > max) {
v = max / widthO;
}
} else {
if (heightO > max) {
v = max / heightO;
}
}
var img = new Image();
img.src = dataUrl;
$("#feedback").empty();
$("#feedback").append($(img).css("width", widthO * v).css("height", heightO * v));
})
$("#feedbackModal").modal("show");
}

How did you solove this problem?
same issue in 2020
Any solution to this issue?
same in 2021 there s no way to debug this error
In my case, this was happening because when I was converting multiple dom elements to image in parallel. The issue got resolved after I modified the code and made it sequential.
Same here - not clear why Uncaught (in promise). Not clear why this error happens