Open thdoan opened 1 year ago
Though I haven't looked in detail at your report, I can say that it's normal during extension dev to see a lot of those. When the extension fully reloads all the content scripts running the old version are invalid.
From the error log, it seems this error is related to stale ports -- would it be possible to use the port's disconnect
handler to catch when the extension is unloaded to prevent "Extension context invalidated" errors? Or maybe just suppress the errors altogether. It would be nice not to see the error logs flooded with these errors because they are act as false positives, meaning every time these errors show up, I have to manually go and read the stack trace because I don't know if the error is something in my code, or something that can be safely ignored like "Extension context invalidated" errors.
From the error log, it seems this error is related to stale ports -- would it be possible to use the port's
disconnect
handler to catch when the extension is unloaded to prevent "Extension context invalidated" errors? Or maybe just suppress the errors altogether. It would be nice not to see the error logs flooded with these errors because they are act as false positives, meaning every time these errors show up, I have to manually go and read the stack trace because I don't know if the error is something in my code, or something that can be safely ignored like "Extension context invalidated" errors.
Giải quyết được lỗi này chưa bạn?
Build tool
Rollup
Where do you see the problem?
Describe the bug
When running
npm run dev
(alias tovite
), I often get "Extension context invalidated" errors for all the open tabs. Example:If this cannot be avoided, is there a recommended way to prevent this, or maybe you can suppress this in the code?
Reproduction
npm run dev
orvite
.Logs
System Info
Severity
annoyance