Bookmarks: POST /public/rest/v2/bookmark is broken in 3.0.5

Created on 2 May 2020  Â·  23Comments  Â·  Source: nextcloud/bookmarks

Describe the bug
POSTing new bookmarks accordingly to the API documentation leads to internal server error.

To Reproduce

  1. curl --location --request POST 'https://your.next.cloud/index.php/apps/bookmarks/public/rest/v2/bookmark' \ --header 'Authorization: Basic CREDENTIALS64’ \ --header 'Content-Type: application/json' \ --data-raw '{ "url": "http://google.com", "title": "Google", "description":"in case i forget", "tags": ["search-engines", "uselessbookmark"] }'

Expected behavior
200

Server:

  • OS: Ubuntu 18.04.4 LTS
  • HTTP server: nginx 1.14.0-0ubuntu1.7
  • Database mariadb 10.4.12
  • PHP version: 7.3.17
  • Nextcloud version: 18.0.4
  • Bookmarks app version: 3.0.5

Nextcloud log (nextcloud/data/nextcloud.log)

[index] Error: Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)' with params [null, 14]:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... l", Doctrine\DBAL\Dr ... ]})
 1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... l")
 2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1063
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO `oc ... )", {1: null,2: 14})
 3. /var/www/html/lib/private/DB/Connection.php line 220
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO `oc ... )", {1: null,2: 14}, {1: 2,2: 2})
 4. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 203
    OC\DB\Connection->executeUpdate("INSERT INTO `oc ... )", {1: null,2: 14}, {1: 2,2: 2})
 5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 215
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/html/custom_apps/bookmarks/lib/Db/FolderMapper.php line 104
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/html/custom_apps/bookmarks/lib/Service/BookmarkService.php line 135
    OCA\Bookmarks\Db\FolderMapper->findRootFolder(null)
 8. /var/www/html/custom_apps/bookmarks/lib/Controller/BookmarkController.php line 413
    OCA\Bookmarks\Service\BookmarkService->create(null, "http://google.com", "Google", "in case i forget", ["search-engines","uselessbookmark"], [])
 9. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Bookmarks\Controller\BookmarkController->newBookmark("http://google.com", "Google", "in case i forget", ["search-engines","uselessbookmark"], [])
10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Bookmarks\Co ... {}, "newBookmark")
11. /var/www/html/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Bookmarks\Co ... {}, "newBookmark")
12. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Bookmarks\ ... r", "newBookmark", OC\AppFramework\ ... {}, {_route: "bookma ... "})
13. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "bookma ... "})
14. /var/www/html/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {_route: "bookma ... "})
15. /var/www/html/lib/base.php line 1008
    OC\Route\Router->match("/apps/bookmarks/public/rest/v2/bookmark")
16. /var/www/html/index.php line 38
    OC::handleRequest()

POST /index.php/apps/bookmarks/public/rest/v2/bookmark
from 213.196.213.100 by USER at 2020-05-02T14:59:37+00:00
bug

All 23 comments

btw PUT seems to be working just fine

Confirmed, sorry for the inconvenience, will release a fix soon-ish.

thx :)

@altepizza In general, if you depend on the API, it would be beneficial, if you could test the beta releases, so we don't hit these issues in production :)

Completely agree with you. Will try to keep up my testing with your (beta-)releases.

Should be fixed in the latest release.

@marcelklehr, upgraded to 3.0.7, unfortunately still broken:

[index] Error: Doctrine\DBAL\Exception\NotNullConstraintViolationException: An exception occurred while executing 'INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)' with params [null, 20]:

SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null at <<closure>>

 0. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 169
    Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException("An exception oc ... l", Doctrine\DBAL\Dr ... ]})
 1. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 145
    Doctrine\DBAL\DBALException::wrapException(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "An exception oc ... l")
 2. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php line 1063
    Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Doctrine\DBAL\Driver\PDOMySql\Driver {}, Doctrine\DBAL\Dr ... ]}, "INSERT INTO `oc ... )", {1: null,2: 20})
 3. /var/www/html/lib/private/DB/Connection.php line 220
    Doctrine\DBAL\Connection->executeUpdate("INSERT INTO `oc ... )", {1: null,2: 20}, {1: 2,2: 2})
 4. /var/www/html/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php line 203
    OC\DB\Connection->executeUpdate("INSERT INTO `oc ... )", {1: null,2: 20}, {1: 2,2: 2})
 5. /var/www/html/lib/private/DB/QueryBuilder/QueryBuilder.php line 215
    Doctrine\DBAL\Query\QueryBuilder->execute()
 6. /var/www/html/custom_apps/bookmarks/lib/Db/FolderMapper.php line 104
    OC\DB\QueryBuilder\QueryBuilder->execute()
 7. /var/www/html/custom_apps/bookmarks/lib/Service/BookmarkService.php line 135
    OCA\Bookmarks\Db\FolderMapper->findRootFolder(null)
 8. /var/www/html/custom_apps/bookmarks/lib/Controller/BookmarkController.php line 413
    OCA\Bookmarks\Service\BookmarkService->create(null, "http://google.com", "Google", "in case i forget", ["search-engines","uselessbookmark"], [])
 9. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 170
    OCA\Bookmarks\Controller\BookmarkController->newBookmark("http://google.com", "Google", "in case i forget", ["search-engines","uselessbookmark"], [])
10. /var/www/html/lib/private/AppFramework/Http/Dispatcher.php line 99
    OC\AppFramework\Http\Dispatcher->executeController(OCA\Bookmarks\Co ... {}, "newBookmark")
11. /var/www/html/lib/private/AppFramework/App.php line 125
    OC\AppFramework\Http\Dispatcher->dispatch(OCA\Bookmarks\Co ... {}, "newBookmark")
12. /var/www/html/lib/private/AppFramework/Routing/RouteActionHandler.php line 47
    OC\AppFramework\App::main("OCA\\Bookmarks\ ... r", "newBookmark", OC\AppFramework\ ... {}, {_route: "bookma ... "})
13. <<closure>>
    OC\AppFramework\Routing\RouteActionHandler->__invoke({_route: "bookma ... "})
14. /var/www/html/lib/private/Route/Router.php line 299
    call_user_func(OC\AppFramework\ ... {}, {_route: "bookma ... "})
15. /var/www/html/lib/base.php line 1008
    OC\Route\Router->match("/apps/bookmarks/public/rest/v2/bookmark")
16. /var/www/html/index.php line 38
    OC::handleRequest()

POST /index.php/apps/bookmarks/public/rest/v2/bookmark
from 89.1.212.175 by USER at 2020-05-03T19:24:53+00:00

Failing similarly for me too on 3.0.7

{"reqId":"tGrytsTKc86edTnFBVXQ","level":3,"time":"2020-05-03T19:22:56+00:00","remoteAddr":"REDACTED","user":"REDACTED","app":"index","method":"POST","url":"/index.php/apps/bookmarks/public/rest/v2/bookmark","message":{"Exception":"Doctrine\\DBAL\\Exception\\NotNullConstraintViolationException","Message":"An exception occurred while executing 'INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)' with params [null, 16]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null","Code":0,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":169,"function":"convertException","class":"Doctrine\\DBAL\\Driver\\AbstractMySQLDriver","type":"->","args":["An exception occurred while executing 'INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)' with params [null, 16]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null",{"errorInfo":["23000",1048,"Column 'user_id' cannot be null"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"}]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php","line":145,"function":"wrapException","class":"Doctrine\\DBAL\\DBALException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"},{"errorInfo":["23000",1048,"Column 'user_id' cannot be null"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"},"An exception occurred while executing 'INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)' with params [null, 16]:\n\nSQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null"]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1063,"function":"driverExceptionDuringQuery","class":"Doctrine\\DBAL\\DBALException","type":"::","args":[{"__class__":"Doctrine\\DBAL\\Driver\\PDOMySql\\Driver"},{"errorInfo":["23000",1048,"Column 'user_id' cannot be null"],"__class__":"Doctrine\\DBAL\\Driver\\PDOException"},"INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16}]},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":220,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16},{"1":2,"2":2}]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":203,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16},{"1":2,"2":2}]},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":215,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Db/FolderMapper.php","line":104,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Service/BookmarkService.php","line":135,"function":"findRootFolder","class":"OCA\\Bookmarks\\Db\\FolderMapper","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Controller/BookmarkController.php","line":413,"function":"create","class":"OCA\\Bookmarks\\Service\\BookmarkService","type":"->","args":[null,"https://duckduckgo.com","DuckDuckGo \u2014 Privacy, simplified.","",[],[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"newBookmark","class":"OCA\\Bookmarks\\Controller\\BookmarkController","type":"->","args":["https://duckduckgo.com","DuckDuckGo \u2014 Privacy, simplified.","",[],[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\BookmarkController"},"newBookmark"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\BookmarkController"},"newBookmark"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Bookmarks\\Controller\\BookmarkController","newBookmark",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"bookmarks.bookmark.new_bookmark"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"bookmarks.bookmark.new_bookmark"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"bookmarks.bookmark.new_bookmark"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/bookmarks/public/rest/v2/bookmark"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php","Line":103,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDOException","Message":"SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null","Code":"23000","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1054,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":220,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16},{"1":2,"2":2}]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":203,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16},{"1":2,"2":2}]},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":215,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Db/FolderMapper.php","line":104,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Service/BookmarkService.php","line":135,"function":"findRootFolder","class":"OCA\\Bookmarks\\Db\\FolderMapper","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Controller/BookmarkController.php","line":413,"function":"create","class":"OCA\\Bookmarks\\Service\\BookmarkService","type":"->","args":[null,"https://duckduckgo.com","DuckDuckGo \u2014 Privacy, simplified.","",[],[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"newBookmark","class":"OCA\\Bookmarks\\Controller\\BookmarkController","type":"->","args":["https://duckduckgo.com","DuckDuckGo \u2014 Privacy, simplified.","",[],[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\BookmarkController"},"newBookmark"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\BookmarkController"},"newBookmark"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Bookmarks\\Controller\\BookmarkController","newBookmark",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"bookmarks.bookmark.new_bookmark"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"bookmarks.bookmark.new_bookmark"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"bookmarks.bookmark.new_bookmark"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/bookmarks/public/rest/v2/bookmark"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":119,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'user_id' cannot be null","Code":"23000","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","line":117,"function":"execute","class":"PDOStatement","type":"->","args":[null]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php","line":1054,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDOStatement","type":"->","args":[]},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":220,"function":"executeUpdate","class":"Doctrine\\DBAL\\Connection","type":"->","args":["INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16},{"1":2,"2":2}]},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php","line":203,"function":"executeUpdate","class":"OC\\DB\\Connection","type":"->","args":["INSERT INTO `oc_bookmarks_root_folders` (`user_id`, `folder_id`) VALUES(?, ?)",{"1":null,"2":16},{"1":2,"2":2}]},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":215,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Db/FolderMapper.php","line":104,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->","args":[]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Service/BookmarkService.php","line":135,"function":"findRootFolder","class":"OCA\\Bookmarks\\Db\\FolderMapper","type":"->","args":[null]},{"file":"/var/www/nextcloud/apps/bookmarks/lib/Controller/BookmarkController.php","line":413,"function":"create","class":"OCA\\Bookmarks\\Service\\BookmarkService","type":"->","args":[null,"https://duckduckgo.com","DuckDuckGo \u2014 Privacy, simplified.","",[],[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"newBookmark","class":"OCA\\Bookmarks\\Controller\\BookmarkController","type":"->","args":["https://duckduckgo.com","DuckDuckGo \u2014 Privacy, simplified.","",[],[]]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\BookmarkController"},"newBookmark"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Bookmarks\\Controller\\BookmarkController"},"newBookmark"]},{"file":"/var/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Bookmarks\\Controller\\BookmarkController","newBookmark",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"bookmarks.bookmark.new_bookmark"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"_route":"bookmarks.bookmark.new_bookmark"}]},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"_route":"bookmarks.bookmark.new_bookmark"}]},{"file":"/var/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/bookmarks/public/rest/v2/bookmark"]},{"file":"/var/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php","Line":117}},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:75.0) Gecko/20100101 Firefox/75.0","version":"18.0.4.2"}

Alright, that's indeed a bug, but it's triggered by an auth problem. You're probably using 2FA and authenticating using app passwords?

No 2FA for me, same failure happens when using my main password or app password

Not on that instance. Just simple Nextcloud integrated auth, POST with basic auth and main credentials and no 2FA.

Nextcloud version?

Server:

  • OS: Ubuntu 18.04.4 LTS
  • HTTP server: nginx 1.14.0-0ubuntu1.7
  • Database mariadb 10.4.12
  • PHP version: 7.3.17
  • Nextcloud version: 18.0.4
  • Bookmarks app version: 3.0.7
  • OS: Ubuntu 16.04.6 LTS
  • HTTP Server: Apache/2.4.41 (Ubuntu)
  • DB: mysqld Ver 5.7.29-0ubuntu0.16.04.1 for Linux on x86_64 ((Ubuntu))
  • PHP version: 7.3.14
  • Nextcloud version: 18.0.4
  • Bookmarks app version: 3.0.7

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 ?

@marcelklehr any chance of re-opening this issue? Or shall we create a new one?

Sure, I'm sorry :)

v3.0.8 tries to fix the Auth error.

@marcelklehr, no need to be sorry!!! Thank you for your excellent work!

Updated to 3.0.8
POST of { "url": "http://google.com", "title": "Google", "description":"in case i forget", "tags": ["search-engines", "uselessbookmark"] }
now returns a 400 instead of 500:
{"status":"error","data":"Insufficient permissions"}

unfortunately I cannot even find any related entry in the nextcloud.log file anymore.

Same User, same credentials GET and PUT are working still fine

Same User, same credentials GET and PUT are working still fine

Oh, that's interesting!

Can confirm, fixed with v3.0.10. THX! @marcelklehr
Also subscribed to your releases and working on some more or less automated "integration" tests that will cover at least the calls that my iOS client will perform to give you feedback early on

Fixed for me too, thanks @marcelklehr

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GambaJo picture GambaJo  Â·  5Comments

marcelklehr picture marcelklehr  Â·  6Comments

sunjam picture sunjam  Â·  4Comments

lyallp picture lyallp  Â·  4Comments

ifuchs picture ifuchs  Â·  4Comments