Describe the bug
@marcelklehr Looks like the bookmark API is broken for android app
To Reproduce
Steps to reproduce the behavior:
2020-05-03 22:08:31.558 27693-27693/org.bisw.nxbookmarks D/ViewRootImpl@223ec4e[LoginAcitivty]: ViewPostIme pointer 0
2020-05-03 22:08:31.672 27693-27693/org.bisw.nxbookmarks D/ViewRootImpl@223ec4e[LoginAcitivty]: ViewPostIme pointer 1
2020-05-03 22:08:31.681 27693-28005/org.bisw.nxbookmarks E/ocbookmarkstag: apiRootUrl value is https:https://127.0.0.1:8080/index.php/apps/bookmarks/public/rest/v2
2020-05-03 22:08:31.683 27693-28005/org.bisw.nxbookmarks I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2020-05-03 22:08:31.684 27693-28005/org.bisw.nxbookmarks I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2020-05-03 22:08:31.690 27693-28005/org.bisw.nxbookmarks W/System.err: org.schabi.ocbookmarks.REST.RequestException: java.net.ConnectException: Failed to connect to /127.0.0.1:8080
2020-05-03 22:08:31.690 27693-28005/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.send(OCBookmarksRestConnector.java:136)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.getRawBookmarks(OCBookmarksRestConnector.java:198)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.getBookmarks(OCBookmarksRestConnector.java:220)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.LoginAcitivty$TestLoginTask.doInBackground(LoginAcitivty.java:117)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.LoginAcitivty$TestLoginTask.doInBackground(LoginAcitivty.java:111)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at android.os.AsyncTask$3.call(AsyncTask.java:378)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: at java.lang.Thread.run(Thread.java:919)
2020-05-03 22:08:31.691 27693-28005/org.bisw.nxbookmarks W/System.err: Caused by: java.net.ConnectException: Failed to connect to /127.0.0.1:8080
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.io.RealConnection.connectSocket(RealConnection.java:1409)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.io.RealConnection.connect(RealConnection.java:1359)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findConnection(StreamAllocation.java:221)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.http.StreamAllocation.findHealthyConnection(StreamAllocation.java:144)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.http.StreamAllocation.newStream(StreamAllocation.java:106)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:400)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:333)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:483)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:429)
2020-05-03 22:08:31.692 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:252)
2020-05-03 22:08:31.693 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:211)
2020-05-03 22:08:31.693 27693-28005/org.bisw.nxbookmarks W/System.err: at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:30)
2020-05-03 22:08:31.693 27693-28005/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.send(OCBookmarksRestConnector.java:126)
2020-05-03 22:08:31.693 27693-28005/org.bisw.nxbookmarks W/System.err: ... 10 more
Expected behavior
Normally Android App open the bookmarks list from the andrid app.
Screenshots

Server (please complete the following information):
$ sudo -u www-data php occ app:list in your command line]sudo -u www-data php occ config:list system]Same problem. Is there a method in place to disable automatic nc app updates when the nc installation is administered under snap ? These app updates need to be vetted prior to implementation by sysadmins. Can an old 2.x version be installed over top of broke 3.0.7 ?
Yes, there are a variety of bugs open for issues with bookmarks v3. From your logs I cannot see which one you are experiencing, but it's probably an authentication error: #994
@ml48603
Is there a method in place to disable automatic nc app updates when the nc installation is administered under snap ?
I have no experience with snap and generally wouldn't advise to use it as it feels like too much magic for me.
These app updates need to be vetted prior to implementation by sysadmins. Can an old 2.x version be installed over top of broke 3.0.7 ?
If you have a backup of your db state from back when you were using v2.x then you can roll back to that db state and install v2.x again. Simply installing v2.x again will not work. I'm confident I will be able to fix the issues with the new version, though.
Good morning,
i am also using the android bookmark application. Last weekend I had problems with the bookmark app giving connection error. I have Nextcloud 18.04 and latest bookmark app for Nextcloud and latest version of the android bookmark app.
I tried different things and one was using another account at the Android bookmark app.
I have an administration user for my Nextcloud that does not have any bookmrks stored in the data base. When I enter the credentials of this user in the android bookmark app the logon works.
But I can not add any bookmark. When I try to add a bookmark, it tries to do, but after some time a connection error appears in the Android bookmark app.
If required I can play around with this a little more to get more detailed I formation what's going on.
Regards Oliver
Same problem here on multiple devices.
Yes, there are a variety of bugs open for issues with bookmarks v3. From your logs I cannot see which one you are experiencing, but it's probably an authentication error: #994
Thanks, @marcelklehr I see that issue is still open. Also, I see there is a release. Do you think this should fix the issue?
3.0.8 and 3.0.9 failure persists
@ml48603 yes. I just cheked that its not working as well.
Just been seeing these come past my feed and thought I'd add that recently my Floccus seems dead too ... with a red X on the toolbar icon that I can't shake. Checked the debug logs and endless cycles of:
2020-05-05T08:01:39.307Z Syncing failed with E020: Could not parse server response. Is the bookmarks app installed on your server?
JSON.parse: unexpected character at line 1 column 1 of the JSON data
So I checked my Nextcloud and saw that it had undergone some unattended upgrades, and that the Bookmarks app had an upgrade pending, to 3.0.9. So I approved that. Then noticed it was disabled. So I enabled it.
I then tried a sync. The UI still leaves something to bedesired here, it just starts with a pip on the progress bar and seems to hang alas, so I let it sit. It sat there with the one pip on the progress bar until I put my youngest boy to bed, and I fell asleep with him (not uncommon at the start of winter after we lose summer time and the days shorten and cool). It is finished successfully this morning and the logs are full of activity. Cool.
I'd be chuffed if on top of the progress bar it shows there was an option to show the last debug message below it. Makes it easy to see in the UI if it's waiting on a response from nextloud or looping a lot or what, such a display provides a different kind of pulse of life that, while a little less slick than a progress bar, very comforting to many all the same (hence as an option it would be nice).
@bernd-wechner Yep, the floccus UI does leave some things to be dedsired -- a new UI is in the release pipeline, but that'll have to wait until things have settledd down here with the bookmarks app..
3.0.10 also doesn't work.
3.0.10 also doesn't work.
Same failed auth on 3.0.10 with nc snap installation here . Is 3.0.10 auth'ing from manual and docker installations ?
Same issue here and NC app is neither docker nor snap, it's manual.
Thank you for your feedback! This should e fixed with the latest version, now.
Good morning,
I tried version 3.0.11 and it is still the same.
I rentered my credentials in the Android bookmark app and it still says that it can't connect.
In the Nextcloud log is nothing shown when the error message in the Android app is shown.
Regards Oliver
Apache.log shows this
Xxx.xxx.xxx.xxx - - [07/May/2020:07:11:29 +0200] "GET /nextcloud/index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1 HTTP/1.1" 200 45764 "-" "Dalvik/2.1.0 (Linux; U; Android 8.0.0; SM-G930F Build/R16NW)"
Same here with 3.0.11.
Same here with 3.0.11.
Hi,
When i See this written in Apache log file:
Apache.log shows this
Xxx.xxx.xxx.xxx - - [07/May/2020:07:11:29 +0200] "GET /nextcloud/index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1 HTTP/1.1" 200 45764 "-" "Dalvik/2.1.0 (Linux; U; Android 8.0.0; SM-G930F Build/R16NW)"
It looks to me,that it refers to nextcloud bookmarks Version 2 in the path. Is this the problem as we try to connect with Version 3 ??
Oliver
GET /nextcloud/index.php/apps/bookmarks/public/rest/v2/bookmark?page=-1 HTTP/1.1" 200
This shows that the endpoint sucessfully responds to the request (the version in the URL is the API version, not the app version). It would be interesting to know what fails in the android app upon receiving this response @dasbiswajit
Testing 3.0.11 on nc snaps with TTTDev's Android Bookmark Share Connector. Bookmarks are posted to 3.0.11 as expected. Bookmarks app share connector by biswajit is still not posting new bookmarks to 3.0.11 Observations on android 6. Exception on android 9: tttdev posts bookmark to nc, but may or may not receive ack so dialogue can be dropped to assure user bookmark has been added
I'm having the same problem since I update server bookmarks app to version 3.x.x. on nextcloud 17.0.6.
On android bookmarks app, always get:
Connection failed. Check if
* You have internet access
* The URL is correct
* You imported self signed certificates.
What is strange is that if I delete all bookmarks from the account, then I can connect to server but if I try to save a bookmark I get a:
Could not add bookmark
Connection Failed
But bookmark has been added correctly on server. Now I have to delete it to connect again.
So the problem is on bookmarks?
Has something changed in the way the server app stores bookmarks?
Android app doesn't recognize them?
Logging says this:
Error
index
2020-05-07T15:13:49+0300
TypeError:Â Argument 3 passed to OC\AppFramework\Middleware\MiddlewareDispatcher::beforeOutput() must be of the type string, null given, called in /var/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php on line 123
/var/www/htdocs/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 123:
OC\AppFramework\Middleware\MiddlewareDispatcher->beforeOutput(OCA\Bookmark ... {}, "getBookmarkFavicon", null)
/var/www/htdocs/nextcloud/lib/private/AppFramework/App.php - line 126:
OC\AppFramework\Http\Dispatcher->dispatch(OCA\Bookmark ... {}, "getBookmarkFavicon")
/var/www/htdocs/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php - line 47:
OC\AppFramework\App::main("OCA\\Bookma ... r", "getBookmarkFavicon", OC\AppFramew ... {}, { id: "1117" ... "})
<<closure>>
OC\AppFramework\Routing\RouteActionHandler->__invoke({ id: "1117" ... "})
/var/www/htdocs/nextcloud/lib/private/Route/Router.php - line 297:
call_user_func(OC\AppFramew ... {}, { id: "1117" ... "})
/var/www/htdocs/nextcloud/lib/base.php - line 997:
OC\Route\Router->match("/apps/bookm ... n")
/var/www/htdocs/nextcloud/index.php - line 42:
OC::handleRequest()
This is part of android logs (contains "bookmark" word) on connection failure:
05-07 18:43:00.653 I/BufferQueueProducer(136): [org.schabi.nxbookmarks/org.schabi.ocbookmarks.LoginAcitivty](this:0xb8f51680,id:12364,api:1,p:15664,c:136) queueBuffer: fps=7.00 dur=1000.65 max=491.55 min=10.55
05-07 18:43:00.810 D/Posix (15664): [Posix_connect Debug]Process org.schabi.nxbookmarks :443
05-07 18:43:01.656 I/BufferQueueProducer(136): [org.schabi.nxbookmarks/org.schabi.ocbookmarks.LoginAcitivty](this:0xb8f51680,id:12364,api:1,p:15664,c:136) queueBuffer: fps=60.82 dur=1002.96 max=18.64 min=14.91
05-07 18:43:04.884 D/SystemServicesProxy(793): getRecentTasks:TASK = Task.Key: 3831, u: 0, lat: 1588866131418, org.schabi.nxbookmarks/isExcluded = false/isTopTaskHome = false/isFirstValidTask = true
05-07 18:43:04.897 D/RecentsTaskLoader(793): getTaskStack:Task = Task.Key: 3831, u: 0, lat: 1588866131418, org.schabi.nxbookmarks
05-07 18:43:04.906 W/PackageManager(793): Failure retrieving resources for org.schabi.nxbookmarks: Resource ID #0x0
05-07 18:43:04.935 D/ActivityThread(15664): ACT-AM_ON_PAUSE_CALLED ActivityRecord{3c9a0cc2 token=android.os.BinderProxy@1d86bad3 {org.schabi.nxbookmarks/org.schabi.ocbookmarks.LoginAcitivty}}
Hope it helps.
Nextcloud 18.0.4 (Docker examples - insecure - LAN only) and I have this issue using the Android App in version 1.5 (Oneplus 5t device with Android 9) with Bookmarks Version 3.0.11
Error message in the mobile App is:
Connection failed. Check if
* You have internet access
* The URL is correct
* You imported self signed certificates.
Can I help with logs?
@dasbiswajit This might be a parsing issue. The new version returns IDs as actual numbers not as string.
@marcelklehr mate Apologies for keeping silent on threads!!
Yes! its a parsing issue. A big achievement is Authentication is happening with v3.0.11. From the current error Log:
I found 2 changes with version 3.
Error highlighted below.
2020-05-07 23:17:38.204 28405-28540/org.bisw.nxbookmarks I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
2020-05-07 23:17:39.118 28405-28540/org.bisw.nxbookmarks W/System.err: org.schabi.ocbookmarks.REST.RequestException: Could not gather all data
2020-05-07 23:17:39.118 28405-28540/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.getBookmarkFromJsonO(OCBookmarksRestConnector.java:191)
2020-05-07 23:17:39.118 28405-28540/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.getFromRawJson(OCBookmarksRestConnector.java:146)
2020-05-07 23:17:39.118 28405-28540/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.MainActivity$RelodDataTask.doInBackground(MainActivity.java:433)
2020-05-07 23:17:39.118 28405-28540/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.MainActivity$RelodDataTask.doInBackground(MainActivity.java:426)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at android.os.AsyncTask$3.call(AsyncTask.java:378)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at java.util.concurrent.FutureTask.run(FutureTask.java:266)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:289)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at java.lang.Thread.run(Thread.java:919)
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: Caused by: org.json.JSONException: ### _No value for public_
2020-05-07 23:17:39.119 28405-28540/org.bisw.nxbookmarks W/System.err: at org.json.JSONObject.get(JSONObject.java:399)
2020-05-07 23:17:39.120 28405-28540/org.bisw.nxbookmarks W/System.err: at org.json.JSONObject.getInt(JSONObject.java:488)
2020-05-07 23:17:39.120 28405-28540/org.bisw.nxbookmarks W/System.err: at org.schabi.ocbookmarks.REST.OCBookmarksRestConnector.getBookmarkFromJsonO(OCBookmarksRestConnector.java:185)
2020-05-07 23:17:39.120 28405-28540/org.bisw.nxbookmarks W/System.err: ... 9 more
2020-05-07 23:17:39.145 4922-5488/? D/EdgeLightingManager: showForToast : packageName = org.bisw.nxbookmarks
If you could fix this it will be good I will release a new version now.
Waiting for your reply.
Yes, the public field no longer exists.
As discussed folder structure are working. Tags are still not working :( but doing intermediate relaase with known error.
Error message in the mobile App is:
Connection failed. Check if
Still present on 3.0.12.
@atm1991 submitted to playstore waiting for go live.
Still present on 3.0.12.
Same here.
@GambaJo please check update the playstore version. It's live now.
@dasbiswajit please check update the playstore version. It's live now.
Is this published on F-Droid also?
@GambaJo please check update the playstore version. It's live now.
Sorry, I'm using F-Droid.
The version in F-droid is still an old version from previous maintainer. Please push the test version of your app to F-droid as well , then we can test it.
Regards .
Fdroid is broken long Time ago due to package changes.
No. I was using this version until last week with no problem. If you do not plan to maintain the f droid version any more it may be a good idea to delete it. Otherwise people like me come back and open issues for it.
This is a great pity. I try to get all apps from fdroid.
@dasbiswajit Would it be possible to submit a new entry to f-droid? Requiring people to use Google play to get an open source app is not ideal, IMHO.
@marcelklehr I know I can not claim the old package.
I will remove the link of current package.
I hope this helps.
@IzzySoft Do you know of a solution for this?
@marcelklehr Unfortunately not:
PHP version: [e.g. v7.2] Version: 7.3.17
As you remember, I'm still on 7.0 as my distri doesn't ship anything newer (need to upgrade the entire system first which I found no time for yet – and being on a still supported LTS, the urge is not yet that high).
Nextcloud version: [e.g. 15.0.1 (see Nextcloud admin page)] Nextcloud 18.0.4
Doesn't work on PHP 7.0. So I'm still on the last NC supported by 7.0 – which is 15. Hence:
Bookmarks app version: [e.g. 1.1.0 (see Nextcloud apps page)] 3.0.7
Doesn't work on my Nextcloud.
Added to that, since transfer of ownership there wasn't a new release of the Android app…
TL;DR: as much as I'd like to help, I cannot :cry:
Sorry, I'm mainly concerned about F-droid :)
Ah, so I answered the wrong question – sorry, long thread here :smile_cat:
Can you please sum up what I shall answer? I'll do my very best then :innocent:
Yeah, let's discus this somewhere else.
Update: there's an issue about this on gitlab: https://gitlab.com/bisada/OCBookmarks/-/issues/37
Big thanks everyone!
I will remove the link of current package.
It’s removed now for temporary.
@dasbiswajit Would it be possible to submit a new entry to f-droid? Requiring people to use Google play to get an open source app is not ideal, IMHO.
Especially given he's forked someone else's repo, done minimal maintenance or development, built the app and put it behind a paywall. F-Droid version worked without issue until the v3 update.
And there is no warranty that the google play version really works. You have to pay to find it out.
It would be faire to keep 2 things in mind
So i am sad for Fdroid but i think it would not help to keep posting here unless someone has really a repo to announce that could make its way to Fdroid.
Say again, please: the Android app is now only available as a paid one at Google Play? I cannot imagine the original developer (@theScrabi) liking that. He transferred maintenance to @dasbiswajit because he no longer had time to keep it updated. Intention was to keep the F-Droid version alive, AFAIR. Simply taking the code and turning it into a paid app instead is … very impolite, to use an euphemism. I'm quite disappointed. Especially as we never received an update at F-Droid, as much as we tried – it never went further than a promise. The corresponding issue in the app's repo got closed due to "lack of time". Sad.
@dasbiswajit I urge you to remove the paywall requirement and at least make that version available as APK in your repo (there are privacy folks like me who don't use Play Store for good reasons). I fully understand the "lack of time" – but as you obviously had time to release a new version (v1.8 was released 3 days ago I see), please be fair. I have no problem with the paid version at Play as long as the free version stays available at F-Droid and is updated along – other projects do that as well. Ideally, make a build flavor using the original package name, so F-Droid can pick it up and users get notified so they can simply update, without the need to uninstall first.
@pyluyten as our posts obviously crossed: Play Store is not an option for everybody (all my devices e.g. run Google-free, so I couldn't even buy/download a paid app) – and the app in question would most likely solve the issue, plus its author promised to make it available at F-Droid.
@IzzySoft @pyluyten @GambaJo @atm1991 feel free to comment here. We should stop the f-droid discussion here.
For rest of the people f-droid is live now. Please seek more details at project repo now
Thanks @dasbiswajit! Good we finally found a way to solve the riddle. Apologies for the harsh words above, but that's how it looked on the outside. Luckily it was just misunderstanding!
Most helpful comment
Big thanks everyone!