Page MenuHomePhabricator

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.

Event Timeline

JMinor triaged this task as Medium priority.Jan 17 2017, 10:27 PM
JMinor moved this task from Needs Triage to Tracking on the Wikipedia-iOS-App-Backlog board.

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.

@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 thanks for the update! We will get it checked out

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