reader-view icon indicating copy to clipboard operation
reader-view copied to clipboard

Unable to Switch to reader view: Readability.js:1019 Uncaught TypeError

Open jefferyyuan opened this issue 6 years ago • 1 comments

  • Sometime I can't switch to reader view, the console at Chrome DevTools shows the following error.
  • although I can open the page in reader view in incongnito mode.
Readability.js:1019 Uncaught TypeError: Cannot read property 'tagName' of null
    at Readability._grabArticle (Readability.js:1019)
    at Readability.parse (Readability.js:1818)
    at Readability.parse (wrapper.js:41)
    at wrapper.js:78

It failed at the following code:

        var scoreThreshold = lastScore / 3;
        while (parentOfTopCandidate.tagName !== "BODY") { // failed at this line
          if (!parentOfTopCandidate.readability) {
            parentOfTopCandidate = parentOfTopCandidate.parentNode;
            continue;
          }

jefferyyuan avatar Jun 07 '19 05:06 jefferyyuan

Please provide a sample page with the issue. btw, I am updating the Readability.js lib. So it might have already been fixed.

rNeomy avatar Sep 24 '19 07:09 rNeomy