Open Bug 1836956 Opened 2 years ago Updated 2 years ago

w.linovelib.com - Images are not loading with "Reading mode" active

Categories

(Toolkit :: Reader Mode, defect, P3)

Other
Android
defect

Tracking

()

Tracking Status
firefox114 --- affected

People

(Reporter: rbucata, Unassigned)

References

()

Details

From github: https://github.com/webcompat/web-bugs/issues/123274.

<!-- @browser: Firefox Mobile 114.0 -->
<!-- @ua_header: Mozilla/5.0 (Android 11; Mobile; rv:109.0) Gecko/114.0 Firefox/114.0 -->
<!-- @reported_with: android-components-reporter -->
<!-- @public_url: https://github.com/webcompat/web-bugs/issues/123274 -->
<!-- @extra_labels: browser-fenix -->

URL: https://w.linovelib.com/novel/3095/154933_6.html

Browser / Version: Firefox Mobile 114.0
Operating System: Android 11
Tested Another Browser: Yes Edge

Problem type: Design is broken
Description: Images not loaded 图像未加载
Steps to Reproduce:
Picture cannot load after reading mode is turned on
<details>
<summary>View the screenshot</summary>
<img alt="Screenshot" src="https://webcompat.com/uploads/2023/6/0b9835b9-5c39-4e8f-8503-5ab83f363d5d.jpeg">
</details>

<details>
<summary>Browser Configuration</summary>
<ul>
<li>gfx.webrender.all: false</li><li>gfx.webrender.blob-images: true</li><li>gfx.webrender.enabled: false</li><li>image.mem.shared: true</li><li>buildID: 20230525180143</li><li>channel: beta</li><li>hasTouchScreen: true</li><li>mixed active content blocked: false</li><li>mixed passive content blocked: false</li><li>tracking content blocked: false</li>
</ul>
</details>

View console log messages

From webcompat.com with ❤️

Change performed by the Move to Bugzilla add-on.

The issue was reported via the webcompat.com reporter. Since Reader Mode is a browser feature, we have moved the issue. Please feel free to move the issue to the relevant Component and Product.

Component: General → Reader Mode
Product: Fenix → Toolkit
Hardware: All → Other

Image requests appear to be returning 403 errors when in Reader Mode. @valentin, it looks like in Reader Mode, there are fewer headers included in image requests, as opposed to non-reader mode requests. @mconley noticed that specifically the referrer header is missing. Is this a possible Necko bug, do you think?

Flags: needinfo?(valentin.gosu)

I think the problem is that we're loading the image into an about:reader? page.
I think Tim may know more about how the referrer is computed for these pages, and whether we can do something about it.

