Closed Bug 1049162 Opened 10 years ago Closed 7 years ago

[Open 2][Flame 2.0] Can't Connect to FMD After Being Locked for a While or Restarting

Categories

(Firefox OS Graveyard :: FindMyDevice, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: kglazko, Unassigned)

References

Details

Attachments

(2 files)

Open 2 running 2.0.0. on stable, verified wifi connection, no Sim Card. STR: - Sign into FxA/ Enable FMD on device - Sign into website, verify it connects. Cool. - Take out battery from phone. It should die. Put back in. Restart device. - After phone is functioning again, check settings. FMD should be enabled. - Try to connect to website. Expected: Enabled device should connect to website. Actual: Device does not connect.
This also repros if you let your device sit for a while and try to connect. Internet works, however, FMD doesn't and won't until you toggle.
Summary: [Open2 2.0.0.] Can't Connect to FMD After Taking Out Battery and Restarting → [Open2 2.0.0.] Can't Connect to FMD After Being Locked for a While or Restarting
Summary: [Open2 2.0.0.] Can't Connect to FMD After Being Locked for a While or Restarting → [Open 2] Can't Connect to FMD After Being Locked for a While or Restarting
Repro'ing on Flame today. Forced me to toggle enable/disable to begin locating device.
Summary: [Open 2] Can't Connect to FMD After Being Locked for a While or Restarting → [Open 2][Flame 2.0] Can't Connect to FMD After Being Locked for a While or Restarting
Not sure if you can, but can you try and get a adb lolcat dump and see if the phone is reporting anything funky? (then post the log to gist.github.com or somewhere). I'm guessing that a simple battery pull wouldnt cause a new deviceid to be generated... that'd be too weird. Depending on the lolcat output we can assign this to :ggp or :jrconlin to investigate whether this is a client or server issue (or possibly even :nchapman if it's a front end issue).
Blocks: 1040394
I stopped the log when it began locating on the website. Logcat w/Gaia Debug Traces: https://pastebin.mozilla.org/5845419
I can reproduce this on my Flame running the latest PVT build from m-c: Gaia 80c88f1ef3237e735f204d7db24aac59ff89ebab Gecko https://hg.mozilla.org/mozilla-central/rev/afcb3af79d09 FMD is not getting any push notifications after the battery is re-inserted and the device reboots. Disabling and re-enabling makes FMD ping the server for commands, which is why things seem to work afterwards, but it still doesn't receive pushes when new commands are triggered in the website. This is looking very similar to bug 1040394.
Rebooting again doesn't help either, still unable to receive push notifications. Maybe JR knows anything about this? But I suspect it's a client-side push bug.
Flags: needinfo?(jrconlin)
ggp, were you unable to get Push notification after rebooting and verify that there's an active network connection to the device? If that's the case, knowing the push URL for the device would be helpful (or if you can provide the FMD deviceID I should be able to find the record for it and see if it's hitting our servers.
Flags: needinfo?(jrconlin) → needinfo?(ggoncalves)
I just reproduced again and made sure I had a working connection while not receiving push notifications. JR also confirmed that the server logs look normal, except for the interval in which the device doesn't respond to push notifications. It most likely looks like a push client bug.
Flags: needinfo?(ggoncalves) → needinfo?(nsm.nikhil)
I've reproduced this on the flame with 319M memory and the problem consistently happens. If I reboot the phone and change the available memory to "auto", FMD works just fine. This must be something being OOMd by the kernel on the device.
For the record, my Flame was set to 512Mb when I reproduced this.
Ditto on the 512 Mb Flame ^
:ggp, Can I see a logcat with services.push.debug = true? Although keeping it connected to USB may not help much. I can think of a scenario in which the above bug might occur: Prereq: This device has been flashed or similar so that it has no Push UAID. 1) FMD is the only app using push on the device and it is enabled leading to a registration which leads the device getting a UAID. 2) Battery is popped. Filesystem/Settings hasn't synced the UAID to disk yet. 3) Phone is rebooted, effectively has a null UAID. 4) No push notifications. The bug may be that http://mxr.mozilla.org/mozilla-central/source/dom/push/src/PushService.jsm#1002 only sends "push-register" if there is a non-null existing UAID that does not match. In this case it is a null UAID. Perhaps we should drop that non-null check. Could someone with a device verify that the UAID is indeed null at step 3? Should be simple after enabling services.push.debug = true since it should log "New _UAID: XXX" to logcat.
Flags: needinfo?(nsm.nikhil)
QA Wanted for comment 14
Keywords: qawanted
Hi Nikhil, Can you please briefly describe again what needed to be tested? It will be helpful for doing the branch checks
Flags: needinfo?(nsm.nikhil)
(In reply to Nikhil Marathe [:nsm] (needinfo? please) from comment #13) > :ggp, Can I see a logcat with services.push.debug = true? Although keeping > it connected to USB may not help much. I can think of a scenario in which > the above bug might occur: > Which file do we add that code to?
Flags: needinfo?(nsm.nikhil)
b2g/app/b2g.js
Flags: needinfo?(nsm.nikhil)
Is that supposed to be a file that is on the phone by default? On a fresh flash there is not a b2g folder in the main directory.
Flags: needinfo?(nsm.nikhil)
b2g/app/b2g.js is the file as it is called in the source (mozilla-central or whatever branch of b2g). I don't know what that file gets converted to in a build. Fabrice?
Flags: needinfo?(nsm.nikhil) → needinfo?(fabrice)
It's getting turned into the default prefs file, located at /system/b2g/default/prefs You can add any js file there with your own prefs and they will take effect.
Flags: needinfo?(fabrice)
Attached file logcat on Flame 2.0 part 1 (deleted) —
I created a .js file and put this line in there: pref("services.push.debug", true); I pushed the .js file into /system/b2g/defaults/pref Then I did the STR (except I turned off the device then took out battery, instead of directly taking out battery. the outcome didn't make a difference though) Attaching the first part of logcat before rebooting.
Attached file logcat on Flame 2.0 part 2 (deleted) —
Second part of logcat consisting of device after rebooting and finding out that FMD website can't find my device on the map.
Tested on: Device: Flame 2.0 BuildID: 20150722160201 (<-- this is the newest 2.0 we have) Gaia: b16ba05481e577bc644ed8966f587a70fe2148e6 Gecko: 7db5c7bd2976 Gonk: bd9cb3af2a0354577a6903917bc826489050b40d Version: 32.0 (2.0) Firmware Version: v18Dv4 User Agent: Mozilla/5.0 (Mobile; rv:32.0) Gecko/32.0 Firefox/32.0
QA Whiteboard: [QAnalyst-Triage?]
Flags: needinfo?(jmercado)
Keywords: qawanted
QA Whiteboard: [QAnalyst-Triage?] → [QAnalyst-Triage+]
Flags: needinfo?(jmercado)
From attachment 8661516 [details]: > 09-15 16:33:21.853 954 954 I GeckoDump: [findmydevice] POST-ing to https://find.firefox.com/1/cmd/7d054809405b2e9e803e77f088a6e5f8: {"t":{"ok":true,"la":47.707264,"lo":-122.1910315,"acc":210.169955,"ti":1442360001855},"has_passcode":false} The device is sending location to the server ... ? Are there are several other ... So I would say FMD client side is fine ?
Flags: needinfo?(pcheng)
Flags: needinfo?(jrconlin)
I have no idea.
Flags: needinfo?(pcheng)
odd. Trying with a Flame locally. I'm able to send commands and locate the phone while locked, and even after a reboot. It took a couple of seconds to get online and establish a connection, but I'm able to send commands and get the location. So that means that messages are getting to my device, and coordinates are being reported back. I'm going to try a few things, including waiting for a device timeout, and see if I can replicate what you're seeing. I know that my flame has had problems resolving it's location in the past, but it has always responded to commands like "ring". This is using b2g 2.2.0.0-prerelease
Flags: needinfo?(jrconlin)
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: