Closed Bug 797895 Opened 13 years ago Closed 13 years ago

geolocation is not working anymore on my Samsung Galaxy S2

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: zer0, Assigned: dougt)

Details

In both Release and Nightly, gelocation doesn't work anymore. If I visit a website (like for instance, http://html5demos.com/geo, I got the doorhanger notification about sharing my location, but after I share it nothing happens: to be precise, the GPS icon doesn't blink on Android top bar. On other hand, if I use Opera on the same site, everything works. Here the logcat I got when I'm trying to share the location on Fennec: D/LocationManagerService( 1980): network location requested by an application I/SurfaceFlinger( 1819): id=315 Removed PopupWindow:416718f8 idx=4 Map Size=5 I/SurfaceFlinger( 1819): id=315 Removed PopupWindow:416718f8 idx=-2 Map Size=5 E/Watchdog( 1980): !@Sync 52 E/DataRouter( 1817): usb connection is true E/DataRouter( 1817): DSR is ON. Don't send DTR ON. E/lights ( 1980): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 2 W/PowerManagerService( 1980): Timer 0x7->0x3|0x0 I/PowerManagerService( 1980): Ulight 7->3|0 D/PowerManagerService( 1980): setLightBrightness : mButtonLight : 0 E/DataRouter( 1817): usb connection is true E/DataRouter( 1817): DSR is ON. Don't send DTR ON. E/DataRouter( 1817): usb connection is true E/DataRouter( 1817): DSR is ON. Don't send DTR ON. And here the logcat when I share the connection on Opera: D/LocationManagerService( 1980): gps location requested by an application D/GpsLocationProvider( 1980): GPS_REQUEST_AGPS_DATA_CONN D/GpsLocationProvider( 1980): startUsingNetworkFeature failed D/ConnectivityService( 1980): special network not available D/GpsLocationProvider( 1980): startNavigating : SensorAiding is com.android.server.location.GpsLocationProvider$SensorAiding@41834060 D/SensorManager( 1980): registerListener :: handle = 0 name= K3DH Acceleration Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$1@41847050 V/GpsLocationProvider( 1980): reportStatus status: 3 V/GpsLocationProvider( 1980): reportStatus status: 1 D/GpsLocationProvider( 1980): send an intent to notify that the GPS has been enabled or disabled mNavigating = true D/AKMD2 ( 1980): akm_set_delay: accel same delay = 200000000 Notice that Fennec uses the LocationManagerService asking for "network location" where Opera is using LocationManagerService asking for "gps location"; in fact, the GpsLocationProvider runs immediately. Notice that both with USB cable connected and disconnected I have the same result, and with both WiFi enabled and disabled. My device info: - Samsung Galaxy S2, GT-I9100 (bought in Europe) - Android 4.0.4 - Kernel: 3.0.15-1056084 dpi@DELL168 #3 SMP PREEMPT Wed Aug 22 22:55:24 KST 2012 - Build: IMM76D.XWLPW
i do not believe anything has change in quite a while... Is this a regression? Do you recall when this did work (if at all?).
FWIW User reported that desktop Firefox is able to locate itself on the same site via Wifi.
I don't think I never tried to use geolocation from Firefox. Maybe once. It could be also that the recent Samsung upgrade did something. I honestly have no idea.
I tried to reproduce this by enabling Wifi, letting a geolocation page pop up the question, and then disabling Wifi on my phone. Logcat shows: W/GeckoApp(15233): onLocationChanged Location[mProvider=network,mTime=1349366686237,mLatitude=50.8273951,mLongitude=3.9855081,mHasAltitude=false,mAltitude=0.0,mHasSpeed=false,mSpeed=0.0,mHasBearing=false,mBearing=0.0,mHasAccuracy=true,mAccuracy=20.0,mExtras=Bundle[mParcelledData.dataSize=148]] D/WifiLocator(12570): Too many no-location APs. Will not compute a location nor go to the server. hasLocation=0 noLocation=0 cacheMiss=0 The location is likely cached from previous times, but look at that last message. I'll try rebooting my phone and see if that reproduces.
I suspect the problem is this: You can also request location updates from both the GPS and the Network Location Provider by calling requestLocationUpdates() twice—once for NETWORK_PROVIDER and once for GPS_PROVIDER. Our code seems to check whether it wants to use FINE or COARSE location, then asks Android what the best provider for that would be, and fires the requestLocationUpdates(). However I suppose that if this provider actually fails to provide anything, we will never try the alternates.
Doug said he was going to fix this.
Assignee: nobody → doug.turner
Is there any news about it?
Flags: needinfo?(zer0)
As I mentioned to you in IRC, the behavior is changed but still is not working, basically the GPS icon is displayed in the notification bar this time, but the listener in the page doesn't receive any signal. Notice that because I'm in building, the GPS is not able to find my position so is blinking continuously. However, both Opera and Google Maps are able to display my position properly – I believe due the data connection / wifi connection of my mobile. To sum up, on Firefox Mobile I got the GPS icon in the notification bar blinking, but the page is black. On Opera, I got the GPS in the notification bar blinking, and green text with my position are added to the page. Notice also that, as reported, without "high accuracy" I don't even get the GPS icon on the notification bar, with Firefox. Here the log from Firefox when I click on "Share" button: I/GeckoAppShell( 6188): Location provider - high accuracy: true D/GpsLocationProvider( 1978): setMinTime 100 W/GpsLocationProvider( 1978): Duplicate add listener for uid 10033 D/GpsLocationProvider( 1978): startNavigating D/LocationManagerService( 1978): gps location requested by an application D/GpsLocationProvider( 1978): GPS_REQUEST_AGPS_DATA_CONN D/GpsLocationProvider( 1978): startUsingNetworkFeature failed D/ConnectivityService( 1978): special network not available D/GpsLocationProvider( 1978): startNavigating : SensorAiding is com.android.server.location.GpsLocationProvider$SensorAiding@41bd7f90 V/GpsLocationProvider( 1978): reportStatus status: 3 V/GpsLocationProvider( 1978): reportStatus status: 1 D/GpsLocationProvider( 1978): send an intent to notify that the GPS has been enabled or disabled mNavigating = true D/SensorManager( 1978): registerListener :: handle = 0 name= K3DH Acceleration Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$1@41cd9038 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 200000000 D/SensorManager( 1978): registerListener :: handle = 1 name= AK8975 Magnetic field Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$2@41d0fcc0 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/GpsLocationProvider( 1978): SensorAidingMakeSensorPacket : Not Ready (3, -1, -1, -1) D/SensorManager( 1978): onAccuracyChanged :: accuracy = 2 D/SensorManager( 1978): registerListener :: handle = 2 name= AK8975 Orientation Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$3@41a0a4f8 D/AKMD2 ( 1978): akm_enable_sensor: Orientation is enabled. (accel = 1) D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 V/GpsLocationProvider( 1978): SensorAidingActivateAllSensor : Gyroscope sensor is NOT supported V/GpsLocationProvider( 1978): SensorAidingRegister : Logging is OFF V/GpsLocationProvider( 1978): SensorAidingSupportInversePortraitMode : 0 V/GpsLocationProvider( 1978): SensorAidingRotationChanged : 0 D/GpsLocationProvider( 1978): SensorAidingRegister : Exit D/GpsLocationProvider( 1978): SensorAidingMakeSensorPacket : Not Ready (3, 0, -1, 0) D/SensorManager( 1978): onAccuracyChanged :: accuracy = 2 I/SurfaceFlinger( 1821): id=143 Removed PopupWindow:41652d28 idx=4 Map Size=5 I/SurfaceFlinger( 1821): id=143 Removed PopupWindow:41652d28 idx=-2 Map Size=5 D/ ( 1978): [HYPOS] NOMOVE Time 302, PowerMode 3, GPSWeakSignal 0, GPSFixTime 0, IsPedestrian 0, DOE 2 V/GpsLocationProvider( 1978): SensorAiding LPP : Already GPS Turned ON D/ ( 1978): [HYPOS] NOMOVE Time 785, PowerMode 2, GPSWeakSignal 0, GPSFixTime 0, IsPedestrian 0, DOE 2 V/GpsLocationProvider( 1978): SensorAiding LPP : Keep GPS ON E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. E/lights ( 1978): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 2 W/PowerManagerService( 1978): Timer 0x7->0x3|0x0 I/PowerManagerService( 1978): Ulight 7->3|0 D/PowerManagerService( 1978): setLightBrightness : mButtonLight : 0 D/ ( 1978): [HYPOS] NOMOVE Time 1266, PowerMode 2, GPSWeakSignal 1, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 1748, PowerMode 2, GPSWeakSignal 1, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 2229, PowerMode 2, GPSWeakSignal 2, GPSFixTime 0, IsPedestrian 0, DOE 2 D/STATUSBAR-NetworkController( 2104): onReceive() - RSSI_CHANGED_ACTION, WIFI_STATE, NETWORK_STATE D/ ( 1978): [HYPOS] NOMOVE Time 183, PowerMode 2, GPSWeakSignal 2, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 665, PowerMode 2, GPSWeakSignal 2, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 1144, PowerMode 2, GPSWeakSignal 3, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 1626, PowerMode 2, GPSWeakSignal 3, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 2111, PowerMode 2, GPSWeakSignal 4, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 2594, PowerMode 2, GPSWeakSignal 4, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 3076, PowerMode 2, GPSWeakSignal 5, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 3558, PowerMode 2, GPSWeakSignal 5, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 4039, PowerMode 2, GPSWeakSignal 6, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 4521, PowerMode 2, GPSWeakSignal 6, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 5003, PowerMode 2, GPSWeakSignal 7, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 5485, PowerMode 2, GPSWeakSignal 7, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 5965, PowerMode 2, GPSWeakSignal 8, GPSFixTime 0, IsPedestrian 0, DOE 2 Here the log of Opera, if can help: D/GpsLocationProvider( 1978): setMinTime 2000 D/GpsLocationProvider( 1978): startNavigating D/GpsLocationProvider( 1978): GPS_REQUEST_AGPS_DATA_CONN D/GpsLocationProvider( 1978): startUsingNetworkFeature failed D/LocationManagerService( 1978): gps location requested by an application D/ConnectivityService( 1978): special network not available D/GpsLocationProvider( 1978): startNavigating : SensorAiding is com.android.server.location.GpsLocationProvider$SensorAiding@41d25ed8 V/GpsLocationProvider( 1978): reportStatus status: 3 V/GpsLocationProvider( 1978): reportStatus status: 1 D/GpsLocationProvider( 1978): send an intent to notify that the GPS has been enabled or disabled mNavigating = true D/SensorManager( 1978): registerListener :: handle = 0 name= K3DH Acceleration Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$1@42222788 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 200000000 D/SensorManager( 1978): registerListener :: handle = 1 name= AK8975 Magnetic field Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$2@42222798 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/SensorManager( 1978): registerListener :: handle = 2 name= AK8975 Orientation Sensor delay= 60000 Listener= com.android.server.location.GpsLocationProvider$SensorAiding$3@422227a8 D/AKMD2 ( 1978): akm_enable_sensor: Orientation is enabled. (accel = 1) D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 D/AKMD2 ( 1978): akm_set_delay: accel same delay = 60000000 V/GpsLocationProvider( 1978): SensorAidingActivateAllSensor : Gyroscope sensor is NOT supported V/GpsLocationProvider( 1978): SensorAidingRegister : Logging is OFF V/GpsLocationProvider( 1978): SensorAidingSupportInversePortraitMode : 0 V/GpsLocationProvider( 1978): SensorAidingRotationChanged : 0 D/GpsLocationProvider( 1978): SensorAidingRegister : Exit D/GpsLocationProvider( 1978): SensorAidingMakeSensorPacket : Not Ready (3, -1, -1, 0) D/SensorManager( 1978): onAccuracyChanged :: accuracy = 2 D/SensorManager( 1978): onAccuracyChanged :: accuracy = 2 D/ ( 1978): [HYPOS] NOMOVE Time 303, PowerMode 3, GPSWeakSignal 0, GPSFixTime 0, IsPedestrian 0, DOE 2 V/GpsLocationProvider( 1978): SensorAiding LPP : Already GPS Turned ON D/ ( 1978): [HYPOS] NOMOVE Time 782, PowerMode 2, GPSWeakSignal 0, GPSFixTime 0, IsPedestrian 0, DOE 2 V/GpsLocationProvider( 1978): SensorAiding LPP : Keep GPS ON D/STATUSBAR-NetworkController( 2104): onReceive() - RSSI_CHANGED_ACTION, WIFI_STATE, NETWORK_STATE W/PowerManagerService( 1978): Timer 0x7->0x3|0x0 E/lights ( 1978): write_int: path /sys/devices/virtual/sec/sec_touchkey/brightness, value 2 I/PowerManagerService( 1978): Ulight 7->3|0 D/PowerManagerService( 1978): setLightBrightness : mButtonLight : 0 D/ ( 1978): [HYPOS] NOMOVE Time 1275, PowerMode 2, GPSWeakSignal 1, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 1749, PowerMode 2, GPSWeakSignal 1, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 2229, PowerMode 2, GPSWeakSignal 1, GPSFixTime 0, IsPedestrian 0, DOE 2 D/STATUSBAR-NetworkController( 2104): onSignalStrengthsChanged signalStrength=SignalStrength: 27 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 gsm|lte 4 level=4 D/ ( 1978): [HYPOS] NOMOVE Time 2712, PowerMode 2, GPSWeakSignal 2, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 3192, PowerMode 2, GPSWeakSignal 2, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 3675, PowerMode 2, GPSWeakSignal 3, GPSFixTime 0, IsPedestrian 0, DOE 2 D/STATUSBAR-NetworkController( 2104): onReceive() - RSSI_CHANGED_ACTION, WIFI_STATE, NETWORK_STATE D/ ( 1978): [HYPOS] NOMOVE Time 4160, PowerMode 2, GPSWeakSignal 3, GPSFixTime 0, IsPedestrian 0, DOE 2 D/comsamsungapp( 3453): [MSC_Accu]>>> WWP:382 [0:0] onReceive@ androidnetwifiSCAN_RESULTS D/comsamsungapp( 3453): [MSC_Accu]>>> WIM:53 [0:0] AccuWeatherClockWidgetID_Length D/comsamsungapp( 3453): [MSC_Accu]>>> WIM:54 [0:0] getPrefIDs@lngth:1 D/comsamsungapp( 3453): [MSC_Accu]>>> WIM:60 [0:0] getPrefIDs@Ids1:11 D/OpenGLRenderer( 2212): Flushing caches (mode 2) W/WifiStateTracker( 1978): getNetworkInfo : NetworkInfo: type: WIFI[], state: CONNECTED/CONNECTED, reason: (unspecified), extra: (none), roaming: false, failover: false, isAvailable: true D/comsamsungapp( 3453): [MSC_Accu]>>> WWP:722 [0:0] SCAN_RESULTS_AVAILABLE_ACTION::Detail State : CONNECTED CHECK_AFTER_CONNECTED : false D/dalvikvm( 6003): GC_CONCURRENT freed 370K, 9% free 9554K/10439K, paused 2ms+3ms D/ ( 1978): [HYPOS] NOMOVE Time 4640, PowerMode 2, GPSWeakSignal 4, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 5119, PowerMode 2, GPSWeakSignal 4, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 5604, PowerMode 2, GPSWeakSignal 5, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 6083, PowerMode 2, GPSWeakSignal 5, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 6566, PowerMode 2, GPSWeakSignal 6, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 7047, PowerMode 2, GPSWeakSignal 6, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 7530, PowerMode 2, GPSWeakSignal 7, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 8010, PowerMode 2, GPSWeakSignal 7, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 8492, PowerMode 2, GPSWeakSignal 8, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 8975, PowerMode 2, GPSWeakSignal 8, GPSFixTime 0, IsPedestrian 0, DOE 2 D/ ( 1978): [HYPOS] NOMOVE Time 9460, PowerMode 2, GPSWeakSignal 9, GPSFixTime 0, IsPedestrian 0, DOE 2 E/DataRouter( 1819): usb connection is true E/DataRouter( 1819): DSR is ON. Don't send DTR ON. D/ ( 1978): [HYPOS] NOMOVE Time 9942, PowerMode 2, GPSWeakSignal 9, GPSFixTime 0, IsPedestrian 0, DOE 2
Flags: needinfo?(zer0)
OS: Mac OS X → Android
Product: Fennec → Firefox for Android
Hardware: x86 → ARM
Sorry, my bad, I didn't understand that some fix was made on Firefox :) I tested with the latest Firefox Nightly, and it seems works fine, both with and without high accuracy!
So what fixed this?
Good question, I don't know what is changed in the latest Nightly that fixed that. :) For sure something is changed between the Nightly of 2012-10-04 and the Nightly of 2012-10-22, because it was the only change I did on my phone: I tested the same code and pages, in the same condition, I didn't update any other components / firmare of the mobile.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.