Flags: needinfo?(valentin.gosu) → needinfo?(tihuang)
LogMessages
Module:
nsHttp
Name:
HttpChannelChild::AsyncOpen [this=7f8cfdab5800 uri=https://img1.readpai.com/3/3095/154931/200737.jpg]
Thread:
https://linovelib.com
Stack:

    mozilla::net::HttpChannelChild::AsyncOpen(nsIStreamListener*)netwerk/protocol/http/HttpChannelChild.cpp
    imgLoader::LoadImage(nsIURI*, nsIURI*, nsIReferrerInfo*, nsIPrincipal*, unsigned long, nsILoadGroup*, imgINotificationObserver*, nsINode*, mozilla::dom::Document*, unsigned int, nsISupports*, nsIContentPolicy::nsContentPolicyType, nsTSubstring<char16_t> const&, bool, bool, unsigned long, imgRequestProxy**)image/imgLoader.cpp
    imgLoader::LoadImage https://img1.readpai.com/3/3095/154931/200737.jpg
    nsContentUtils::LoadImage(nsIURI*, nsINode*, mozilla::dom::Document*, nsIPrincipal*, unsigned long, nsIReferrerInfo*, imgINotificationObserver*, int, nsTSubstring<char16_t> const&, imgRequestProxy**, nsIContentPolicy::nsContentPolicyType, bool, bool, unsigned long)dom/base/nsContentUtils.cpp
    nsImageLoadingContent::LoadImage(nsIURI*, bool, bool, nsImageLoadingContent::ImageLoadType, unsigned int, mozilla::dom::Document*, nsIPrincipal*)dom/base/nsImageLoadingContent.cpp
    nsImageLoadingContent::LoadImage(nsIURI*, bool, bool, nsImageLoadingContent::ImageLoadType, nsIPrincipal*)dom/base/nsImageLoadingContent.h
    mozilla::dom::HTMLImageElement::LoadSelectedImage(bool, bool, bool)dom/html/HTMLImageElement.cpp
    mozilla::dom::HTMLImageElement::MaybeLoadImage(bool)dom/html/HTMLImageElement.cpp
    mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}::operator()<StoreCopyPassByConstLRef<bool>&>(StoreCopyPassByConstLRef<bool>&) constxpcom/threads/nsThreadUtils.h
    std::__invoke_impl<void, mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, StoreCopyPassByConstLRef<bool>&>(std::__invoke_other, mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, StoreCopyPassByConstLRef<bool>&)/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/bits/invoke.h
    std::__invoke<mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, StoreCopyPassByConstLRef<bool>&>(mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, StoreCopyPassByConstLRef<bool>&)/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/bits/invoke.h
    std::__apply_impl<mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, std::tuple<StoreCopyPassByConstLRef<bool> >&, (unsigned long)0>(mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, std::tuple<StoreCopyPassByConstLRef<bool> >&, std::integer_sequence<unsigned long, ((unsigned long)0)...>)/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/tuple
    std::apply<mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, std::tuple<StoreCopyPassByConstLRef<bool> >&>(mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))::{lambda(auto:1&&)#1}, std::tuple<StoreCopyPassByConstLRef<bool> >&)/builds/worker/fetches/sysroot-x86_64-linux-gnu/usr/include/c++/8/tuple
    mozilla::detail::RunnableMethodArguments<bool>::apply<mozilla::dom::HTMLImageElement, void (mozilla::dom::HTMLImageElement::*)(bool)>(mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool))xpcom/threads/nsThreadUtils.h
    mozilla::detail::RunnableMethodImpl<mozilla::dom::HTMLImageElement*, void (mozilla::dom::HTMLImageElement::*)(bool), true, (mozilla::RunnableKind)0, bool>::Run()xpcom/threads/nsThreadUtils.h
    nsContentUtils::RemoveScriptBlocker()dom/base/nsContentUtils.cpp
    nsAutoScriptBlocker::~nsAutoScriptBlocker()dom/base/nsContentUtils.h
    nsAutoScriptBlockerSuppressNodeRemoved::~nsAutoScriptBlockerSuppressNodeRemoved()dom/base/nsContentUtils.h
    nsParserUtils::ParseFragment(nsTSubstring<char16_t> const&, unsigned int, bool, nsIURI*, mozilla::dom::Element*, mozilla::dom::DocumentFragment**)parser/html/nsParserUtils.cpp
    NS_InvokeByIndexlibxul.so
    CallMethodHelper::Invoke()js/xpconnect/src/XPCWrappedNative.cpp
    CallMethodHelper::Call()js/xpconnect/src/XPCWrappedNative.cpp
    XPCWrappedNative::CallMethod(XPCCallContext&, XPCWrappedNative::CallMode)js/xpconnect/src/XPCWrappedNative.cpp
    nsIParserUtils.parseFragment

I had a quick look at the callsite for the image load.
It goes through nsParserUtils::ParseFragment from here and ends up calling nsContentUtils::LoadImage with what I assume is the wrong referrer info?

Severity: -- → S3
Priority: -- → P3

I've checked the referrer info of the channel that loads the image. It turns out it's using the about:reader?url=https://w.linovelib.com/novel/3095/154933_6.html as its original referrerin reader mode. And we don't send referrer if the original referrer is not a http/https URI.

Flags: needinfo?(tihuang)
You need to log in before you can comment on or make changes to this bug.