Closed guilegatan closed 3 years ago
serverUrl:
I guess you have set a server url, right?
[15:31:41] [warning] "QNetworkReply error 401 from url /ocs/v2.php/apps/files_sharing/api/v1/shares: " "Error transferring /ocs/v2.php/apps/files_sharing/api/v1/shares - server replied: Internal Server Error"
Seems like not even the internal ownCloud api seem to work for you, does your "Notes" folder really exist on your server? Are there any errors on your ownCloud server log?
As I said: it was configured and working until I upgraded from Owncloud 10.5 to 10.6 At that exact moment it stopped working. And as you can see, it finds the Owncloud-Server, it finds the QOwnNotes API, but it (strangely) does not find the Notes folder.
I tried renaming the Notes folder and changing the settings accordingly, but with no effect. Thanks for the tip with the log. I already looked through it, but obviously I missed something:
{"reqId":"ll6Xd9WhJPqty2hhO8VK","level":2,"time":"2021-03-02T14:49:45+00:00","remoteAddr":"[ip-removed]","user":"mdockner","app":"no app in context","method":"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/ocs\/v1.php\/cloud\/capabilities","message":"File with name ocs\/v1.php\/cloud\/capabilities could not be located"} {"reqId":"QRLJMku6ofHhsFEMe4gd","level":2,"time":"2021-03-02T14:49:45+00:00","remoteAddr":"[ip-removed]","user":"mdockner","app":"no app in context","method":"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/ocs\/v1.php","message":"File with name ocs\/v1.php could not be located"} {"reqId":"tUHrSgqRABZQCmkVqgEQ","level":2,"time":"2021-03-02T14:49:45+00:00","remoteAddr":"[ip-removed]","user":"mdockner","app":"no app in context","method":"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info?format=json¬es_path=\/Notes\/","message":"File with name index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info could not be located"}
I try reinstalling QOwnNotes API.
Reinstalling the API did not change anything. Still same error.
Hmm, don't know if that is connected to the issue: the QOwnNotes API is now residing in the /apps-external subdirectory instead of /apps Don't know if that was different in OwnCloud 10.5 before.
File with name index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info could not be located
How exactly does your server url look like in QON (you can obscure the domain if you like)?
Maybe there is a wrong index.php
in the url?
the QOwnNotes API is now residing in the /apps-external subdirectory instead of /apps
I don't know how ownCloud handles that.
How exactly does your server url look like in QON (you can obscure the domain if you like)? Maybe there is a wrong
index.php
in the url?
you mean in the settings?
NC / oC Server-URL: https:/md-server.an****.at/owncloud
oh, and btw., the Notes folder can be selected in the settings by QOwnNotes! So it somehow does find the folder (and all subfolders; see screenshot). I am really at a loss here...
NC / oC Server-URL: https:/md-server.an****.at/owncloud
LGTM
oh, and btw., the Notes folder can be selected in the settings by QOwnNotes! So it somehow does find the folder (and all subfolders; see screenshot). I am really at a loss here...
those requests are done via WebDAV directly
"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info?format=json¬es_path=\/Notes\/","message":"File with name index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info could not be located"}
I don't get at all how this request is happening. It looks like mix of WebDAV and QOwnNotesAPI request...
How should a correct API request look like in the OwnCloud logs, right after clicking the "connect to NC / oC Server" button in the QOwnNotes settings?
Like: GET /index.php/apps/qownnotesapi/api/v1/note/app_info?format=json¬es_path=/Notes/
ok, strange.
Meanwhile I tried to upgrade the QOwnNotesAPI to 20.9.0. It gives me an integrity error in OwnCloud, which does not bother me. (official version in OwnCloud repository is still 19.1.0) Sadly no solution for my initial problem. Connection to notes folder is still not working.
{"reqId":"ll6Xd9WhJPqty2hhO8VK","level":2,"time":"2021-03-02T14:49:45+00:00","remoteAddr":"[ip-removed]","user":"mdockner","app":"no app in context","method":"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/ocs\/v1.php\/cloud\/capabilities","message":"File with name ocs\/v1.php\/cloud\/capabilities could not be located"} {"reqId":"QRLJMku6ofHhsFEMe4gd","level":2,"time":"2021-03-02T14:49:45+00:00","remoteAddr":"[ip-removed]","user":"mdockner","app":"no app in context","method":"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/ocs\/v1.php","message":"File with name ocs\/v1.php could not be located"} {"reqId":"tUHrSgqRABZQCmkVqgEQ","level":2,"time":"2021-03-02T14:49:45+00:00","remoteAddr":"[ip-removed]","user":"mdockner","app":"no app in context","method":"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info?format=json¬es_path=\/Notes\/","message":"File with name index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info could not be located"}
I still suspect some config error in QON (server url) or on your ownCloud server (some mod rewrite rules you need to change with the oC update?)... Those paths seem all wrong...
Thanks, mod_rewrite is good place to start! I forgot that owncloud brings its own .htaccess file with a couple of rules. I don't know how a "default" .htaccess of owncloud should look like, but mine has these rules:
RewriteEngine on RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L] RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L] RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L] RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L] RewriteRule ^remote/(.*) remote.php [QSA,L] RewriteRule ^(?:build|tests|config|lib|3rdparty|templates|changelog)/.* - [R=404,L] RewriteRule ^core/signature\.json - [R=404,L] RewriteRule ^(?:core/skeleton)/.* - [R=404,L] RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.* RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
I did not touch this, it came all directly from owncloud. The single change from OC 10.5 to OC 10.6 are these 2 additional lines:
RewriteRule ^core/signature.json - [R=404,L] RewriteRule ^(?:core/skeleton)/.* - [R=404,L]
I have still no clue, and thus I have deactivated the QOwnNotes plugin. My notes are still synchronized through OwnCloud anyway, so all is fine.
I am actually not quite sure, what the plugin does exactly (except creating .plist files containing some metainfo)?
I am actually not quite sure, what the plugin does exactly (except creating .plist files containing some metainfo)?
https://www.qownnotes.org/getting-started/qownnotesapi.html
I will close this issue until there is more information. 😉
I went through the ordeal of setting up an ownCloud server. It seems ownCloud broke the user fetching somehow. The user the qownnotesapi app receives in null
. I tried several other ways to fetch the current user (via IUserSession
or $UserId
), the user was always null
.
I compared the way our user is fetched by the way ownCloud notes does it and they are the same: https://github.com/owncloud/notes/blob/e49aa04f078d9ce8ea7f3c5fc6522aa403edf434/controller/notescontroller.php#L49
For some strange reason I was still able to fetch the trash and the versions of the current note (they both depend on the user name). @guilegatan, can you confirm that those two are working?
I just saw this issue is a duplicate of #1725, let's continue there.
New API release 21.3.0 also (partially) solved my problem! Everything is now green in the settings, but I still get an error after clicking ok...
CSRF is turned off for the QOwnNotesAPI API endpoints, nothing has changed in that behavior in the last release. Do you enforce CSRF headers on your server? I can't reproduce this with the latest ownCloud 10.6 docker container.
I can confirm this issue with Windows Qown 21.7.7 , Nextcloud 21.0.3, Qown Api 21.7.0 Everything works, I get all green connection stuff, I can even see my Todos/Tasks but sharing results in wrong path, file/folder doesnot exists
message.
but sharing results in wrong path, file/folder doesnot exists message.
are you talking about sharing note files? I don't think this issue is about sharing. Sharing is done with the Nextcloud API directly, not QOwnNotesAPI...
This issue was referenced in another issue related to the issue I was having, I thought this was the right one to comment. I will move it to the other one.
Expected behaviour
Owncloud updated from 10.5 to 10.6.0.5 QOwnNotes API is installed, version 19.1.0
Connection status is green except the last line "Notes path on server not found"
Actual behaviour
All connections should be green (as was before on Owncloud 10.5)
Steps to reproduce
don't know. Perhaps upgrading from Owncloud 10.5 to 10.6? I attached a screenshot.
Relevant log output in the Log panel
Expand
``` [15:31:41] [warning] "QNetworkReply error 401 from url /ocs/v2.php/apps/files_sharing/api/v1/shares: " "Error transferring /ocs/v2.php/apps/files_sharing/api/v1/shares - server replied: Internal Server Error" [15:31:50] [status] Keine Skript-Aktualisierungen gefunden [15:32:52] [warning] OpenType support missing for "MS Shell Dlg 2", script 12 [15:32:52] [warning] OpenType support missing for "Arial", script 12 [15:32:52] [warning] OpenType support missing for "MS UI Gothic", script 12 [15:32:52] [warning] OpenType support missing for "SimSun", script 12 [15:32:52] [warning] OpenType support missing for "Arial Unicode MS", script 12 [15:32:52] [warning] OpenType support missing for "MS Shell Dlg 2", script 11 [15:32:52] [warning] OpenType support missing for "Arial", script 11 [15:32:52] [warning] OpenType support missing for "MS UI Gothic", script 11 [15:32:52] [warning] OpenType support missing for "SimSun", script 11 [15:32:52] [warning] OpenType support missing for "MS Shell Dlg 2", script 32 [15:32:52] [warning] OpenType support missing for "Arial", script 32 [15:32:52] [warning] OpenType support missing for "MS UI Gothic", script 32 [15:32:52] [warning] OpenType support missing for "SimSun", script 32 [15:32:52] [warning] OpenType support missing for "Arial Unicode MS", script 32 [15:32:52] [warning] OpenType support missing for "MS Shell Dlg 2", script 13 [15:32:52] [warning] OpenType support missing for "Arial", script 13 [15:32:52] [warning] OpenType support missing for "MS UI Gothic", script 13 [15:32:52] [warning] OpenType support missing for "SimSun", script 13 [15:32:52] [warning] OpenType support missing for "MS Shell Dlg 2", script 20 [15:32:52] [warning] OpenType support missing for "Arial", script 20 [15:32:52] [warning] OpenType support missing for "MS UI Gothic", script 20 [15:32:52] [warning] OpenType support missing for "SimSun", script 20 [15:32:52] [warning] OpenType support missing for "Arial Unicode MS", script 20 [15:32:52] [warning] OpenType support missing for "Segoe UI", script 20 [15:32:52] [warning] OpenType support missing for "MS Shell Dlg 2", script 20 [15:32:52] [warning] OpenType support missing for "Arial", script 20 [15:32:52] [warning] OpenType support missing for "MS UI Gothic", script 20 [15:32:52] [warning] OpenType support missing for "SimSun", script 20 [15:32:52] [warning] OpenType support missing for "Arial Unicode MS", script 20 ```Information about the application, settings and environment
Expand
QOwnNotes Debug Information =========================== ## General Info **Current Date**: `Di. Mär 2 15:36:09 2021` **Version**: `21.2.5` **Build date**: `Feb 25 2021` **Build number**: `815` **Platform**: `windows` **Operating System**: `Windows 10 Version 2009` **Build architecture**: `x86_64` **Current architecture**: `x86_64` **Release**: `GitHub Actions` **Qt Version (build)**: `5.15.2` **Qt Version (runtime)**: `5.15.2` **Portable mode**: `no` **Settings path / key**: `\HKEY_CURRENT_USER\Software\PBE\QOwnNotes` **Application database path**: `C:\Users\mdockner\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite` **Application arguments**: `C:\Users\mdockner\AppData\Local\QOwnNotes\QOwnNotes.exe` **Qt Debug**: `0` **Locale (system)**: `de_AT` **Locale (interface)**: *empty* **Primary screen resolution**: `3440x1440` **Icon theme**: `breeze-qownnotes` **Notes in current note folder**: `90` **Calendar items**: `0` **Enabled scripts**: `0` ## Server Info **serverUrl**: **appIsValid**: `yes` **notesPathExists**: `not found` **serverVersion**: `10.6.0.5` **appVersion**: *empty* ## Spellchecking **Enabled**: `false` **Selected language**: *empty* **Language codes**: *empty* **Language names**: *empty* **Application dictionaries path**: `C:\Users\mdockner\AppData\Roaming\PBE\QOwnNotes\dicts` ## Note folders **currentNoteFolderId**: `1` ### Note folder `Standard` **id**: `1` **isCurrent**: `yes` **activeTagId**: `-1` **localPath**: `D:\Dockner\OwnCloud\Notes` **remotePath**: `Notes` **cloudConnectionId**: `1` **isShowSubfolders**: `no` **isUseGit**: `no` **activeNoteSubFolder name**: *empty* **database file**: `D:\Dockner\OwnCloud\Notes\notes.sqlite` ## Cloud connections ### Cloud connection `OwnCloud` **id**: `1` **isCurrent**: `yes` **serverUrl**: **username**: `mdockner` ## Enabled scripts ## Settings **ActiveNoteHistoryItem** (NoteHistoryItem): `