causefx / Organizr

HTPC/Homelab Services Organizer - Written in PHP
GNU General Public License v3.0
5.17k stars 291 forks source link

Database is locked when trying to use Bookmarks #1833

Closed bbreaddd closed 2 years ago

bbreaddd commented 2 years ago
Organizr Version: V2.1.1890
Branch: Master
WebServer: Docker
Operating System: Ubuntu Server 20.04

Problem Description:

Bookmarks aren't showing up.


Reproduction Steps:

Enable Bookmark Item Add a Bookmark Tab Put it as Active Put the Group as User Open Bookmark Tab Nothing shows


Errors on screen? If so paste here:

{"log_level":"CRITICAL","message":"Dibi\\DriverException","channel":"Database","username":"admin","trace_id":"dde782ee-906c-4e2f-b268-863d4f005196","file":"/config/www/organizr/api/classes/organizr.class.php","line":7590,"context":{"data":"UPDATE `BOOKMARK-categories` SET `default` = 1 WHERE `category_id` = (SELECT `category_id` FROM `BOOKMARK-categories` ORDER BY `category_id` ASC LIMIT 0,1)"},"remote_ip_address":"192.168.1.220","server_ip_address":"192.168.192.2","user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.54 Safari/537.36","datetime":"2022-05-09 04:00:54.680747","timezone":"UTC","process_time":0.010967254638671875,"errors":{"message":"database is locked","code":5,"file":"/config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Drivers/SqliteDriver.php","line":103,"trace":["#0 /config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Drivers/SqliteDriver.php(90): Dibi\\Drivers\\SqliteDriver::createException()","#1 /config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Connection.php(288): Dibi\\Drivers\\SqliteDriver->query()","#2 /config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Connection.php(223): Dibi\\Connection->nativeQuery()","#3 /config/www/organizr/api/classes/organizr.class.php(7559): Dibi\\Connection->query()","#4 /config/www/organizr/api/plugins/bookmark/plugin.php(1023): Organizr->processQueries()","#5 /config/www/organizr/api/plugins/bookmark/plugin.php(906): Bookmark->_correctDefaultCategory()","#6 /config/www/organizr/api/plugins/bookmark/plugin.php(1118): Bookmark->_addCategory()","#7 /config/www/organizr/api/plugins/bookmark/api.php(42): Bookmark->_checkForBookmarkCategories()","#8 /config/www/organizr/api/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): {closure}()","#9 /config/www/organizr/api/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\\Handlers\\Strategies\\RequestResponse->__invoke()","#10 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\\Routing\\Route->handle()","#11 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\\MiddlewareDispatcher->handle()","#12 /config/www/organizr/api/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\\MiddlewareDispatcher->handle()","#13 /config/www/organizr/api/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\\Routing\\Route->run()","#14 /config/www/organizr/api/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\\Routing\\RouteRunner->handle()","#15 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\\Middleware\\RoutingMiddleware->process()","#16 /config/www/organizr/api/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous\u0000/config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php:128$16d9->handle()","#17 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\\Middleware\\ErrorMiddleware->process()","#18 /config/www/organizr/api/v2/index.php(92): class@anonymous\u0000/config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php:128$16d9->handle()","#19 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(313): {closure}()","#20 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous\u0000/config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php:294$16db->handle()","#21 /config/www/organizr/api/vendor/slim/slim/Slim/App.php(215): Slim\\MiddlewareDispatcher->handle()","#22 /config/www/organizr/api/vendor/slim/slim/Slim/App.php(199): Slim\\App->handle()","#23 /config/www/organizr/api/v2/index.php(151): Slim\\App->run()"]}}
{
     "message": "database is locked",
     "code": 5,
     "file": "/config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Drivers/SqliteDriver.php",
     "line": 103,
     "trace": [
          "#0 /config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Drivers/SqliteDriver.php(90): Dibi\\Drivers\\SqliteDriver::createException()",
          "#1 /config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Connection.php(288): Dibi\\Drivers\\SqliteDriver->query()",
          "#2 /config/www/organizr/api/vendor/dibi/dibi/src/Dibi/Connection.php(223): Dibi\\Connection->nativeQuery()",
          "#3 /config/www/organizr/api/classes/organizr.class.php(7559): Dibi\\Connection->query()",
          "#4 /config/www/organizr/api/plugins/bookmark/plugin.php(1023): Organizr->processQueries()",
          "#5 /config/www/organizr/api/plugins/bookmark/plugin.php(906): Bookmark->_correctDefaultCategory()",
          "#6 /config/www/organizr/api/plugins/bookmark/plugin.php(1118): Bookmark->_addCategory()",
          "#7 /config/www/organizr/api/plugins/bookmark/api.php(42): Bookmark->_checkForBookmarkCategories()",
          "#8 /config/www/organizr/api/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(43): {closure}()",
          "#9 /config/www/organizr/api/vendor/slim/slim/Slim/Routing/Route.php(384): Slim\\Handlers\\Strategies\\RequestResponse->__invoke()",
          "#10 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\\Routing\\Route->handle()",
          "#11 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): Slim\\MiddlewareDispatcher->handle()",
          "#12 /config/www/organizr/api/vendor/slim/slim/Slim/Routing/Route.php(341): Slim\\MiddlewareDispatcher->handle()",
          "#13 /config/www/organizr/api/vendor/slim/slim/Slim/Routing/RouteRunner.php(84): Slim\\Routing\\Route->run()",
          "#14 /config/www/organizr/api/vendor/slim/slim/Slim/Middleware/RoutingMiddleware.php(59): Slim\\Routing\\RouteRunner->handle()",
          "#15 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\\Middleware\\RoutingMiddleware->process()",
          "#16 /config/www/organizr/api/vendor/slim/slim/Slim/Middleware/ErrorMiddleware.php(107): class@anonymous\u0000/config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php:128$16d9->handle()",
          "#17 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(147): Slim\\Middleware\\ErrorMiddleware->process()",
          "#18 /config/www/organizr/api/v2/index.php(92): class@anonymous\u0000/config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php:128$16d9->handle()",
          "#19 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(313): {closure}()",
          "#20 /config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php(81): class@anonymous\u0000/config/www/organizr/api/vendor/slim/slim/Slim/MiddlewareDispatcher.php:294$16db->handle()",
          "#21 /config/www/organizr/api/vendor/slim/slim/Slim/App.php(215): Slim\\MiddlewareDispatcher->handle()",
          "#22 /config/www/organizr/api/vendor/slim/slim/Slim/App.php(199): Slim\\App->handle()",
          "#23 /config/www/organizr/api/v2/index.php(151): Slim\\App->run()"
     ]
}
bbreaddd commented 2 years ago

I'm not sure of the exact fix but I deleted all data and started over. I enabled the Boomark Item Added 2 Bookmark Categories Added a Bookmark and put it in the second category and it seems to work now.