Tapping on Download icon has no response in older versions of the Chrome browser including Samsung "Internet" browser.
Closed, ResolvedPublic3 Story Points

Description

It seems there is a new feature that allows users of Chrome mobile browser to save PDF versions of articles in the tap of a button. IIRC, it is currently only available for Google Chrome. The "Internet" browser shipped by Samsung on some Android devices seems to claim itself as Chrome in its user agent and the "Download" icon is shown on the articles loaded using that browser. The sad part of this is that for older versions of the browser, tapping on the "Download" button doesn't trigger the "Print" functionality. Instead it has no reaction, i.e. nothing happens.

Digging into this deeper, there seems to be a correlation with the button not working and older versions of Chrome.

Screen shot

Environment details
Browser name: Internet
Browser supplier: Samsung
Browser version: 3.5.38.174
Device model: Samsung Galaxy J2

NOTE: This is not an issue in newer versions of the browser such as 6.2.xxx
NOTE: Per T182207 This is also an issue in Chrome.

Acceptance criteria

  • We will disable the print button for Chrome browsers < version 41 by looking at the Chrome version number in the user agent.
  • We will also disable the print button for Android browsers where the version is less than 5.
  • for the user agent Mozilla/5.0 (Linux; Android 5.1.1; SAMSUNG SM-J200G Build/LMY47X) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/3.5 Chrome/38.0.2125.102 Mobile Safari/537.36 do not show a print button
  • for Mozilla/5.0 (Linux; Android 7.0; SAMSUNG SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/6.2 Chrome/56.0.2924.87 Mobile Safari/537.36 a button is shown
  • For Mozilla/5.0 (Linux; Android 4.3; GT-I9300 Build/JSS15J) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.84 Mobile Safari/537.36 a button is not shown (Android 4)
  • If the browser is Chrome and the version of Chrome is 36.0.1985.135 or less, a button is not shown.

Testing criteria

The change is live on the beta cluster.
Run through the acceptance criteria checklist and ensure the behaviour is as expected.

Sign off steps

Developer notes

Chrome version can be obtained like so:

var match = navigator.userAgent.match(/Chrome\/([0-9]*)/);
var version = match && match[1] ? parseInt( match[1], 10 ) : undefined;
match = ua.match(/android\s([0-9\.]*)/);
var androidVersion = match ? match[1] : false;
if ( version < 41  && androidVersion < 5) {
...
  • newer Samsung browsers using newer Chrome should show the print button, e.g. 7.1. We will assume they work until told otherwise.
There are a very large number of changes, so older changes are hidden. Show Older Changes

I merged the other task into this as the underlying issue seems to be the same.

This would benefit from some reproduction using different versions of Chrome. Specifically does the print button work in versions >= 37 ?

Tbayer updated the task description. (Show Details)Dec 7 2017, 1:30 AM

can you confirm if this browser has a print functionality? from share, or overflow menu etc?

Yes. I could access the print functinoality through the "Share" feature. The only difference is that the "print" option is shown distinctly in a disjoint way from the other options (due to proprietary customization ??).

Share option in Samsung "Internet"

@Kaartic - just to confirm, which version of the samsung browser is that screenshot from?

Jdlrobson updated the task description. (Show Details)Dec 7 2017, 8:46 PM
Jdlrobson added a project: User-Jdlrobson.
Jdlrobson moved this task from Inbox to Groomed on the User-Jdlrobson board.
Jdlrobson triaged this task as High priority.

@ovasileva does high seem appropriate here?

Jdlrobson moved this task from Groomed to Tracking on the User-Jdlrobson board.Dec 7 2017, 8:49 PM

@Kaartic - just to confirm, which version of the samsung browser is that screenshot from?

If you're asking the one found above in this comment, the it's version 3.5.38.174 of the browser (just as noted in the task description).

Are there any browsers after Chrome version >= 37 for which the print button works/doesn't work?

I found a website which provides the apk for some older versions of chrome, if not all. I guess it might help in answering this to some extent.

https://chrome.en.uptodown.com/android/old

Should we be mentioning about the issue that, download button in the older versions of chrome and browsers based on that might not work, in the upcoming Tech News? I guess it might be useful. The planned publication deadline for the upcoming edition seems to be Monday 18 December 2017.

Note: FWIW, I came to know about this initiative through TechNews.

Should we be mentioning about the issue that, download button in the older versions of chrome and browsers based on that might not work, in the upcoming Tech News? I guess it might be useful. The planned publication deadline for the upcoming edition seems to be Monday 18 December 2017.

Note: FWIW, I came to know about this initiative through TechNews.

@CKoerner_WMF - any thoughts on this?

Jdlrobson updated the task description. (Show Details)Dec 20 2017, 3:59 AM
Kaartic updated the task description. (Show Details)Dec 20 2017, 2:34 PM

I added a note to the next Tech News. However that will not be published until 9 January.

https://meta.wikimedia.org/w/index.php?title=Tech/News/2018/02&diff=17564281&oldid=17562524

I also added a note on the project talk page in case folks arrive there looking for more information.

https://www.mediawiki.org/wiki/Topic:U460nn09rhn4oaxy

I'll monitor the work and make sure update folks once we arrive at a solution.

@Ckoerner would be great if we could ask people with the same issue to let us know to collect more data!

Per T182197 this is ready for estimation/working on IMO.

Jdlrobson updated the task description. (Show Details)Jan 9 2018, 5:35 PM
ovasileva set the point value for this task to 3.
Jdlrobson updated the task description. (Show Details)Jan 9 2018, 5:41 PM
ovasileva updated the task description. (Show Details)Jan 9 2018, 5:42 PM
Jdlrobson moved this task from Triage to Current Sprint on the Proton board.Jan 9 2018, 7:07 PM
pmiazga claimed this task.
Tbayer added a subscriber: Tbayer.Jan 11 2018, 10:56 PM

Change 403968 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[mediawiki/skins/MinervaNeue@master] Show Download button only on Android >= 5 & Chrome >= 41

https://gerrit.wikimedia.org/r/403968

Tested on Samsung S1, Samsung S2, Samsung S7, Samsung Note 10.1 and Samsung A5 on both Samsung Browser and Chrome, works as intended.

pmiazga moved this task from To Do to Doing on the Readers-Web-Kanbanana-Board board.
Jdlrobson reassigned this task from pmiazga to ABorbaWMF.
Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: pmiazga.

Change 403968 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Show Download button only on Android >= 5 & Chrome >= 41

https://gerrit.wikimedia.org/r/403968

I've tested on spoofed user agents and all looks good. The change should be live in about 30 mins or so on the beta cluster. Over to you @ABorbaWMF

Looks good to me so far. I have tried a bunch of devices. The icon is displaying and not displaying as expected. Some examples of older and newer chrome and firefox as well.

ovasileva updated the task description. (Show Details)Jan 23 2018, 1:41 AM
ovasileva updated the task description. (Show Details)Jan 23 2018, 1:53 AM

checking off acceptance criteria based on notes from @ABorbaWMF above.

ovasileva updated the task description. (Show Details)Jan 23 2018, 1:54 AM
ovasileva closed this task as Resolved.

seems good for now, resolving

Kaartic added a comment.EditedSat, Jan 27, 11:13 AM

The change should be live in about 30 mins or so on the beta cluster.

Should the behaviour of the download button in the beta cluster be in line with the behaviour of the download button in the production cluster? IOW, would the download button behave the same way in the production cluster after a few days as it currently behaves on the beta cluster?

I'm asking this because I am currently not seeing the spinning animation in the beta cluster when I tap on the download icon. This was on a Google Chrome running in a Android 5.1.1 device (Samsung Galaxy j2).

I'm asking this because I am currently not seeing the spinning animation in the beta cluster when I tap on the download icon.

Screen shot of a the Germany page before clicking on the download button:

Screen shot of a the Germany page after clicking on the download button before the Print Preview is shown:

I even recorded a screen cast but am not uploading it currently as phab doesn't seem to support mp4 files and I couldn't find a better place to upload it. Let me know if it's required. If possible, suggest a good site to host such media files (note: I don't have YouTube channel :) )

