Fix universal link support in iOS when the OS requests the site association file from m.wikipedia.org
Closed, ResolvedPublic

Description

[ https://developer.apple.com/library/content/documentation/General/Conceptual/AppSearch/UniversalLinks.html#//apple_ref/doc/uid/TP40016308-CH12

Universal links ] for iOS was setup here:

T111829
https://gerrit.wikimedia.org/r/#/c/250897/

And it appears there were some 404s that were resolved in the summer:
T130647
https://gerrit.wikimedia.org/r/#/c/287190/

Recently we were troubleshooting reports about universal links not working.

After investigating, these appear to be working:
https://wikipedia.org/apple-app-site-association
https://www.wikipedia.org/apple-app-site-association

But 404s being served from:
https://m.wikipedia.org/apple-app-site-association

We need to resolve this to fix universal link issues within the app.

It appears we need to symlink to fix this, investigating if this is the appropriate solution.

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 17 2017, 4:51 PM
JMinor triaged this task as "Normal" priority.Jan 17 2017, 10:27 PM
JMinor moved this task from Needs Triage to Tracking on the Wikipedia-iOS-App-Backlog board.
ema moved this task from Triage to Watching on the Traffic board.Jan 18 2017, 9:23 PM
ema moved this task from Watching to Caching on the Traffic board.Jan 18 2017, 9:58 PM
ema added a subscriber: ema.Jan 19 2017, 12:56 AM

We do have a regex in VCL rewriting mobile hostnames into desktop hostnames (eg: it.m.wikipedia.org -> it.wikipedia.org).

Also, there are a bunch of special cases used to rewrite "language-less" mobile hostnames into desktop hostnames (eg: m.wikimediafoundation.org -> wikimediafoundation.org).

m.wikipedia.org does not seem to be covered there, hence the 404.

We could get rid of all those special cases by expanding the current language regex and making it handle all rewrites.

For example:

  • m.wikipedia.org -> wikipedia.org
  • en.m.wikipedia.org -> en.wikipedia.org
  • m.wikimediafoundation.org -> wikimediafoundation.org

There are two exceptions to this renaming scheme: m.mediawiki.org -> www.mediawiki.org and m.wikidata.org -> www.wikidata.org which by extending the regex would become m.mediawiki.org -> mediawiki.org and m.wikidata.org -> wikidata.org.

Fjalapeno edited the task description. (Show Details)Jan 19 2017, 1:58 AM

@ema we only need to cover *.wikipedia.org - does that make it easier?

Change 333157 had a related patch set uploaded (by Ema):
Text VCL: consolidate mobile hostname rewrite regex

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

Change 333157 abandoned by Ema:
Text VCL: consolidate mobile hostname rewrite regex

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

Change 333158 had a related patch set uploaded (by Ema):
Text VCL: consolidate mobile hostname rewrite regex

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

@JMinor @JoeWalsh the fix for this is getting merged in tomorrow. I'll let you know when it is deployed

Change 333158 merged by Ema:
Text VCL: consolidate mobile hostname rewrite regex

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

Mentioned in SAL (#wikimedia-operations) [2017-01-27T15:45:11Z] <ema> cache_text: ban req.url == "/apple-app-site-association" && obj.status == 404 (T155504)

ema added a comment.Jan 27 2017, 3:58 PM

@Fjalapeno @JMinor @JoeWalsh the issue should be fixed.

@ema thanks for the update! We will get it checked out

@ema thanks! it's working now

Fjalapeno closed this task as "Resolved".Jan 27 2017, 8:57 PM

@ema - just checked… and it is fixed… thanks again!