How do I debug firefox sync on mobile firefox
I have a custom sync server set up. All of my internal devices - both Windows and Linux - can see the sync server, and Firefox is syncing just fine between them all. DNS is set up appropriately so that the same hostname resolves to my web server both internal to my network and from the Internet, allowing sync to work while traveling. I also have a fully up-to-date Galaxy S3, upon which I've installed Mobile Firefox. When I attempt to set up sync in the mobile browser, it says "syncing", but never contacts the web server (according to the Apache logs). I can directly type in the sync URL (http://firefox_sync.mydomain/) on the Firefox URL bar, and I get the expected 401 response. It doesn't matter if I use the shortcut mechanism where I type the three 4-character strings, or if I directly type in the URL, password, and restore code; it doesn't matter if I'm using wireless networking on my local LAN or mobile data. Mobile Firefox never seems to hit the web server - but it does seem to be happy enough with the URL information to go ahead and claim that it's starting the sync process.
My phone is not rooted, and I'd like to keep it that way. So far, the only next step I can think of is to use the wireless connection with mobile data shut off, and fire up a sniffer on the wireless router to see what data, if any, is being sent out by the phone. But that seems a bit like smashing a fly with a wrecking ball. :) Is there any more elegant way to figure out what is going wrong with the sync process? Is mobile Firefox simply unwilling to use a custom server (or just http, which will be a real pain due to the issue with name-based virtual hosts and ssl)?
Всички отговори (7)
I fired up tcpdump on the WAP. If I cancel the sync after it's connected and then hit "sync now", in the next minute or so I see my phone open https connections to two sites at 1e100.net (that Google domain still makes me laugh), Facebook, and a compute.amazonaws.com node. I don't know for sure if those are related or to the sync or not. The only DNS queries are to look up that amazonaws host. And that's it for the traffic. So I know it's not even trying to hit my server.
See http://160.twinql.com/how-to-file-a-good-android-sync-bug
Checking on the #sync irc channel on irc.mozilla.org would be good as well.
Same problem, posted to http://forums.mozillazine.org/viewtopic.php?f=47&t=2660321&sid=&p=12669083#p12669083 , was redirected here. Fullpaste:
I'm running the minimal weave sync server since it was made available and have successfully running four separate FF desktop synced to add. I'm trying to add my FF mobile but I fail.
I got to sync, "Advanced setup", and enter Account name, Password and Recovery Key; all information I have available. I also check "custom server" and provide my URL. I'm using a HTTPS with my own cert so I have alreayd opened it before in FF mobile to accept the cert permanently.
Once I click connect however all I get is: Please enter a valid server URL
Since I'm in control of the server side, I'm stumbled here: there is no actual request received from the FF mobile to my sync server at all. But it tries to. I know this because I disabled WI-FI and it took a long time and I saw the 3G indicate sending/receiving pakets. But they did not went to my server.
I know I can access my server and it works because I tested the same URL before in the browser itself (to accept the custom cert).
What I'm doing wrong?
Променено на
Getting a sync log as described above would help.
I would like but the application aLogcat does not seem to record anything related to Firefox at all when I ran it and tried the sync stuff? It always only seemed to record events happening while I was looking at the aLogcat screen (mouse gestures, switching to FF). I sounds weird I know but it seemed aLogcat didn't recognize anything besides itself ...
I'm pulling down the whole 400+MB SDK, and will try to grab some logs when that finishes. Maybe I'll finally get around to writing that app I've been avoiding, too, as long as I'm eating a boatload of disk space.
So, I went to that "how to file a good bug" link, and the generated log file creates a whole bunch of output which details all of the network activity on my phone. As much as I'd like to share in public the full list of network connections made by my network monitor and email programs, among others, that seems like it wouldn't be real relevant to tracking this down. And there are only a couple of entries in the log relevant to Firefox.
What *actual* information is useful to helping figure this out? I can contribute that the automatic setup results in Firefox just spinning, and that manually typing in my recovery key, password, and the URL immediately returns failure with a custom URL. Pasting the exact same URL into Firefox's URL bar gets me the expected blank page with entries in the web server log, so I know the phone can reach the server. I have six devices on the network all syncing as well, so I know the server and the auto-enrollment works. The same URL works the same way on mobile data as on the WiFi. Only Mobile FireFox isn't working. It fails identically on my wife's Firefox, though we're both using the same Galaxy S3 (Sprint) with Firefox 22.0, so that's expected.
Perhaps the question I should be asking is "has anyone actually succeeded in using a custom sync server with Mobile Firefox?" :)