stefanw / bibbot

BibBot is a browser extension that removes the paywall on German online news sites using your library account's access to press databases.
https://stefanw.github.io/bibbot/
GNU General Public License v3.0
499 stars 78 forks source link

sueddeutsche.de Fehler: Accessing from Xray wrapper is not supported. #398

Closed Strubbl closed 7 months ago

Strubbl commented 7 months ago

URL der Nachrichtenseite

https://www.sueddeutsche.de

URL zu einem Artikel mit Paywall

https://www.sueddeutsche.de/projekte/artikel/politik/lkw-unfaelle-beim-abbiegen-im-toten-winkel-e744638/?reduced=true

Ist die Nachrichtenseite in einer Pressedatenbank enthalten?

munzinger

URL zu der Quellenseite in der Pressedatenbank

-

Weitere Details

Wenn ich den SZ-Artikel https://www.sueddeutsche.de/projekte/artikel/politik/lkw-unfaelle-beim-abbiegen-im-toten-winkel-e744638/?reduced=true aufrufe, bekomme ich folgende Fehlermeldung in der console:

Error: Accessing from Xray wrapper is not supported. content.js:2869:43
    setupUI moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:2869
    startInfoExtraction moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:2877
    start moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:2851
    start moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:2845
    (Async: setTimeout handler)
    start moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:2845
    <anonymous> moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:3031
    (Async: EventListener.handleEvent)
    <anonymous> moz-extension://67c9eda6-651d-41ba-a1e9-82409b63d6e3/build/content.js:3030
    inject resource://gre/modules/ExtensionContent.sys.mjs:581
    AsyncFunctionNext self-hosted:852

content.js:2869 entspricht https://github.com/stefanw/bibbot/blob/d429b128ff9c391fe0c44c9e9474c86e8ad2ed44/src/sitebot.ts#L61 und meint wohl das [sheet]

Strubbl commented 7 months ago

Ich habe den Fehlerbericht bugzilla-1766909 gelesen, der mich zu bugzilla-1827104 gebracht hat, wo ein Workaround mittels

shadow.adoptedStyleSheets.push(CSSStyle)

empfohlen wird. Das wird auch unter https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/adoptedStyleSheets#append_a_new_stylesheet als Beispiel gezeigt. Aber der hat auch nicht funktioniert. Es gibt einen Fehler:

TypeError: this.shadow.adoptedStyleSheets.push is not a function.

Der TypeError ist mir nicht erklärbar, denn this.shadow.adoptedStyleSheets ist ein Array laut console.log.

Ein Fehlerbericht, auf den in bugzilla-1827104 noch verwiesen wird und der noch offen ist, ist bugzilla-1751346.

stefanw commented 7 months ago

Danke für's Debuggen. Ich habe einen Workaround eingebaut: https://github.com/stefanw/bibbot/commit/d6923ddc3085413259d7b11df92ea1e3b3289433 Fixed in v0.33.1