No location in weather app on latest images

Bug #1602691 reported by Dave Morley
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Weather App
Fix Released
High
Andrew Hayzen

Bug Description

STEPS:
1. Flash a fresh image
2. Open unav tap skip and tap on location
3. Accept the permissions ensure you have a location fix
4. Open weather app
5. Accept location permission

EXPECTED:
I expect to have location active and my locale be triggered

ACTUAL:
After several minutes I still have no location in weather app but do in clock and unav and scopes

Related branches

Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Dave Morley (davmor2) wrote :
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

I'm noticing this output [0], when I enable location detection.

Then after putting tracing lines in, I can see that the PositionSource [1] is updating with a 'valid' position. But the GeocodeModel count never changes [2], remaining empty then causing the issues reported in [0].

Looking at the clock code (which finds a location), they use PositionSource as well, but they use GeoLocation [3] instead of GeocodeModel - we should investigate why this isn't working...

0 - http://pastebin.ubuntu.com/19920985/
1 - http://bazaar.launchpad.net/~ubuntu-weather-dev/ubuntu-weather-app/reboot/view/head:/app/components/CurrentLocation.qml#L56
2 - http://bazaar.launchpad.net/~ubuntu-weather-dev/ubuntu-weather-app/reboot/view/head:/app/components/CurrentLocation.qml#L75
3 - http://bazaar.launchpad.net/~ubuntu-clock-dev/ubuntu-clock-app/trunk/view/head:/app/clock/ClockPage.qml#L143

Changed in ubuntu-weather-app:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

OK, listing to the status of the GeocodeModel it receives the error below (I've masked my location with <LAT> and <LONG>). Seems that this page is forbidden, do we need an API key now as with the rest of OSM ?

Error downloading http://nominatim.openstreetmap.org/reverse?format=json&accept-language=en&lat=<LAT>&lon=<LONG>&zoom=18&addressdetails=1 - server replied: Forbidden

Changed in ubuntu-weather-app:
status: Confirmed → Triaged
Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Note, I tried going to the address manually on my laptop using the same WiFi connection and it worked.

Revision history for this message
Andrew Hayzen (ahayzen) wrote :

Seems that due to the usage policy [4] we have to set a useragent now, to uniquely identify the application. Also looking at the Qt docs this showed how to manually set the useragent [5], therefore I have created a branch which sets the user agent to "ubuntu-weather-app".

4 - http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy
5 - http://doc.qt.io/qt-5/location-plugin-osm.html

Changed in ubuntu-weather-app:
status: Triaged → In Progress
assignee: nobody → Andrew Hayzen (ahayzen)
Revision history for this message
Jenkins Bot (ubuntu-core-apps-jenkins-bot) wrote :

Fix committed into lp:ubuntu-weather-app at revision 248, scheduled for release in ubuntu-weather-app, milestone ota10

Changed in ubuntu-weather-app:
status: In Progress → Fix Committed
Andrew Hayzen (ahayzen)
Changed in ubuntu-weather-app:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.