Looks like an unrelated regression caused by T182162
Nice spot!

Jdlrobson reopened this task as Open.Thu, Feb 1, 5:59 PM

There has been another regression. See https://phabricator.wikimedia.org/T181297#3938178

Jdlrobson raised the priority of this task from Normal to High.Thu, Feb 1, 6:09 PM

We need to get this fixed before next week's deploy. Let's make sure we also test for window.chrome

Dolphin: Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/61.0.3163.98 Mobile Safari/537.36 no chrome

Opera: Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.116 Mobile Safari/537.36 OPR/44.1.2246.123029

Maxthon
Mozilla/5.0 (Linux; Android 7.0; SM-G950U1 Build/NRD90M; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/63.0.3239.111 Mobile Safari/537.36 MxBrowser/4.5.10.1300

Change 407482 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/skins/MinervaNeue@master] Disable download button on Chrome like browsers

https://gerrit.wikimedia.org/r/407482

Change 407482 merged by jenkins-bot:
[mediawiki/skins/MinervaNeue@master] Disable download button on Chrome like browsers

https://gerrit.wikimedia.org/r/407482

Back to you Anthony. This should be fixed now.

Looks good to me. No disappearing icons.



ovasileva closed this task as Resolved.Mon, Feb 5, 2:56 PM

Looks good. Resolving for now.