Rello / analytics

Analytics - Open source data warehouse and reporting for Nextcloud
GNU Affero General Public License v3.0
116 stars 32 forks source link

can´t select shared tables as data source #402

Closed tatrapikao closed 13 hours ago

tatrapikao commented 1 month ago

While creating a new Report i am prompted to select the "Data source" for Real-time data. I am presented with a drop-down menu that only contains "Loading". I have multiple tables containing all kinds of Data that i would like to connect to the analytics app. It is possible to create the Demo Reports, also to delete them again. As a lack of Documentation (tables is stated as supported Data source in the readme but is not mentioned in the wiki) this seems to me to be a bug.

Nextcloud: 28.0.8 Analytics: 4.14.0 tables: 0.7.4

Rello commented 1 month ago

Hi, any more info? do you have a screenshot for me? browser console errors or nextcloud.log errors?

tatrapikao commented 1 month ago

Browser Console: GET https://cloud.domain.de/apps/analytics/datasource 500 (Internal Server Error) (anonym) @ xhr-request.js:79 buildDropdown @ app.js?v=a5467291-27:807 wizard @ sidebar.js?v=a5467291-27:726 showPage @ userGuidance.js?v=a5467291-27:123 next @ userGuidance.js?v=a5467291-27:72 show @ userGuidance.js?v=a5467291-27:65 handleNewButton @ navigation.js?v=a5467291-27:418 VM1977:1 Uncaught (in promise) SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON await (async) wizard @ sidebar.js?v=a5467291-27:726 showPage @ userGuidance.js?v=a5467291-27:123 next @ userGuidance.js?v=a5467291-27:72 show @ userGuidance.js?v=a5467291-27:65 handleNewButton @ navigation.js?v=a5467291-27:418 Nextcloud Logs: PermissionError PermissionError: can not read views for tableId 23

tatrapikao commented 1 month ago

image

Rello commented 1 month ago

Ah, ok. that helps. let me check. I think there was an update to the table datasource

Rello commented 1 month ago

Hello, can you get the lines around the error in the nextcloud log? I need to know where it is triggered. I can not reproduce the error

tatrapikao commented 1 month ago

{ "reqId": "XqJO0UV2H9CQ4Lb0bhGe", "level": 3, "time": "2024-07-27T20:30:33+02:00", "remoteAddr": "89.245.221.195", "user": "username", "app": "index", "method": "GET", "url": "/apps/analytics/datasource", "message": "PermissionError: can not read views for tableId 23", "userAgent": "Mozilla/5.0 (X11; Linux x86_64; rv:128.0) Gecko/20100101 Firefox/128.0", "version": "28.0.7.4", "exception": { "Exception": "OCA\Tables\Errors\PermissionError", "Message": "PermissionError: can not read views for tableId 23", "Code": 0, "Trace": [ { "file": "/var/www/html/custom_apps/tables/lib/Analytics/AnalyticsDatasource.php", "line": 109, "function": "findAll", "class": "OCA\Tables\Service\ViewService", "type": "->", "args": [ [ "OCA\Tables\Db\Table", 23 ] ] }, { "file": "/var/www/html/custom_apps/analytics/lib/Controller/DatasourceController.php", "line": 89, "function": "getTemplate", "class": "OCA\Tables\Analytics\AnalyticsDatasource", "type": "->", "args": [] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 230, "function": "index", "class": "OCA\Analytics\Controller\DatasourceController", "type": "->", "args": [] }, { "file": "/var/www/html/lib/private/AppFramework/Http/Dispatcher.php", "line": 137, "function": "executeController", "class": "OC\AppFramework\Http\Dispatcher", "type": "->", "args": [ [ "OCA\Analytics\Controller\DatasourceController" ], "index" ] }, { "file": "/var/www/html/lib/private/AppFramework/App.php", "line": 184, "function": "dispatch", "class": "OC\AppFramework\Http\Dispatcher", "type": "->", "args": [ [ "OCA\Analytics\Controller\DatasourceController" ], "index" ] }, { "file": "/var/www/html/lib/private/Route/Router.php", "line": 315, "function": "main", "class": "OC\AppFramework\App", "type": "::", "args": [ "OCA\Analytics\Controller\DatasourceController", "index", [ "OC\AppFramework\DependencyInjection\DIContainer" ], [ "analytics.datasource.index" ] ] }, { "file": "/var/www/html/lib/base.php", "line": 1069, "function": "match", "class": "OC\Route\Router", "type": "->", "args": [ "/apps/analytics/datasource" ] }, { "file": "/var/www/html/index.php", "line": 39, "function": "handleRequest", "class": "OC", "type": "::", "args": [] } ], "File": "/var/www/html/custom_apps/tables/lib/Service/ViewService.php", "Line": 98, "message": "PermissionError: can not read views for tableId 23", "exception": [], "CustomMessage": "PermissionError: can not read views for tableId 23" }, "id": "66a53cd8b2b86" }

Rello commented 1 month ago

Hello, can you confirm that you are trying to access a table, which is shared with the current user? this seems to be the issue here...

tatrapikao commented 1 month ago

There are tables present in the tables app that are shared with me.