Closed Bug 827633 Opened 12 years ago Closed 9 years ago

hao123.com doesn't recognize B2G UA as mobile

Categories

(Web Compatibility :: Site Reports, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(b2g-v2.0 affected, b2g-v2.1 affected, b2g-v2.2 affected, b2g-master unaffected)

RESOLVED INVALID
Tracking Status
b2g-v2.0 --- affected
b2g-v2.1 --- affected
b2g-v2.2 --- affected
b2g-master --- unaffected

People

(Reporter: lmandel, Assigned: karlcow)

References

()

Details

(Whiteboard: [uaoverride] [country-cn][serversniff] [sitewait])

Attachments

(4 files)

hao123.com serves a desktop site to B2G. Bug 819210 added an UA override for this domain. The override should be removed once the domain serves mobile content to B2G. This bug tracks the evangelism for the site to recognize the B2G UA and the removal of the override at that time.
Blocks: hao123.com
Whiteboard: [uaoverride]
Whiteboard: [uaoverride] → [uaoverride] [country-zh]
Whiteboard: [uaoverride] [country-zh] → [uaoverride] [country-zh][serversniff]
hao123.com does a redirection for Android devices and not for Firefox OS. We currently have a UA override, that we need to remove. The site needs to be contacted. Using Firefox for Android UA. GET / HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, compress Host: www.hao123.com User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0 HTTP/1.1 302 Found Content-Length: 0 Date: Thu, 05 Sep 2013 11:59:53 GMT Location: http://www.hao123.com/wise_test.php Server: BWS/1.0 Then GET /wise_test.php HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, compress Host: www.hao123.com User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0 HTTP/1.1 302 Found Content-Length: 0 Content-type: text/html Date: Thu, 05 Sep 2013 12:00:54 GMT Location: http://m.hao123.com/?vit=h123&from=3w123 P3P: CP=" OTI DSP COR IVA OUR IND COM " Server: BWS/1.0 Set-Cookie: BAIDUID=55DAFC3B8C3CD7A1F98F300E338BE0D9:FG=1; max-age=31536000; expires=Fri, 05-Sep-14 12:00:54 GMT; domain=.hao123.com; path=/; version=1 And GET /?vit=h123&from=3w123 HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, compress Host: m.hao123.com User-Agent: Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0 HTTP/1.1 200 OK Content-Encoding: gzip Content-type: text/html;charset=utf-8 Date: Thu, 05 Sep 2013 12:01:27 GMT P3P: CP=" OTI DSP COR IVA OUR IND COM " Server: BWS/1.0 Set-Cookie: BAIDUID=BEAC1AD45D37A2B78596ABABB743F370:FG=1; max-age=31536000; expires=Fri, 05-Sep-14 12:01:27 GMT; domain=.hao123.com; path=/; version=1 Transfer-Encoding: chunked Vary: Accept-Encoding author: c57ac1d37ff8e865aa5518c5d74273a9 With Firefox OS UA. GET / HTTP/1.1 Accept: */* Accept-Encoding: gzip, deflate, compress Host: www.hao123.com User-Agent: Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0 HTTP/1.1 200 OK Accept-Ranges: bytes Cache-Control: max-age=0 Content-Encoding: gzip Content-Length: 36841 Content-type: text/html;charset=UTF-8 Date: Thu, 05 Sep 2013 12:02:05 GMT ETag: "1609482341" Expires: Thu, 05 Sep 2013 12:02:05 GMT Last-Modified: Thu, 05 Sep 2013 11:18:00 GMT P3P: CP=" OTI DSP COR IVA OUR IND COM " Server: BWS/1.0 Set-Cookie: BAIDUID=476E5118FFB69B813F50A5646ADBBEDB:FG=1; max-age=31536000; expires=Fri, 05-Sep-14 12:02:05 GMT; domain=.hao123.com; path=/; version=1 Set-Cookie: hz=0; path=/; domain=www.hao123.com Vary: Accept-Encoding
Flags: needinfo?(lecky.wanglei)
Whiteboard: [uaoverride] [country-zh][serversniff] → [uaoverride] [country-zh][serversniff] [contactready]
Flags: needinfo?(lecky.wanglei)
hi,karl,do you mean that i should contact the website?
hi,karl,do you mean that i should contact the website?
Lecky, yes if you could, that would be nice. My chinese is rusty. :)
Whiteboard: [uaoverride] [country-zh][serversniff] [contactready] → [uaoverride] [country-cn][serversniff] [contactready]
Hao123 belongs to baidu. http://www.hao123.com/abouthao123.htm
Assignee: nobody → kdubost
Status: NEW → ASSIGNED
Contacted someone working at baidu.
Whiteboard: [uaoverride] [country-cn][serversniff] [contactready] → [uaoverride] [country-cn][serversniff] [sitewait]
no answer. Trying to recontact the same person.
Ah. 550 5.1.1 Error: the percentage of invalid recipients is over thresholds from 63.245.216.72 (in reply to DATA command) Bummer. The person doesn't work there anymore. We will have to try to find someone else. Yliu, do you have contacts at Baidu?
Flags: needinfo?(yliu)
(In reply to Karl Dubost :karlcow from comment #9) > Ah. > 550 5.1.1 > Error: the percentage of invalid recipients is over thresholds from > 63.245.216.72 (in reply to DATA command) > > Bummer. The person doesn't work there anymore. We will have to try to find > someone else. > > Yliu, do you have contacts at Baidu? Hi Karl, Our BD colleague Sam has contacnted Baidu, but not got their reply so far.
Flags: needinfo?(yliu)
Depends on: 1094555
yliu, See also what I have done for fixing the CSS on hao123.com in bug 1094555 just 6 lines of code. I have given the patche in the attachments, if it helps them to move faster on the issue.
Flags: needinfo?(yliu)
(In reply to Karl Dubost :karlcow from comment #11) > yliu, > See also what I have done for fixing the CSS on hao123.com in bug 1094555 > just 6 lines of code. I have given the patche in the attachments, if it > helps them to move faster on the issue. Thanks Karl. I will give the patch to hao123.com, hope they can fix these bugs as soon as possible.
Flags: needinfo?(yliu)
Attached image screenshot
Screenshot from Flame device
This seems fixed - except CSS issues still remain - but I'm wondering if the Flame has some site-specific spoofs although I've tried to disable them. Several "fixes" I can't reproduce in other environments :-/
Status: ASSIGNED → NEW
That screenshot was actually taken with the Android spoof setting intact - I thought I had disabled it..
Status: NEW → ASSIGNED
the screenshot is not good. we still receive the desktop site.
Hi All, I can repro this bug on Flame v2.0&2.1&2.2,but can't repro on Flame v3.0. See attachments: hao123_v2.2.png and logcat_v2.2_1243.txt Reproduce rate: 5/5 Repro STR: 1.Connect a wifi and launch Browser app. 2.Go to URL "www.hao123.com". 3.Input some words in search box and search it. **Some words and icons are overlapped and in a mess in URL "www.hao123.com". Flame 2.0 (affected): Build ID 20150319000203 Gaia Revision 896803174633fc6acd3fd105f81c349b8e9b9633 Gaia Date 2015-03-10 06:32:26 Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g32_v2_0/rev/3db01d6d6df5 Gecko Version 32.0 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20150319.033109 Firmware Date Thu Mar 19 03:31:20 EDT 2015 Bootloader L1TC000118D0 Flame 2.1 (affected): Build ID 20150319001227 Gaia Revision 13c85d57f49b4bfd657ff674f2b530c141c94803 Gaia Date 2015-03-17 13:31:54 Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g34_v2_1/rev/cd8d3214bffd Gecko Version 34.0 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20150319.034825 Firmware Date Thu Mar 19 03:48:36 EDT 2015 Bootloader L1TC000118D0 Flame 2.2 (affected): Build ID 20150319002500 Gaia Revision 9043c11f699c15bb6072422d1dad6518d1b5ddda Gaia Date 2015-03-19 01:40:44 Gecko Revision https://hg.mozilla.org/releases/mozilla-b2g37_v2_2/rev/c0442d170bec Gecko Version 37.0 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20150319.042028 Firmware Date Thu Mar 19 04:20:38 EDT 2015 Bootloader L1TC000118D0 Flame 3.0 (unaffected): Build ID 20150319160212 Gaia Revision c39e15f631de80c69467fda0d4ea0bcda9e194ca Gaia Date 2015-03-18 19:30:04 Gecko Revision https://hg.mozilla.org/mozilla-central/rev/cbd0efcd976c Gecko Version 39.0a1 Device Name flame Firmware(Release) 4.4.2 Firmware(Incremental) eng.cltbld.20150319.193329 Firmware Date Thu Mar 19 19:33:42 EDT 2015 Bootloader L1TC000118D0
Shally, Did you deactivate remote User Agent override on both devices before testing? Thanks?
Flags: needinfo?(lixia)
QA Whiteboard: [MGSEI-Triage+]
Flags: needinfo?(lixia)
(In reply to Karl Dubost :karlcow from comment #20) > Shally, > Did you deactivate remote User Agent override on both devices before testing? > Thanks? Hi Karl, I can't deactivate remote UA override,and it shows "User-Agent Mozilla/5.0 (Mobile; rv:37.0) Gecko/37.0 Firefox/37.0" on Flame v2.2. If it is needed, could you help to provide the ways to deactivate? Thank you very much.
Flags: needinfo?(kdubost)
Shally, Each time you need to test, it's necessary to deactivate the UA override on Firefox OS. The UA override is a mechanism to change dynamically the UA for specific domain names, not all domain names. For deactivating the UA override, you need to set in /system/b2g/defaults/pref/user.js pref("general.useragent.updates.enabled", false); Do not hesitate to ask if you need more information.
Flags: needinfo?(kdubost)
Hi Karl, No such the matched strings: "general.useragent.updates.enabled" in "user.js" on Flame. Thank you for your kindly reply.
There is a mechanism for it https://hg.mozilla.org/mozilla-central/file/tip/b2g/app/b2g.js#l913 Ok let's see. Download this bash script. https://raw.githubusercontent.com/karlcow/webcompat/master/moz/mozua2.sh Then in the shell, type: bash mozua2.sh override off You will get this message below more or less. The device will restart and UA override will be off. After that you can test again hao123.com. Hope it helps. ========================================= UA override management on Firefox OS 1.2+ ========================================= 1518 KB/s (3726 bytes in 0.002s) Stop UA override Pushing to device + adb shell mount -o rw,remount /system + adb push /tmp/user.js.tmp /system/b2g/defaults/pref/user.js 936 KB/s (3776 bytes in 0.003s) + adb shell mount -o ro,remount /system + restart + echo 'Restart the device (software)' Restart the device (software) + adb shell stop b2g + adb shell start b2g + echo 'Bye!' Bye! Tell me if you are successful.
Flags: needinfo?(lixia)
Hi Karl, Yes,it runs successfully.The url "http://www.hao123.com/" will display normally,upload the screenshot about on Flame v2.2. Thank you very much.
Flags: needinfo?(lixia) → needinfo?(kdubost)
excellent. Back to normal testing. :) Thanks Shally.
Flags: needinfo?(kdubost)
We need to remove the UA override for this domain. When entering hao123.com on Chrome, Firefox OS or Firefox Android, we always receive the desktop version.
Blocks: 1180543
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Product: Tech Evangelism → Web Compatibility
Component: Mobile → Site Reports
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: