Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"No data found" when accessing data from Nextcloud tables via link share #363

Closed
TheCrazyMaffin opened this issue Jul 30, 2023 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@TheCrazyMaffin
Copy link

I have set up a report using data from nextcloud tables.

Exported config (Name and filter replaced)
{
  "report": {
    "name": "NAME",
    "subheader": "Stand: %currentDate% %currentTime%",
    "type": 9955,
    "link": "{\"dataSourceType\":\"\",\"tableId\":\"3\",\"columns\":\"2,3,5,4,6,7,1\"}",
    "visualization": "table",
    "chart": "",
    "dimension1": "Object",
    "dimension2": "Date",
    "dimension3": null,
    "value": "2,3,5,4,6,7,1",
    "chartoptions": null,
    "dataoptions": "[]",
    "filteroptions": "{\"filter\":{\"2\":{\"option\":\"IN\",\"value\":\"FILTER_VALUES"}}}",
    "refresh": null
  },
  "dataload": [],
  "threshold": [],
  "favorite": ""
}

After creating a link share I can open it in the same browser window where I just created the share. This works just fine and displays the data. Opening the share in a private window (to simulate someone else opening it) "No data found" is displayed. There is one error in the console that is not displayed when it works:

Uncaught TypeError: OCA.Analytics.Notification is undefined
    onreadystatechange https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1341
    getData https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1299
    <anonymous> https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1437
    EventListener.handleEvent* https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1426
app.js:1341:25
Complete console output when data is displayed
JQMIGRATE: Migrate is installed, version 3.4.1 jquery-migrate.min.js:2:702
Uncaught TypeError: OCA.Analytics.Navigation is undefined
    <anonymous> https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1441
    EventListener.handleEvent* https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1426
app.js:1441:18
session heartbeat polling started session-heartbeat.js:103:9
[ERROR] Files_PDFViewer: But this does not appear to be a public page 
Object { app: "Files_PDFViewer", level: 2 }
ConsoleLogger.js:59:18

(Nextcloud URL replaced)

Complete console output when "No data found" is displayed
JQMIGRATE: Migrate is installed, version 3.4.1 jquery-migrate.min.js:2:702
Uncaught TypeError: OCA.Analytics.Navigation is undefined
    <anonymous> https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1441
    EventListener.handleEvent* https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1426
app.js:1441:18
session heartbeat polling started session-heartbeat.js:103:9
[ERROR] Files_PDFViewer: But this does not appear to be a public page 
Object { app: "Files_PDFViewer", level: 2 }
ConsoleLogger.js:59:18
Uncaught TypeError: OCA.Analytics.Notification is undefined
    onreadystatechange https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1341
    getData https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1299
    <anonymous> https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1437
    EventListener.handleEvent* https://NEXTCLOUD/apps/analytics/js/app.js?v=3c0b35a8-13:1426
app.js:1341:25

(Nextcloud URL replaced)

Nextcloud Hub 5 (27.0.1)
Analytics 4.9.4
Tables 0.5.1

@TheCrazyMaffin
Copy link
Author

There are some errors in the nextcloud admin log aswell when trying to access the share from a private tab:

[analytics] Error: Can not initialize data source: "OCA\\Tables\\Datasource\\AnalyticsDatasource"

GET /apps/analytics/data/public/SHARE?
from IP_ADDR at 2023-07-30T14:08:11+00:00


[PHP] Error: Undefined array key 9955 at /var/www/html/apps/analytics/lib/Controller/DatasourceController.php#124

GET /apps/analytics/data/public/SHARE?
from IP_ADDR at 2023-07-30T14:08:11+00:00

(Share code and ip address replaced)

@Rello
Copy link
Owner

Rello commented Jul 31, 2023

Hi,
unfortunately anonymous sharing of table-reports is not possible at the moment due to restrictions within the table app.
Possible fixes are still in discussion with the tables-team.
At the moment, these reports can only be called by a valid user

@Rello Rello self-assigned this Jul 31, 2023
@Rello Rello added the usage question Question on dedicated usecases label Jul 31, 2023
@Rello
Copy link
Owner

Rello commented Aug 1, 2023

nextcloud/tables#126

Rello added a commit that referenced this issue Aug 16, 2023
@Rello Rello added this to the 4.10.0 milestone Aug 16, 2023
@Rello Rello added bug Something isn't working pending release part of the next release version and removed usage question Question on dedicated usecases labels Aug 16, 2023
@Rello
Copy link
Owner

Rello commented Aug 16, 2023

Hi,
two topics here. the errors you posted are a bug in Analytics. I fixed them with the next version.
The issue with Tables is also in progress for the next tables version v0.6

@Rello Rello removed the pending release part of the next release version label Aug 22, 2023
@Rello Rello closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants