open.spotify.com - Album and playlist covers missing in search results when logged in on desktop site using a tablet device
Categories
(Web Compatibility :: Site Reports, defect, P3)
Tracking
(Webcompat Priority:P3, Webcompat Score:3, firefox143 affected, firefox144 affected, firefox145 affected)
People
(Reporter: rbucata, Unassigned, NeedInfo)
References
()
Details
(Keywords: webcompat:needs-diagnosis, webcompat:site-report, Whiteboard: [webcompat-source:web-bugs][webcompat:sightline])
User Story
platform:android impact:content-missing configuration:rare affects:some branch:release diagnosis-team:dom-storage user-impact-score:40.5
Attachments
(3 files)
Environment:
Operating system: Android 12
Firefox version: Firefox Mobile 143.0
Preconditions:
- Tablet device used
- Desktop mode enabled for page
Steps to reproduce:
- Navigate to: https://open.spotify.com
- Perform account login
- Search for a band with an album and observe
Expected Behavior:
Album cover is present
Actual Behavior:
Album covers and playlists missing in context menu when logged in on desktop site (service worker issue)
Notes:
- Reproduces regardless of the status of ETP
- Reproduces in firefox-nightly, and firefox-release
- Does not reproduce in chrome
Created from https://github.com/webcompat/web-bugs/issues/179643
| Reporter | ||
Updated•4 months ago
|
| Reporter | ||
Comment 1•4 months ago
|
||
| Reporter | ||
Comment 2•4 months ago
|
||
Does not reproduce on mobile devices, in mobile view when using a tablet, or when logged out.
| Reporter | ||
Comment 3•4 months ago
|
||
Comment 4•4 months ago
|
||
Since nightly and release are affected, beta will likely be affected too.
For more information, please visit BugBot documentation.
Updated•4 months ago
|
Updated•4 months ago
|
Updated•4 months ago
|
Comment 5•26 days ago
|
||
What tablet is used here? Is it still happening? What is the user agent string? Is the same happening when the same user agent string is used in desktop in devtools mobile emulation mode? I don't have a tablet device to test, so I need some help 🙏🏻
| Reporter | ||
Comment 6•22 days ago
|
||
It's a Samsung Tab S6 (Android 12) - 1600x2560 pixels, 16:10 ratio (~287 ppi density). I still get the issue. It seems to be specific to a real device, as I can't really find a UA String to reproduce in RDM.
Comment 7•20 days ago
|
||
Can confirm on Pixel Tablet, thanks.
Comment 8•19 days ago
|
||
A bunch of NS_ERROR_INTERCEPTION_FAILED in network log for images which is a service worker error.
Comment 9•19 days ago
|
||
SW interception is failing because fetch is failing there. The SW code is same, but somehow it only fails on Android?
https://open.spotify.com/service-worker.js
try {
let e;
e = await fetch(r, 'navigate' === r.mode ? void 0 : this._strategy.fetchOptions);
for (const r of this.iterateCallbacks('fetchDidSucceed')) e = await r({
event: t,
request: a,
response: e
});
return e
} catch (i) {
throw n &&
await this.runCallbacks(
'fetchDidFail',
{
error: i,
event: t,
originalRequest: n.clone(),
request: a.clone()
}
),
i
}
Here the request looks like:
Request {
method: "GET",
url: "https://i.scdn.co/image/ab67616d0000485138ada58497693555e12bee30",
headers: Headers,
destination: "image",
referrer: "https://open.spotify.com/",
referrerPolicy: "strict-origin-when-cross-origin",
mode: "no-cors",
credentials: "include",
cache: "default",
redirect: "follow"
}
And the fetch option is:
{ credentials: "omit", mode: "cors" }
Somehow CORS mode and destination: "image" doesn't seem to play along on Android. If I copy all the request options except destination (which I can't set from JS after all) and pass that, or if I omit the mode option, then the fetch succeeds.
So I think this is something in fetch side. But before passing it to networking, NI'ing Eden in case I'm missing anything.
Comment 10•15 days ago
|
||
The requestMode is set when Fetch request is constructed
https://searchfox.org/firefox-main/rev/5ffe434ed799aa243e54a264b94e4946fc792d59/dom/fetch/Request.cpp#190-197,206-209,223-225,318-320
But when the request should be intercepted by a ServiceWorker, we re-create the request from InterceptedHttpChannel for FetchEvent dispatching.
https://searchfox.org/firefox-main/rev/5ffe434ed799aa243e54a264b94e4946fc792d59/dom/serviceworkers/ServiceWorkerPrivate.cpp#329-330
And we re-compute the requestMode here
https://searchfox.org/firefox-main/rev/5ffe434ed799aa243e54a264b94e4946fc792d59/dom/fetch/InternalRequest.cpp#474-507
I guess the logic for requestMode computing might have a problem on the Android platform.
Kagami, could you add some checking on the Fetch request construction and requestMode computing to check if the requestModes are matched? And also checking them both in Android and Desktop to see if computing in Android platform get wrong?
Comment 11•13 days ago
|
||
I'm on it, but am I understanding correctly that this re-compute is about the SW-side fetch during the interception rather than content-side fetch being intercepted?
Comment 12•13 days ago
|
||
Comment 13•12 days ago
|
||
(In reply to Kagami Rosylight [:saschanaz] (they/them) from comment #11)
I'm on it, but am I understanding correctly that this re-compute is about the SW-side fetch during the interception rather than content-side fetch being intercepted?
Yes, your understanding is correct. The recompute one is for FetchEvent.request, the request sent to the ServiceWorker fetch event handler.
Comment 14•12 days ago
|
||
I see Request::Constructor in child process always setting "cors" on desktop/android (even though the request in SW is "no-cors"). From the parent process I see some requests with security mode 16 being cors, or mode 4 being no-cors. Unclear which request is from which though, probably needs better logging for that.
Note that the requests are from HTML image element, I'm not sure it's using Fetch API internally at all, so I'm not sure what we are expecting by adding logs on Request constructor.
Interestingly, calling fetch in SW via devtools with the intercepted request doesn't trigger any of the added logs.
Description
•