Pure Maps fails to open when called from Contact Address

REPRODUCIBILITY: 100% (always)
OSVERSION: 4.5.0.16
HARDWARE: Sony Xperia 10 III - xqbt52 - xqbt52 - 1.0.1.12 - aarch64
UI LANGUAGE: English (UK) (user: en_GB, os: en_GB.utf8)
REGRESSION: no

DESCRIPTION:

Clicking on the address of a contact won’t open the Pure Maps (the geo-link app on my phone).
1st time I clicked it displayed the Pure Maps permissions dialogue, which I granted.
Pure maps works fine otherwise.

PRECONDITIONS:

Contact has an address, Pure Maps is the default geo-link app.

STEPS TO REPRODUCE:

1.open a contact with address
2. Click on the shortcut icon next to the address
3. Grant permissions to the Pure Mapps app, if requested

EXPECTED RESULTS:

Pure Maps shows with the address loaded.

ACTUAL RESULTS:

Except 1st time, when the Pure Maps permissions was displayed, nothing happens

Here is the output of journalctl:

Feb 04 22:15:24 zzzz jolla-contacts[11523]: [D] onAddressClicked:223 - Address: [CSV address fields edited out] 
Feb 04 22:15:24 zzzz invoker[11904]: warning: enforcing sandboxing for '/usr/bin/harbour-pure-maps'
Feb 04 22:15:24 zzzz lipstick[5871]: Error: can't chdir to privileged
Feb 04 22:15:24 zzzz lipstick[5871]: constructing /run/firejail/mnt/privileged: Images ...
Feb 04 22:15:24 zzzz lipstick[5871]: mounting /run/firejail/mnt/privileged @ /home/defaultuser/.local/share/system/privileged
Feb 04 22:15:24 zzzz lipstick[5871]: hiding /run/firejail/mnt/privileged
Feb 04 22:15:24 zzzz lipstick[5871]: Error: can't chdir to privileged
Feb 04 22:15:24 zzzz lipstick[5871]: /usr/bin/harbour-pure-maps: error while loading shared libraries: libs2.so: cannot open shared object file: No such file or directory
Feb 04 22:15:24 zzzz booster-generic[5620]: *** signal=17 pid=5620
Feb 04 22:15:24 zzzz /usr/libexec/mapplauncherd/booster-generic[5620]: warning: Boosted process (pid=11823) exit(127)
Feb 04 22:15:24 zzzz /usr/libexec/mapplauncherd/booster-generic[5620]: warning: Daemon: sending exit(127) to invoker(11904)
Feb 04 22:15:24 zzzz invoker[11904]: warning: application (pid=-1) exit(127) signal(0)

MODIFICATIONS:

  • Patchmanager: no
  • OpenRepos: yes
  • Chum: yes
  • Other: none specified

ADDITIONAL INFORMATION:

Device Owner User: defaultuser
Home Encryption: enabled


the initial version of this bug report was created using Bugger 0.9.9+git1

Same here with XA2. But: the address opens fine with DB Navigator. So possibly the problem is PureMaps

2 Likes

Does the address get passed to DB Navigator? It does look like puremaps issue, as android app gets opened for me (however with address missing, will try another)
Edit: Here wego works and finds the address, so pretty sure app issue

2 Likes

The address - for excellent Kapsalon -copied to the clipboard is in this format, three in one:

geo:0,0?q=Isokatu 61%2COulu%2CFI-90100%2CSuomi&street=Isokatu 61&city=Oulu&zipcode=FI-90100&country=Suomi

  1. geo:0,0 (coordinates, always 0,0, even when they exist)
  2. q=Isokatu 61%2COulu%2CFI-90100%2CSuomi (unstructured search, commas coded as %2C)
  3. &street=Isokatu 61&city=Oulu&zipcode=FI-90100&country=Suomi (structured search)

For geo tags:
geo:0,0?q=geo%3A65.00750%2C 25.46714&street=geo%3A65.00750%2C 25.46714

I think this is an excellent start and Jolla’s work is pretty much done. The location icon is for the first address but all addresses are active.

As Here We Go and Google Maps can use both plain text addresses for search and coordinates for destinations (without the geo tag, to my surprise), I guess for Pure Maps, OSM Scout etc. it’s a matter of Open as… in the share plugin, URI handler or whatever it’s called.

As of now OSM Scout works surprisingly well: the search is automatic so it seems broken when nothing happens in the search view, but just replace the coded characters (this is new in 4.5) with spaces and possibly remove some search criteria (in this case zip code and country). The only change needed in the plugin is search for %, replace it and the next two characters with a space.

I just tested on my X10 II and it’s only Pure Maps that isn’t able to be opened.
It works fine with OSMand.

I’m wondering if it’s not a bug on Pure Maps.

1 Like

New findings - just create an address book entry for Lekker 61 to play along:

  1. OSM Scout works perfectly as long as there are no commas in the address!
    a) coordinates as
    65.00750 25.46714

b) address in one line, because the comma is automatically added for extra lines:
Isokatu 61 Oulu

  1. Pure Maps also kinda works:
    /usr/share/applications/harbour-pure-maps-uri-handler.desktop
    needs to have sandboxing disabled. Then it works but offers to go to geo:0,0. The search box is editable so no biggie, just leave the last bit of the search string.

So, I make a 180 degree turn and move forward: the apps are fine, Jolla should make some changes:

  • don’t add commas and do replace existing ones with spaces! Do not encode any characters - it’s a search string, not a web address.

  • only include geo tags if there is nothing else on that address. Is it even plausible that anyone would want to go to geo:0,0 or could that be removed automatically?

3 Likes

OSM Scout works perfectly as long as there are no commas in the address!

…and no postal code

Indeed, the problem seems specific to Pure Maps.
I have updated the topic to make it clearer ( I hope) it’s not a SFOS bug . I added some log for @rinigus (I bet he doesn’t depend on me for retrieving it :slight_smile: )

Indeed, looks like I have to implement the extensions used by Android for geo URI, as described at geo URI scheme - Wikipedia

Please file an issue at Pure Maps repository (Issues · rinigus/pure-maps · GitHub).

What is a bit worrying in your log is a

and some booster messages after that. Looks like some booster bug, although desktop is disabling it via no-invoker.

Will be able to deal with it after SFOS 4.5 update will be ready on my ported device.

While filing bug report at Github, please specify whether Pure Maps was installed from Chum or Jolla Store.

3 Likes

Karry (that was fast, thanks!) already fixed OSM Scout (in OpenRepos and Chum), replacing %… (% and the following two characters - there are two dots, the forum software adds a third) with a comma.

Fixing Pure Maps blindly should be safe because this is a new feature; old versions of Sailfish can’t break. Three changes are needed:

  • tell users to disable sandboxing in the URI handler

In the search string received through d-bus:

  1. replace %… with comma or space
  2. of the three search elements keep everything between “q=” and the first “&” and ignore the rest (geo:0,0?q=Isokatu 61 Oulu&street=Isokatu 61 Oulu)

The search string is read by the app and editable by the user, and both commas and spaces are OK. Using commas makes it possible to add check boxes to disable/enable search criteria (in OSM Scout Zip codes and extra information like “yellow house on the hill, park in front of the garage” need to be removed but it’s easy enough in the search box).

1 Like

Did anyone try, if here we go opens the address?

Yes. Here We Go, Google Maps and probably all Android apps are OK.

As I learned from Rinigus’s link yesterday, Android uses an unofficial extension of the geo URI scheme, and Contacts uses a modification of the Android extension.

As mentioned above, such fix is possible to test by me when I get my port to 4.5 first. Which will happen after 4.5 leaves EA. Otherwise, it is difficult to release in “blind”. In particular, it is rather odd to have … in that string. It seems to me that URI has to be parsed properly and then fed to the rest.

Again, please open an issue at Github. Pure Maps runs on several distributions and I can easily loose a track when issues are filed in a wrong place.

I was prepared to write “Wow, that was fast, works excellently, thanks!” but…

I fired up the Jolla 1 (Pure Maps 2.6.5) to remove 4.5 from the equation.

Copy this string into the search box of any version of Pure Maps:

geo:0,0?q=Isokatu 61%2COulu%2CFI-90100%2CSuomi&street=Isokatu 61&city=Oulu&zipcode=FI-90100&country=Suomi

Observe the garbage in, garbage out phenomenon. Edit the search string to find Oulu instead of the Atlantic. Consider automating the process.

Notice two problems:

  • the 3-in-1 search string - the middle one between “q=” and the first “&” probably works best
  • the comma encoded as %2C instead of a comma or space (the dot is sed syntax for exactly one character; I wasn’t clear about that, sorry)

Edit: to be safe, only work on Android-style search strings. They all start with
geo:0,0?q=

PureMaps is installed from CHUM repository.
v4.5 is GA now => created
PureMaps fail to open contact address in SFOS4.5 · Issue #649 · rinigus/pure-maps · GitHub .
Thanks!

1 Like