Hello, I’ve installed the PhoneTrack app in my Nextcloud and PhoneTrack app on Android (from F-Droid). Then I go into settings on the Android app and enter my Nextcloud URL, login and app password (created for it). But then I got an error, suggesting if I have installed the app in Nextcloud… What did I missed ? Do I have to set something on Nextcloud first ?
Hi, we need to know your PhoneTrack-Nextcloud and PhoneTrack-Android versions.
Are you sure you actually enabled PhoneTrack in Nextcloud ?
Are you sure there is no group restriction on PhoneTrack in your Nextcloud instance ?
When the error message “is the PhoneTrack app activated on the server?” is displayed, a detailed error is printed in the Android app log. It would be helpful if you could get those logs with adb logcat
.
Thanks for the help. Android app is 0.0.8, Nextcloud app is 0.2.8 and Nextcloud is version 13.0.2. I can use the web app PhoneTrack on my Nextcloud user account, I can load a GPX file and see it on the map, so I’m sure there is no group restriction.
Log (with minor edit to remove username and token):
02-13 10:37:46.871 I/ActivityManager(1071): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.LogjobsListViewActivity bnds=[792,864][1045,1092]} from uid 10029
02-13 10:52:49.586 I/ActivityManager(1071): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.LogjobsListViewActivity bnds=[792,726][1045,954]} from uid 10029
02-13 13:16:46.186 I/ActivityManager(1071): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.LogjobsListViewActivity bnds=[540,420][792,648]} from uid 10029
02-13 13:16:48.414 I/ActivityManager(1071): START u0 {cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.AboutActivity} from uid 10218
02-13 13:20:24.638 I/ActivityManager(1071): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.LogjobsListViewActivity bnds=[792,800][1045,1028]} from uid 10029
02-13 13:20:25.790 I/ActivityManager(1071): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.LogjobsListViewActivity} from uid 10218
02-13 13:20:26.043 I/ActivityManager(1071): Displayed net.eneiluj.nextcloud.phonetrack/.android.activity.LogjobsListViewActivity: +216ms
02-13 13:20:27.766 I/ActivityManager(1071): START u0 {cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.PreferencesActivity} from uid 10218
02-13 13:20:27.968 I/ActivityManager(1071): Displayed net.eneiluj.nextcloud.phonetrack/.android.activity.PreferencesActivity: +176ms
02-13 13:20:29.087 I/ActivityManager(1071): START u0 {cmp=net.eneiluj.nextcloud.phonetrack/.android.activity.SettingsActivity} from uid 10218
02-13 13:20:29.151 I/chatty (16908): uid=10218(net.eneiluj.nextcloud.phonetrack) identical 1 line
02-13 13:20:29.257 I/ActivityManager(1071): Displayed net.eneiluj.nextcloud.phonetrack/.android.activity.SettingsActivity: +140ms
02-13 13:21:00.246 V/PhoneTrackClientUtil(16908): Establishing connection to server
02-13 13:21:07.428 V/PhoneTrackClientUtil(16908): OK
02-13 13:21:07.444 V/PhoneTrackClientUtil(16908): <!DOCTYPE html><html class="ng-csp" data-placeholder-focus="false" lang="en-GB" > <head data-user="USERNAME" data-user-displayname="USERNAME" data-requesttoken="DELETED"> <meta charset="utf-8"> <title> Files - Nextcloud </title> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="referrer" content="never"> <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0"> <meta name="apple-itunes-app" content="app-id=1125420102"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="Nextcloud"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#0082c9"> <link rel="icon" href="/nextcloud/core/img/favicon.ico"> <link rel="apple-touch-icon-precomposed" href="/nextcloud/core/img/favicon-touch.png"> <link rel="mask-icon" sizes="any" href="/nextcloud/core/img/favicon-mask.svg" color="#0082c9"> <link rel="manifest" href="/nextcloud/index.php/apps/theming/manifest?v=0"> <link rel="stylesheet" href="/nextcloud/core/vendor/select2/select2.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/core/vendor/jquery-ui/themes/base/jquery-ui.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/index.php/css/core/7f0b-2a43-jquery-ui-fixes.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/index.php/css/core/7f0b-2a43-server.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/index.php/css/core/7f0b-2a43-share.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/apps/files_versions/css/versions.css?v=ca9f0d77-0"><link rel="stylesheet" href="/nextcloud/apps/deck/css/activity.css?v=7822d1b1-0"><link rel="stylesheet" href="/nextcloud/apps/files_videoplayer/css/style.css?v=62abc69f-0"><link rel="stylesheet" href="/nextcloud/index.php/css/core/7f0b-2a43-jquery.ocdialog.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/index.php/css/files/4fda-2a43-merged.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/index.php/css/files_trashbin/1980-2a43-trash.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/apps/activity/css/style.css?v=375a05d3-0"><link rel="stylesheet" href="/nextcloud/index.php/css/comments/1980-2a43-autocomplete.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/apps/comments/css/comments.css?v=198068b3-0"><link rel="stylesheet" href="/nextcloud/index.php/css/files_sharing/35c3-2a43-mergedAdditionalStyles.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/index.php/css/core/7f0b-2a43-systemtags.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/apps/systemtags/css/systemtagsfilelist.css?v=198068b3-0"><link rel="stylesheet" href="/nextcloud/index.php/css/files_texteditor/21f4-2a43-merged.css?v=e8bd7a04-0"><link rel="stylesheet" href="/nextcloud/apps/gallery/css/slideshow.css?v=9160a5d2-0"><link rel="stylesheet" href="/nextcloud/apps/gallery/css/gallerybutton.css?v=9160a5d2-0"><link rel="stylesheet" href="/nextcloud/apps/gallery/css/share.css?v=9160a5d2-0"><link rel="stylesheet" href="/nextcloud/apps/ownpad/css/ownpad.css?v=3a93dad4-0"> <script nonce="bTc3QnV1L0lTcG9uMFJSdHdYT3BYaHNpa0xzWWFQWWdleDVjNk1sOTQ0cz06enNpcDhMdXFmT0I5djIwZmswWGJQM1VSNlB3aFI1VlpObjhRa2ZFUm04UT0=" defer src="/nextcloud/index.php/core/js/oc.js?v=e8bd7a04"></script><script nonce="bTc3QnV1L0lTcG9uMFJSdHdYT3BYaHNpa0xzWWFQWWdleDVjNk1sOTQ0cz06enNpcDhMdXFmT0I5djIwZmswWGJQM1VSNlB3aFI1VlpObjhRa2ZFUm04UT0=" defer src="/nextcloud/core/vendor/core.js?v=e8bd7a04-0"></script><script nonce="bTc3QnV1L0lTcG9uMFJSdHdYT3BYaHNpa0xzWWFQWWdleDVjNk1sOTQ0cz06enNpcDhMdXFmT0I5djIwZmswWGJQM1VSNlB3aFI1VlpObjhRa2ZFUm04UT0=" defer src="/nextcloud/index.php/js/core/merged-template-prepend.js?v=e8bd7a04-0"></script><script nonce="bTc3QnV1L0lTcG9uMFJSdHdYT3BYaHNpa0xzWWFQWWdleDVjNk1sOTQ0cz06enNpcDhMdXFmT0I5djIwZmswWGJQM1VSNlB3aFI1VlpObjhRa2ZFUm04UT0=" defer src="/nextcloud/cor
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): Exception
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): org.json.JSONException: Value <!DOCTYPE of type java.lang.String cannot be converted to JSONArray
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at org.json.JSON.typeMismatch(JSON.java:111)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at org.json.JSONArray.<init>(JSONArray.java:96)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at org.json.JSONArray.<init>(JSONArray.java:108)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at net.eneiluj.nextcloud.phonetrack.util.PhoneTrackClientUtil.isValidLogin(PhoneTrackClientUtil.java:104)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at net.eneiluj.nextcloud.phonetrack.android.activity.SettingsActivity$LoginValidatorAsyncTask.doInBackground(SettingsActivity.java:275)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at net.eneiluj.nextcloud.phonetrack.android.activity.SettingsActivity$LoginValidatorAsyncTask.doInBackground(SettingsActivity.java:256)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at android.os.AsyncTask$2.call(AsyncTask.java:333)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at java.util.concurrent.FutureTask.run(FutureTask.java:266)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1162)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:636)
02-13 13:21:07.454 E/PhoneTrackClientUtil(16908): at java.lang.Thread.run(Thread.java:764)
02-13 13:21:07.454 E/PhoneTrack(16908): invalid login
Are you sure the login/password you entered in PhoneTrack-Android are correct ?
When exactly does the error show up ? In the account setting screen when you press “connect” ?
The Android app sends a request to the Nextcloud app API to check login validity. The answer should be a JSON array which contains the user ID. In your case, the answer is a string. This string is probably an HTML page describing the error on the server side. As it is truncated in Android logs, i can’t figure out what happens…
It would help to see this error string. I guess a simple way to get it is to make a manual request with curl or wget with a computer :
curl --basic -u username:password https://yournextcloud.org/index.php/apps/phonetrack/api/ping -i
I got a 404 error…
Sorry, we could have make this investigation much shorter. You need an up to date PhoneTrack-Nextcloud to use PhoneTrack-Android… In version 0.2.8, api/ping does not exist
Your problem is that last PhoneTrack versions are compatible with NC>=14.