Call button in google maps doesn’t open the dialer app

Bug #1447617 reported by Olivier Tilloy on 2015-04-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Oxide
Undecided
Olivier Tilloy
dialer-app
Undecided
Unassigned

Bug Description

This is a regression, as this use case used to work.
Steps to reproduce:

 1) Browse to http://maps.google.com
 2) Search for any business with a phone number (e.g. Hilton Garden Inn in Austin, Texas)
 3) Tap on the bottom ribbon to display more information about the business
 4) Tap the CALL button

Expected result: the dialer app opens with the business’ phone number pre-filled

Current result: a blank tab opens, nothing seems to happen

Note that this also affects the google maps webapp, but instead of a blank tab the CALL button seems to have no action at all.

Related branches

Olivier Tilloy (osomon) wrote :

It turns out the format of the phone number in the link is to blame. For the example business I tested, the link is of the following form:

    <a target="_blank" href="tel://(512) 480-8181">CALL</a>

I initially suspected the _blank target was the problem, but it’s not (despite the fact that it makes for a bad user experience as it opens a new blank tab which then opens the dialer).

Not sure whether the problem is in oxide, url-dispatcher or dialer-app, so I’m adding tasks for all three projects until I can investigate further.

affects: webbrowser-app → oxide
Olivier Tilloy (osomon) wrote :

In oxide, in LaunchURLExternallyOnUIThread, the call to QUrl(QString::fromStdString(url.spec())) returns an invalid QUrl for "tel://(512) 480-8181", which explains why the URL dispatcher doesn’t open the dialer app.

Olivier Tilloy (osomon) wrote :

Note that removing the // separator after the scheme ("tel:") makes it a valid URL for QUrl’s constructor.

no longer affects: url-dispatcher
Changed in dialer-app:
status: New → Invalid
Olivier Tilloy (osomon) wrote :

Making it three forward slashes ("tel:///(512) 480-8181") also makes it a valid URL, for that matter. It’s really unfortunate that google maps puts only two slashes, making it an invalid URL.

Olivier Tilloy (osomon) wrote :

I guess QUrl’s parser considers "(512) 480-8181" to be the host (and it’s obviously invalid).

In contrast, it seems that the GURL we get has an empty host, but its path is "//(512) 480-8181".

Either QUrl is too strict, or GURL is more tolerant with ill-formed URLs. Either way, the conversion blows up. We could probably have some logic to try and convert the GURL to a QUrl by pieces if the constructor returns an invalid one.

Olivier Tilloy (osomon) wrote :

According to RFC 3966 (The tel URI for Telephone Numbers, http://tools.ietf.org/html/rfc3966), forward slashes after the scheme are not valid syntax. So QUrl’s parser is right to reject them. In contrast, GURL has a custom parser (based on third-party code from mozilla) which, for all non-standard schemes (kStandardURLSchemes), always considers the host empty.

We could probably write a custom GURL->QUrl converter with added logic to parse valid GURLs that produce invalid QUrls.

Olivier Tilloy (osomon) on 2015-04-24
Changed in oxide:
status: New → In Progress
assignee: nobody → Olivier Tilloy (osomon)
Olivier Tilloy (osomon) wrote :

I can’t reproduce the issue any longer, when I search businesses in google maps I’m now getting correctly-formed tel: links, e.g. for the Hilton Garden Inn in Austin I’m getting the following URL: "tel:(512) 480-8181", which is successfully converted to a valid QUrl.
I’ll mark the bug invalid now, will re-open in the future should the issue happen again.

Changed in oxide:
status: In Progress → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers