Joplin version: 1.0.329
Platform: Android
OS specifics: build 9.1.0.252
I expected the geo-location to be saved as it's done on the desktop (in the latter case by the IP location).
Date,Level,Message
05-21T09:51:50,10,"""Could not get lat/long for note bbdd10ad62294c4d8b3339d0398e9d7f: ", "TypeError: undefined is not an object (evaluating 'navigator.geolocation.getCurrentPosition')
index.android.bundle:969:652
[email protected]:108:205
[email protected]:108:1623
[email protected]:108:488
[email protected]:969:616
index.android.bundle:449:11699
[email protected]:112:423
index.android.bundle:112:1740
[email protected]:112:423
[email protected]:112:898
index.android.bundle:112:1273
[email protected]:108:205
[email protected]:108:1623
[email protected]:108:488
[email protected]:112:1257
[email protected]:112:1309
[email protected]:112:3681
index.android.bundle:1251:2338
[email protected]:112:423
index.android.bundle:112:1740
[email protected]:112:423
[email protected]:112:898
index.android.bundle:112:1047
[email protected]:108:155
index.android.bundle:108:882
[email protected]:114:661
[email protected]:114:1025
[email protected]:114:3100
callImmediates@[native code]
[email protected]:26:3247
index.android.bundle:26:1283
[email protected]:26:2939
[email protected]:26:1253
value@[native code]
value@[native code]""
05-21T09:51:50,30,"""Fetching geolocation...""
Does the app have geo-location permission?
Yes, I manually set this permission for the app as there was no request for that permission as other apps commonly do.
Has it ever worked before for you?
Currently the code throws an exception here
https://github.com/laurent22/joplin/blob/2de30f8b821a9ded29745af845fefca139ef9da1/ReactNativeClient/lib/geolocation-react.js#L27
I think it's because navigator is not defined. I looked through the code and could not find where it's set.
I've just recently started using Joplin, so I can't anwer this for the past.
Looks like it has been broken when React-Native was upgraded. Navigator has been removed from React-Native code.
It is now recommended to use https://github.com/react-native-community/react-native-geolocation
Oh I can't believe that, it's indeed been broken for a while then, thanks for checking @roman-r-m. Makes me wonder if there should be some option to display an in- app notification when there's a background error, instead of going to the log.
I guess something like the 10MB attachment hint could be useful to let "common users" (like me) stumble upon this earlier without explicitly looking if a feature is doing what it promises.
Most helpful comment
Looks like it has been broken when React-Native was upgraded. Navigator has been removed from React-Native code.
It is now recommended to use https://github.com/react-native-community/react-native-geolocation