HTC Sense / Facebook contacts sync

by on Aug.15, 2010

Jonathan just ran into this on his new HTC Desire (updated to 2.2 “Froyo”); I haven’t confirmed it on any other handset, but I imagine the problem is common to many HTC Sense + Android handsets. Anyhow, I figured I’d put this information out there to help anyone that runs into this issue. If anyone has a contact at HTC, please pass this along, so that they can look into a fix/workaround.

When “Facebook for HTC Sense” tries to connect to Facebook to retrieve contacts or profiles, the client sends Expect: 100-Continue in the HTTP header. Facebook’s HTTP servers do support 100 Continue, but some proxy servers (such as squid) do not. If you have configured your phone to use a proxy server, or are behind a transparent proxy (which many ISPs do inflict on their users), and the proxy server does not support this, it will (correctly) respond with 417 Expectation failed response. At this point, HTC’s client does not attempt to retry the request without requesting 100-Continue, but instead fails with an error message. This results in an empty Facebook directory / contacts list, and an error when you attempt to refresh it.

If the proxy server is on your own network, simply bypassing it should solve the issue for you. If this is your ISP’s proxy server, then you’ll either need to work around it somehow, or contact HTC and/or your ISP for assistance.

:, , ,

  • Jonathan

    To clarify (for anyone searching for this problem): This is the “Connection Error” message from the “Online Directories” section of the “People” application.

    I found this out by looking at a packet dump when trying to refresh the Facebook online directory on my phone. The final response back to my phone was “417 Expectation failed” from my own proxy server, obviously not what you want to see.

  • galapogos01

    Great blog post on this issue! FYI, it also affects the FriendStream and Stock widgets, and probably anything using the HTC Sense framework to send web service requests. It is a HTTP/1.0 non-compliance issue.

    To get around it, you can upgrade to a HTTP/1.1 compliant proxy (Squid 3.1 is, partially) use the ‘ignore_expect_100 on’ directive in your squid conf. This makes squid ignore the request, essentially making squid non-compliant, but it makes the Sense apps work.

    See http://www.squid-cache.org/Doc/config/ignore_expect_100/ for more info.

    Jason

  • thomas

    Thank’s a lot! I’ve been looking for a solution for several days, and event the HTC hotline couldn’t help me…
    So in my case, reseting the phone, deleting the “Fb for HTC sense” account, clearing cache, creating it again, killing the Fb app… has no effect. Only changing my wifi provider allowed me to synchronize my contacts!

    However, to my mind, it is unbeliveable that HTC has not solved this problem yet, et still sells phones with a feature which is unavailable with some proxies configurations (and so with some providers)…

Search

Loading