GMail App - css does not get applied to the Mail App

Bug #1227941 reported by kylea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
webbrowser-app
Fix Released
High
Bill Filler
webbrowser-app (Ubuntu)
Fix Released
High
Bill Filler
Saucy
Fix Released
High
Bill Filler

Bug Description

Access www.google.com

login,I have an Apps Account

Select Mail

Mail app starts , however does appear to apply any CSS to the HTML, just ugly plain HTML

This is using the latest Saucy Build. It used to work on a 12.04 install.

Related branches

Revision history for this message
kylea (kylea) wrote :

I am seeing the same issue in the Facebook web app too

Revision history for this message
Olivier Tilloy (osomon) wrote :

I can’t reproduce this. I’m getting the gmail webapp correctly themed and functional.
Is this something you can reproduce reliably? What if you delete the cache at ~/.local/share/webbrowser-app/.QtWebKit/ ?
Is this on a device or on desktop?

Revision history for this message
kylea (kylea) wrote :

On a Nexus 4 - will try your suggestion - although have done several re-installs

Revision history for this message
kylea (kylea) wrote :

Ok deleted the cache folder - same result, also rebooted

Revision history for this message
kylea (kylea) wrote :
Revision history for this message
kylea (kylea) wrote :
Revision history for this message
Bill Filler (bfiller) wrote :

I can confirm. This is because of the user-agent string.
Add this to the end of ua-overrides.js file and you'll see gmail like it should be seen

 "mail.google.com" : "Mozilla/5.0 (Ubuntu; Linux; Android 4.2.2) AppleWebKit/537.21 Mobile Safari/537.21",

Working on getting this integrated into the file but need to do more testing.

Changed in webbrowser-app:
status: New → Confirmed
importance: Undecided → High
assignee: nobody → Bill Filler (bfiller)
Changed in webbrowser-app (Ubuntu):
status: New → In Progress
Changed in webbrowser-app:
status: Confirmed → In Progress
Changed in webbrowser-app (Ubuntu):
importance: Undecided → High
assignee: nobody → Bill Filler (bfiller)
Revision history for this message
Olivier Tilloy (osomon) wrote :

There is already an override for google.com, and it works for me here, so I’m not sure what the problem is.

Revision history for this message
Bill Filler (bfiller) wrote :

I am directly going to gmail.com in the browser and logging in. I've attached 2 screenshots.

One is with the default override
"google.com": ["Mobile", "Android; Mobile"]

One is with the new override (note for some reason just overriding mail.google.com doesn't work, have to override google.com)
"google.com" : "Mozilla/5.0 (Ubuntu; Linux; Android 4.2.2) AppleWebKit/537.2
1 Mobile Safari/537.21"

As you can see from the pictures, using the second override renders something similar to iphone and android, which is what we want. However this override causes problems using google+ (plus.google.com) where scrolling stops working. I tried to add an override at the end for plus.google.com to just use original google override but this didn't work.

How can I use one override for gmail and another for google +? couldn't figure that out.

Revision history for this message
Bill Filler (bfiller) wrote :
Revision history for this message
Bill Filler (bfiller) wrote :
Revision history for this message
kylea (kylea) wrote :

Where can I find ua-overrides.js to try this ?

Revision history for this message
Bill Filler (bfiller) wrote :

/usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/Extras/Browser/ua-overrides.js

Revision history for this message
kylea (kylea) wrote :

Attached is a modified version of ua-overrides.js that formats GMail Web App correctly. There is a slight correction to the suggested format - must have ["Mobile",".....

var overrides = {
    "google.com": ["Mobile","Mozilla/5.0 (Ubuntu; Linux; Android 4.2.2) AppleWebKit/537.21 Mobile Safari/537.21"],

Revision history for this message
kylea (kylea) wrote :

BTW - This also fixes Google Plus - it scrolls properly. Facebook still looks odd - might try that on my Galaxy Nexus Andriod 4.2 and see that it looks like.

Revision history for this message
kylea (kylea) wrote :

If I add "facebook.com": ["Mobile","Mozilla/5.0 (Ubuntu; Linux; Android 4.2.2) AppleWebKit/537.21 Mobile Safari/537.21"],

after google.com then m.facebook.com works nicely too.

Revision history for this message
kylea (kylea) wrote :

This version of ua-overrides.js fixes Gmail, GooglePlus and Facebook webapp appearance

Revision history for this message
kylea (kylea) wrote :

BTW to update this file I mounted the Nexus 4 on my Ubuntu Desktop - copied the file to my desktop and added the extra values and then copied it back to Documents folder

To actually update the file I mounted the phones filesystem as RW

mount -n -o remount,rw /

then copied the file to the path /usr/lib/arm-linux-gnueabihf/qt5/qml/Ubuntu/Components/Extras/Browser/ua-overrides.js

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:webbrowser-app at revision 349, scheduled for release in webbrowser-app, milestone ubuntu-13.04-month-5

Changed in webbrowser-app:
status: In Progress → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package webbrowser-app - 0.22+13.10.20130930.1-0ubuntu1

---------------
webbrowser-app (0.22+13.10.20130930.1-0ubuntu1) saucy; urgency=low

  [ Bill Filler ]
  * add user-agent override for mail.google.com. (LP: #1227941)

  [ Alexandre Abreu ]
  * Fix issue w/ with invalid webapp component id/access when filtering
    urls. (LP: #1231228)

  [ Olivier Tilloy ]
  * Update the licensing information for assets. (LP: #1194916)

  [ Ubuntu daily release ]
  * Automatic snapshot from revision 354
 -- Ubuntu daily release <email address hidden> Mon, 30 Sep 2013 16:32:46 +0000

Changed in webbrowser-app (Ubuntu Saucy):
status: In Progress → Fix Released
Olivier Tilloy (osomon)
Changed in webbrowser-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers