Skip to content

fix: update return type - #2891

Closed
enjeck wants to merge 1 commit into
mainfrom
fix/broekn-type
Closed

fix: update return type#2891
enjeck wants to merge 1 commit into
mainfrom
fix/broekn-type

Conversation

@enjeck

@enjeck enjeck commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Otherwise, when you try to enable the app, you get:

{"reqId":"yqKikG7xD1rgPG0nD8I4","level":3,"time":"2026-08-14T16:49:18+00:00","remoteAddr":"192.168.21.2","user":"admin","app":"appstore","method":"POST","url":"/ocs/v2.php/apps/appstore/api/v1/apps/enable","scriptName":"/ocs/v2.php","message":"could not enable app","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:153.0) Gecko/20100101 Firefox/153.0","version":"35.0.0.3","exception":{"Exception":"TypeError","Message":"OCA\\Tables\\Migration\\Version000800Date20240213123743::shouldAddTable(): Return value must be of type ?Doctrine\\DBAL\\Schema\\Table, OC\\DB\\Schema\\Table returned","Code":0,"Trace":[{"file":"/var/www/html/apps-extra/tables/lib/Migration/Version000800Date20240213123743.php","line":50,"function":"shouldAddTable","class":"OCA\\Tables\\Migration\\Version000800Date20240213123743","type":"->","args":["tables_contexts_context",{"__class__":"OC\\DB\\SchemaWrapper"}]},{"file":"/var/www/html/apps-extra/tables/lib/Migration/Version000800Date20240213123743.php","line":33,"function":"haveContextTable","class":"OCA\\Tables\\Migration\\Version000800Date20240213123743","type":"->","args":[{"__class__":"OC\\DB\\SchemaWrapper"}]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":421,"function":"changeSchema","class":"OCA\\Tables\\Migration\\Version000800Date20240213123743","type":"->","args":[{"__class__":"OC\\Migration\\SimpleOutput"},{"__class__":"Closure"},{"tablePrefix":"oc_"}]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":387,"function":"migrateSchemaOnly","class":"OC\\DB\\MigrationService","type":"->","args":["latest"]},{"file":"/var/www/html/lib/private/Installer.php","line":548,"function":"migrate","class":"OC\\DB\\MigrationService","type":"->","args":["latest",true]},{"file":"/var/www/html/lib/private/Installer.php","line":95,"function":"installAppLastSteps","class":"OC\\Installer","type":"->","args":["/var/www/html/apps-extra/tables",{"id":"tables","name":"Tables","summary":"Manage data the way you need it.","description":"Manage data the way you need it.\n\nWith this app you are able to create your own tables with individual columns. You can start with a template or from scratch and add your wanted columns.\nYou can choose from the following column types:\n- Text line or rich text\n- Link to urls or other nextcloud resources\n- Numbers\n- Progress bar\n- Stars rating\n- Yes/No tick\n- Date and/or time\n- (Multi) selection\n- Users, groups and teams\n\nShare your tables and views with users and groups within your cloud.\n\nHave a good time and manage whatever you want.","version":"2.2.2-dev.0","0":"And 19 more entries, set log level to debug to see all entries"},null,"no"]},{"file":"/var/www/html/apps/appstore/lib/Controller/ApiController.php","line":176,"function":"installApp","class":"OC\\Installer","type":"->","args":["tables"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":172,"function":"enableApp","class":"OCA\\Appstore\\Controller\\ApiController","type":"->","args":["tables",[],false]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":80,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Appstore\\Controller\\ApiController"},"enableApp"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":138,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\Appstore\\Controller\\ApiController"},"enableApp"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":324,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\Appstore\\Controller\\ApiController","enableApp",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"_route":"ocs.appstore.api.enableapp"}]},{"file":"/var/www/html/ocs/v1.php","line":78,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/ocsapp/apps/appstore/api/v1/apps/enable"]},{"file":"/var/www/html/ocs/v2.php","line":10,"args":["/var/www/html/ocs/v1.php"],"function":"require_once"}],"File":"/var/www/html/apps-extra/tables/lib/Migration/Version000800Date20240213123743.php","Line":43,"message":"could not enable app","exception":"{\"class\":\"TypeError\",\"message\":\"OCA\\Tables\\Migration\\Version000800Date20240213123743::shouldAddTable(): Return value must be of type ?Doctrine\\DBAL\\Schema\\Table, OC\\DB\\Schema\\Table returned\",\"code\":0,\"file\":\"/var/www/html/apps-extra/tables/lib/Migration/Version000800Date20240213123743.php:43\",\"trace\":\"#0 /var/www/html/apps-extra/tables/lib/Migration/Version000800Date20240213123743.php(50): OCA\\Tables\\Migration\\Version000800Date20240213123743->shouldAddTable('tables_contexts...', Object(OC\\DB\\SchemaWrapper))\\n#1 /var/www/html/apps-extra/tables/lib/Migration/Version000800Date20240213123743.php(33): OCA\\Tables\\Migration\\Version000800Date20240213123743->haveContextTable(Object(OC\\DB\\SchemaWrapper))\\n#2 /var/www/html/lib/private/DB/MigrationService.php(421): OCA\\Tables\\Migration\\Version000800Date20240213123743->changeSchema(Object(OC\\Migration\\SimpleOutput), Object(Closure), Array)\\n#3 /var/www/html/lib/private/DB/MigrationService.php(387): OC\\DB\\MigrationService->migrateSchemaOnly('latest')\\n#4 /var/www/html/lib/private/Installer.php(548): OC\\DB\\MigrationService->migrate('latest', true)\\n#5 /var/www/html/lib/private/Installer.php(95): OC\\Installer->installAppLastSteps('/var/www/html/a...', Array, NULL, 'no')\\n#6 /var/www/html/apps/appstore/lib/Controller/ApiController.php(176): OC\\Installer->installApp('tables')\\n#7 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(172): OCA\\Appstore\\Controller\\ApiController->enableApp('tables', Array, false)\\n#8 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(80): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OCA\\Appstore\\Controller\\ApiController), 'enableApp')\\n#9 /var/www/html/lib/private/AppFramework/App.php(138): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OCA\\Appstore\\Controller\\ApiController), 'enableApp')\\n#10 /var/www/html/lib/private/Route/Router.php(324): OC\\AppFramework\\App::main('OCA\\\\Appstore\\\\Co...', 'enableApp', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\\n#11 /var/www/html/ocs/v1.php(78): OC\\Route\\Router->match('/ocsapp/apps/ap...')\\n#12 /var/www/html/ocs/v2.php(10): require_once('/var/www/html/o...')\\n#13 {main}\"}","CustomMessage":"could not enable app"}}

Signed-off-by: Enjeck C. <patrathewhiz@gmail.com>
@enjeck
enjeck requested a review from blizzz as a code owner August 16, 2026 11:44
@enjeck enjeck closed this Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant