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

Update app for Nextcloud 30 #49

Closed
pbek opened this issue Sep 16, 2024 · 4 comments
Closed

Update app for Nextcloud 30 #49

pbek opened this issue Sep 16, 2024 · 4 comments
Assignees
Milestone

Comments

@pbek
Copy link
Owner

pbek commented Sep 16, 2024

It would be great to update the app for Nextcloud 30.

@pbek pbek self-assigned this Sep 16, 2024
pbek added a commit that referenced this issue Sep 16, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
pbek added a commit that referenced this issue Sep 16, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
@pbek
Copy link
Owner Author

pbek commented Sep 16, 2024

I get this Nextcloud error in \OCA\QOwnNotesAPI\Controller\NoteApiController::getAllVersions when trying to access the versions of a file: Call to a member function getOwner() on null in file '/var/www/html/lib/private/Files/Filesystem.php' line 728. 🤔

        public static function getOwner($path) {
                return self::$defaultInstance->getOwner($path);
        }

(https://github.com/nextcloud/server/blob/6c7d79b6960813d36dbad51f6fb74a6adaf75c4d/lib/private/Files/Filesystem.php#L721-L729)

This is triggered by:

[$uid, $filename] = Storage::getUidAndFilename($source);

@pbek
Copy link
Owner Author

pbek commented Sep 16, 2024

{"reqId":"fQJ35bznyRARookhrV8z","level":3,"time":"2024-09-16T18:42:30+00:00","remoteAddr":"172.22.0.1","user":"admin","app":"index","method":"GET","url":"/index.php/apps/qownnotesapi/api/v1/note/versions?format=json&file_name=/Notes.bak/Link%20Destination.md","message":"Call to a member function getOwner() on null in file '/var/www/html/lib/private/Files/Filesystem.php' line 728","userAgent":"Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a3pre) Gecko/20070330","version":"30.0.0.14","exception":{"Exception":"Exception","Message":"Call to a member function getOwner() on null in file '/var/www/html/lib/private/Files/Filesystem.php' line 728","Code":0,"Trace":[{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\QOwnNotesAPI\\Controller\\NoteApiController"],"getAllVersions"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\QOwnNotesAPI\\Controller\\NoteApiController","getAllVersions",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["qownnotesapi.note_api.get_all_versions"]]},{"file":"/var/www/html/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/qownnotesapi/api/v1/note/versions"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","Line":146,"Previous":{"Exception":"Error","Message":"Call to a member function getOwner() on null","Code":0,"Trace":[{"file":"/var/www/html/apps/files_versions/lib/Storage.php","line":83,"function":"getOwner","class":"OC\\Files\\Filesystem","type":"::","args":["/Notes.bak/Link Destination.md"]},{"file":"/var/www/html/custom_apps/qownnotesapi/lib/Controller/NoteApiController.php","line":62,"function":"getUidAndFilename","class":"OCA\\Files_Versions\\Storage","type":"::","args":["/Notes.bak/Link Destination.md"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":208,"function":"getAllVersions","class":"OCA\\QOwnNotesAPI\\Controller\\NoteApiController","type":"->","args":[]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":114,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\QOwnNotesAPI\\Controller\\NoteApiController"],"getAllVersions"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":161,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[["OCA\\QOwnNotesAPI\\Controller\\NoteApiController"],"getAllVersions"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\QOwnNotesAPI\\Controller\\NoteApiController","getAllVersions",["OC\\AppFramework\\DependencyInjection\\DIContainer"],["qownnotesapi.note_api.get_all_versions"]]},{"file":"/var/www/html/lib/base.php","line":1001,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/qownnotesapi/api/v1/note/versions"]},{"file":"/var/www/html/index.php","line":24,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/lib/private/Files/Filesystem.php","Line":728},"message":"Call to a member function getOwner() on null in file '/var/www/html/lib/private/Files/Filesystem.php' line 728","exception":{},"CustomMessage":"Call to a member function getOwner() on null in file '/var/www/html/lib/private/Files/Filesystem.php' line 728"}}

@pbek
Copy link
Owner Author

pbek commented Sep 17, 2024

I opened https://help.nextcloud.com/t/storage-getuidandfilename-source-not-working-in-nextcloud-30-anymore/204168.

pbek added a commit that referenced this issue Sep 17, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
pbek added a commit that referenced this issue Sep 19, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
@pbek
Copy link
Owner Author

pbek commented Sep 19, 2024

I have no idea how to deal with this, so I don't for now:

24.9.0

  • Enabled and tested app for Nextcloud 30 (for #49)
    • There were troubles with the version API that didn't always happen when trying to access the versions of a file:
      Call to a member function getOwner() on null in file '/var/www/html/lib/private/Files/Filesystem.php' line 728
      • It's unclear why this happens, but it seems to be a problem with the Nextcloud server and not the app

@pbek pbek closed this as completed Sep 19, 2024
@pbek pbek added this to the 24.9.0 milestone Sep 19, 2024
pbek added a commit to pbek/QOwnNotes that referenced this issue Sep 19, 2024
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant