pbek / QOwnNotes

QOwnNotes is a plain-text file notepad and todo-list manager with Markdown support and Nextcloud / ownCloud integration.
https://www.qownnotes.org/
GNU General Public License v2.0
4.7k stars 414 forks source link

[I] OwnCloud, QOwnNotes API: can't find Notes folder #2063

Closed guilegatan closed 3 years ago

guilegatan commented 3 years ago

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): `` **Debug/fakeOldVersionNumber** (QString): `false` **Debug/fileLogging** (QString): `true` **Editor/CurrentSchemaKey** (QString): `EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb` **Editor/autoBracketClosing** (QString): `true` **Editor/autoBracketRemoval** (QString): `true` **Editor/disableCursorBlinking** (QString): `false` **Editor/editorWidthInDFMOnly** (QString): `true` **Editor/highlightCurrentLine** (QString): `true` **Editor/indentSize** (int): `4` **Editor/removeTrailingSpaces** (QString): `false` **Editor/useTabIndent** (QString): `false` **Editor/vimMode** (QString): `false` **EvernoteImportDialog/geometry** (QByteArray): `` **IssueAssistantDialog/geometry** (QByteArray): `` **LastUpdateCheck** (QDateTime): `2021-03-02T15:31:40.204` **LogWidget/criticalLog** (QString): `true` **LogWidget/debugLog** (QString): `true` **LogWidget/fatalLog** (QString): `true` **LogWidget/infoLog** (QString): `true` **LogWidget/scriptingLog** (QString): `true` **LogWidget/statusLog** (QString): `true` **LogWidget/warningLog** (QString): `true` **MainWindow/geometry** (QByteArray): `` **MainWindow/mainToolBar.iconSize** (int): `24` **MainWindow/menuBarGeometry** (QByteArray): `` **MainWindow/noteTextEdit.code.font** (QString): `Courier New,9,-1,2,50,0,0,0,0,0` **MainWindow/noteTextEdit.font** (QString): `MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0` **MainWindow/noteTextView.code.font** (QString): `Courier New,9,-1,2,50,0,0,0,0,0` **MainWindow/noteTextView.font** (QString): `MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0` **MainWindow/noteTextView.ignoreCodeFontSize** (QString): `true` **MainWindow/noteTextView.rtl** (QString): `false` **MainWindow/noteTextView.underline** (QString): `true` **MainWindow/noteTextView.useEditorStyles** (QString): `true` **MainWindow/noteTextView.useInternalExportStyling** (QString): `true` **MainWindow/showNotesFromAllNoteSubFolders** (QString): `true` **MessageBoxOverride/remove-notes** (int): `16384` **MessageBoxOverride/tag-notes** (int): `16384` **MessageBoxOverride/tag-removed-from-notes** (int): `1024` **NoteFolder-1/NoteTabNameList** (QStringList): `microCT meine Verrechnungen` **NoteFolder-1/NoteTabStickinessList** (QStringList): *empty* **NoteFolder-1/NoteTabSubFolderPathDataList** (QStringList): *empty* **NoteFolder-1/allowDifferentNoteFileName** (QString): `false` **NoteHistory-1** (QVariantList): `` **NoteHistoryCurrentIndex-1** (int): `141` **PiwikClientId** (QString): `` **ScriptRepositoryDialog/mainSplitterState** (QByteArray): `` **SearchEngineId** (int): `0` **SettingsDialog/geometry** (QByteArray): `` **SettingsDialog/mainSplitterState** (QByteArray): `` **ShowSystemTray** (QString): `false` **StartHidden** (QString): `false` **UpdateDialog/geometry** (QByteArray): `` **WelcomeDialog/geometry** (QByteArray): `` **acceptAllExternalModifications** (QString): `false` **allowNoteEditing** (QString): `true` **allowOnlyOneAppInstance** (QString): `true` **appMetrics/disableAppHeartbeat** (QString): `false` **appMetrics/disableTracking** (QString): `false` **appMetrics/notificationShown** (QString): `true` **automaticNoteFolderDatabaseClosing** (QString): `false` **checkSpelling** (QString): `false` **closeTodoListAfterSave** (QString): `false` **cryptoKey** (qlonglong): `` **currentNoteFolderId** (int): `1` **currentWorkspace** (QString): `484ce018-0811-4ee3-904f-1dbb9d5a9d3a` **cursorWidth** (int): `1` **customNoteFileExtensionList** (QStringList): *empty* **darkMode** (QString): `false` **darkModeColors** (QString): `false` **darkModeIconTheme** (QString): `false` **darkModeTrayIcon** (QString): `false` **defaultNoteFileExtension** (QString): `md` **demoNotesCreated** (QString): `true` **disableAutomaticUpdateDialog** (QString): `false` **disableSavedSearchesAutoCompletion** (QString): `false` **dockWasInitializedOnce** (QString): `true` **enableNoteTree** (QString): `false` **enableSocketServer** (QString): `true` **externalEditorPath** (QString): *empty* **fullyHighlightedBlockquotes** (QString): `false` **gitCommitInterval** (int): `30` **gitExecutablePath** (QString): *empty* **gitLogCommand** (QString): *empty* **guiFirstRunInit** (QString): `true` **ignoreAllExternalModifications** (QString): `false` **ignoreAllExternalNoteFolderChanges** (QString): `false` **ignoreNoteSubFolders** (QString): `^\.` **imageScaleDown** (QString): `false` **imageScaleDownMaximumHeight** (int): `1024` **imageScaleDownMaximumWidth** (int): `1024` **insertTimeFormat** (QString): *empty* **interfaceFontSize** (int): `11` **interfaceLanguage** (QString): *empty* **internalIconTheme** (QString): `false` **itemHeight** (int): `15` **legacyLinking** (QString): `false` **localTrash/autoCleanupDays** (int): `30` **localTrash/autoCleanupEnabled** (QString): `true` **localTrash/supportEnabled** (QString): `true` **markdownHighlightingEnabled** (QString): `true` **navigationPanelHideSearch** (QString): `false` **networking/ignoreSSLErrors** (QString): `true` **networking/proxyType** (int): `2` **newNoteAskHeadline** (QString): `false` **noteEditIsCentralWidget** (QString): `false` **noteListPreview** (QString): `false` **noteSaveIntervalTime** (int): `10` **noteSubfoldersPanelDisplayAsFullTree** (QString): `true` **noteSubfoldersPanelHideSearch** (QString): `false` **noteSubfoldersPanelOrder** (int): `0` **noteSubfoldersPanelShowFullPath** (QString): `false` **noteSubfoldersPanelShowNotesRecursively** (QString): `false` **noteSubfoldersPanelShowRootFolderName** (QString): `true` **noteSubfoldersPanelSort** (int): `0` **notesPanelOrder** (int): `0` **notesPanelSort** (int): `1` **notesPath** (QString): `D:/Dockner/OwnCloud/Notes` **notifyAllExternalModifications** (QString): `false` **overrideInterfaceFontSize** (QString): `false` **ownCloud/supportEnabled** (QString): `true` **ownCloud/todoCalendarBackend** (int): `3` **ownCloud/todoCalendarCalDAVPassword** (QString): `` **ownCloud/todoCalendarCalDAVServerUrl** (QString): *empty* **ownCloud/todoCalendarCalDAVUsername** (QString): *empty* **ownCloud/todoCalendarCloudConnectionId** (int): `1` **ownCloud/todoCalendarDisplayNameList** (QStringList): `Persönlich` **ownCloud/todoCalendarEnabledList** (QStringList): `Persönlich` **ownCloud/todoCalendarEnabledUrlList** (QStringList): `/remote.php/dav/calendars/mdockner/personal/` **ownCloud/todoCalendarUrlList** (QStringList): `/remote.php/dav/calendars/mdockner/personal/` **ownCloudInfo/appIsValid** (QString): `true` **ownCloudInfo/connectionErrorMessage** (QString): `Unbekannter Fehler` **ownCloudInfo/notesPathExistsText** (QString): `not found` **ownCloudInfo/serverVersion** (QString): `10.6.0.5` **previousWorkspace** (QString): `24de7504-595f-41f2-870e-b70867715b27` **recentNoteFolders** (QStringList): `D:/Dockner/Notes, D:/Dockner/OwnCloud` **restoreCursorPosition** (QString): `true` **restoreLastNoteAtStartup** (QString): `true` **restoreNoteTabs** (QString): `true` **savedSearches/noteFolder-1** (QStringList): `Note 2021-02-24T15.57.05, Note 2021-02-22T13.00.32, fsck_apfs, OBS-Studio, Einstellungen, Note 2020-11-09T09.16.11, Note 2018-01-08T11.08.25` **showMatches** (QString): `true` **showMenuBar** (QString): `true` **showStatusBar** (QString): `true` **systemIconTheme** (QString): `false` **taggingShowNotesRecursively** (QString): `false` **tagsPanelHideNoteCount** (QString): `false` **tagsPanelHideSearch** (QString): `false` **tagsPanelOrder** (int): `0` **tagsPanelSort** (int): `0` **todoCalendarSupport** (QString): `true` **toolbar/1/items** (QStringList): `action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionAllow_note_editing, , action_Back_in_note_history, action_Forward_in_note_history, , action_Find_text_in_note, actionReplace_in_current_note, , actionShow_versions, actionShow_trash, actionShare_note, , actionOpen_List` **toolbar/1/name** (QString): `mainToolBar` **toolbar/1/title** (QString): `Hauptsymbolleiste` **toolbar/2/items** (QStringList): `actionFormat_text_bold, actionFormat_text_italic, actionStrike_out_text, actionInsert_code_block, actionInsert_block_quote` **toolbar/2/name** (QString): `formattingToolbar` **toolbar/2/title** (QString): `Formatierungs-Werkzeugleiste` **toolbar/3/items** (QStringList): `actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time` **toolbar/3/name** (QString): `insertingToolbar` **toolbar/3/title** (QString): `Einfügen-Werkzeugleiste` **toolbar/4/items** (QStringList): `action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note` **toolbar/4/name** (QString): `encryptionToolbar` **toolbar/4/title** (QString): `Verschlüsselung-Werkzeugleiste` **toolbar/5/items** (QStringList): `actionWorkspaceComboBox, actionStore_as_new_workspace, actionRemove_current_workspace, actionRename_current_workspace, actionSwitch_to_previous_workspace, actionUnlock_panels, , actionToggle_distraction_free_mode, action_Increase_note_text_size, action_Decrease_note_text_size, action_Reset_note_text_size` **toolbar/5/name** (QString): `windowToolbar` **toolbar/5/title** (QString): `Fenster-Werkzeugleiste` **toolbar/6/items** (QStringList): `action_Quit` **toolbar/6/name** (QString): `quitToolbar` **toolbar/6/title** (QString): `Beenden - Symbolleiste` **toolbar/size** (int): `6` **useNoteFolderButtons** (QString): `false` **useUNIXNewline** (QString): `false` **webSocketServerService/bookmarksNoteName** (QString): `Bookmarks` **webSocketServerService/bookmarksTag** (QString): `bookmarks` **webSocketServerService/port** (int): `22222` **workspace-24de7504-595f-41f2-870e-b70867715b27/name** (QString): `Vollständig` **workspace-24de7504-595f-41f2-870e-b70867715b27/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-24de7504-595f-41f2-870e-b70867715b27/windowState** (QByteArray): `` **workspace-484ce018-0811-4ee3-904f-1dbb9d5a9d3a/name** (QString): `Minimal` **workspace-484ce018-0811-4ee3-904f-1dbb9d5a9d3a/noteSubFolderDockWidgetVisible** (QString): `true` **workspace-484ce018-0811-4ee3-904f-1dbb9d5a9d3a/windowState** (QByteArray): `` **workspaces** (QStringList): `24de7504-595f-41f2-870e-b70867715b27, 484ce018-0811-4ee3-904f-1dbb9d5a9d3a` ## System environment **ALLUSERSPROFILE**: `C:\ProgramData` **APPDATA**: `C:\Users\mdockner\AppData\Roaming` **CLASSPATH**: `;` **CommonProgramFiles**: `C:\Program Files\Common Files` **CommonProgramFiles(x86)**: `C:\Program Files (x86)\Common Files` **CommonProgramW6432**: `C:\Program Files\Common Files` **COMPUTERNAME**: `C59102` **ComSpec**: `C:\WINDOWS\system32\cmd.exe` **DriverData**: `C:\Windows\System32\Drivers\DriverData` **HOMEDRIVE**: `C:` **HOMEPATH**: `\Users\mdockner` **JAVA_HOME**: `C:\Program Files\AdoptOpenJDK\jre-8.0.265.01-hotspot\` **KMP_DUPLICATE_LIB_OK**: `TRUE` **LOCALAPPDATA**: `C:\Users\mdockner\AppData\Local` **LOGONSERVER**: **NUMBER_OF_PROCESSORS**: `4` **OneDrive**: `C:\Users\mdockner\OneDrive` **OS**: `Windows_NT` **Path**: `C:\Program Files\AdoptOpenJDK\jre-8.0.265.01-hotspot\bin;C:\Program Files\AdoptOpenJDK\jdk-11.0.4.11-hotspot\bin;C:\Program Files\AdoptOpenJDK\jdk8u202-b08-jre\bin;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files\Calibre2\;C:\Program Files (x86)\Skype\Phone\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\Sequencer\;C:\Program Files (x86)\sK1 Project\UniConvertor-1.1.5\;C:\Program Files (x86)\sK1 Project\UniConvertor-1.1.5\DLLs;C:\Program Files\jEdit;C:\Program Files (x86)\OpenNI\bin;C:\Program Files (x86)\PrimeSense\NITE\bin;;C:\Program Files\PrimeSense\NITE\bin64;C:\texlive\2018\bin\win32;C:\Users\mdockner\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\Nmap;C:\texlive\2017\bin\win32;D:\Temp\rsync;` **PATHEXT**: `.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC` **PROCESSOR_ARCHITECTURE**: `AMD64` **PROCESSOR_IDENTIFIER**: `Intel64 Family 6 Model 158 Stepping 9, GenuineIntel` **PROCESSOR_LEVEL**: `6` **PROCESSOR_REVISION**: `9e09` **ProgramData**: `C:\ProgramData` **ProgramFiles**: `C:\Program Files` **ProgramFiles(x86)**: `C:\Program Files (x86)` **ProgramW6432**: `C:\Program Files` **PSModulePath**: `C:\Program Files\WindowsPowerShell\Modules;C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\Sequencer\AppvPkgConverter;C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\Sequencer\AppvSequencer;C:\Program Files (x86)\Windows Kits\10\Microsoft Application Virtualization\` **PUBLIC**: `C:\Users\Public` **SESSIONNAME**: `Console` **SystemDrive**: `C:` **SystemRoot**: `C:\WINDOWS` **TEMP**: `C:\Users\mdockner\AppData\Local\Temp` **TMP**: `C:\Users\mdockner\AppData\Local\Temp` **USERDNSDOMAIN**: **USERDOMAIN**: **USERDOMAIN_ROAMINGPROFILE**: **USERNAME**: `mdockner` **USERPROFILE**: `C:\Users\mdockner` **VBOX_MSI_INSTALL_PATH**: `C:\Program Files\Oracle\VirtualBox\` **windir**: `C:\WINDOWS`

Zwischenablage01

pbek commented 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?

guilegatan commented 3 years ago

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&notes_path=\/Notes\/","message":"File with name index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info could not be located"}

I try reinstalling QOwnNotes API.

guilegatan commented 3 years ago

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.

pbek commented 3 years ago

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.

guilegatan commented 3 years ago

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

guilegatan commented 3 years ago

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... notes-path

pbek commented 3 years ago

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

pbek commented 3 years ago

"GET","url":"\/owncloud\/remote.php\/dav\/files\/mdockner\/index.php\/apps\/qownnotesapi\/api\/v1\/note\/app_info?format=json&notes_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...

guilegatan commented 3 years ago

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?

pbek commented 3 years ago

Like: GET /index.php/apps/qownnotesapi/api/v1/note/app_info?format=json&notes_path=/Notes/

guilegatan commented 3 years ago

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.

pbek commented 3 years ago

{"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&notes_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...

guilegatan commented 3 years ago

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]

guilegatan commented 3 years ago

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)?

pbek commented 3 years ago

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. 😉

pbek commented 3 years ago

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

pbek commented 3 years ago

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?

pbek commented 3 years ago

I just saw this issue is a duplicate of #1725, let's continue there.

guilegatan commented 3 years ago

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...

Zwischenablage01 Zwischenablage02

pbek commented 3 years ago

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.

gerroon commented 3 years ago

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.

pbek commented 3 years ago

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...

gerroon commented 3 years ago

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.