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.6k stars 409 forks source link

Issue with windows client #951

Closed Boulderon closed 6 years ago

Boulderon commented 6 years ago

Expected behaviour

Run application, application window opens

Actual behaviour

Run application, taskbar show's up briefly and disappears. No process running in task manager

Steps to reproduce

Perform initial setup and run application

Output from the debug section in the settings dialog

Unavailable.

Relevant log output in the Log panel

Application wont open, if I can get you a log another way, I will.

pbek commented 6 years ago

Which version of QOwnNotes are you running? QOwnNotes.exe --help could tell you this. Did you try to clear your settings with QOwnNotes.exe --clear-settings?

Boulderon commented 6 years ago

QOwnNotes 18.06.6
Server version 13.0.4.0 API Version 17.5.0

I did clear the settings and while re-configuring did enable debugging. Log is below, same symptoms.

[Jun 27 08:05:36] [debug]: Set proxy configuration to use NO proxy [Jun 27 08:05:37] [debug]: initShortcuts - 'menuBarIsVisible': true [Jun 27 08:05:37] [debug]: initShortcuts - 'menuBarIsVisible': true [Jun 27 08:05:37] [debug]: setupNoteFolderTables - 'database version': 13 [Jun 27 08:05:37] [debug]: fetchShares - 'url': QUrl("https://-----.com/ocs/v1.php/apps/files_sharing/api/v1/shares")

[Jun 27 08:05:37] [debug]: reloadTagTree - 'noteSubFolderIds': (-1)

pbek commented 6 years ago

So what did you actually configure? Can you please provide the output of the debug settings.

Boulderon commented 6 years ago

Location of local storage, server settings and enabled debug logging to file (which is in a previous post). How can I provide you the output of the debug settings?

pbek commented 6 years ago

In the settings there is a menu entry for debug. And what happens if you don't configure anything (e.g. no server settings)?

Boulderon commented 6 years ago

Sorry, only enabled debugging to a log. I just cleared the settings just now and did not attach it to a server with all defaults and it still only shows the taskbar icon until I hover over it (then it closes).

pbek commented 6 years ago

So what is the output of the debug settings when you start it for the first time?

OnlyAMedic commented 6 years ago

I'm having the exact same issue.

OS: Windows 10 x64

QOwnNotes 18.06.6

pbek commented 6 years ago

Any output when ran from the command line?

ghost commented 6 years ago

I have the same issue Windows 10, QOwnNotes 18.06.6

There is no output when run from the command line.

The output to the logfile is: [Jun 27 22:05:00] [debug]: Set proxy configuration to use NO proxy [Jun 27 22:05:00] [debug]: initShortcuts - 'menuBarIsVisible': true [Jun 27 22:05:00] [debug]: initShortcuts - 'menuBarIsVisible': true [Jun 27 22:05:00] [debug]: setupNoteFolderTables - 'database version': 13

[Jun 27 22:05:00] [debug]: reloadTagTree - 'noteSubFolderIds': (-1)

pbek commented 6 years ago

nothing uncommon here... :/

pbek commented 6 years ago

I just tried to restart the installation on Windows 8.1 and didn't get the issue. :/

ghost commented 6 years ago

Could it be a library or Windows 10 issue? The only other thing I could try is to build from source.

pbek commented 6 years ago

I just tried the same on Windows 10, worked flawlessly. :( What is the content of your note folder? What files are currently in there?

The only other thing I could try is to build from source.

That would be great! Thanks a lot!

Boulderon commented 6 years ago

I also tried it on server 2012r2 and got the same behavior as I did on 10, Maybe it is a library issue going on.

OnlyAMedic commented 6 years ago

Any output when ran from the command line?

No output when ran from command line. I am going to see if I can debug it.

Boulderon commented 6 years ago

Also, the output of the debug file is in the first post, every time I try and start the app it shows the exact log messages

pbek commented 6 years ago

What is the content of your note folder? What files are currently in there?

Boulderon commented 6 years ago

Folder is empty, i've even let the desktop app create the folder

pbek commented 6 years ago

What happens if you put these notes into your note folder? Test6.zip

Boulderon commented 6 years ago

So i've got good news, I think I found what had happened. I cleared the settings and pointed the "where you store your notes" to my sync'd copy of Notes folder from Nextcloud, connected as usual and it comes up fine with or without the Test6.zip. Nextcloud sync folder also lives on another drive.

pbek commented 6 years ago

So your QOwnNotes can't initialize the note folder database and copy the demo notes.

pbek commented 6 years ago

@jdgallag84 it would be really great if you could tell me where the application quits, by single stepping through the code. :sweat_smile:

pbek commented 6 years ago

@Boulderon you would need to build the application yourself in QtCreator (see https://www.qownnotes.org/installation#building). There you could debug it with the shortcut F5.

pbek commented 6 years ago

@jdgallag84 did you have any luck with building and testing QOwnNotes so far?

pbek commented 6 years ago

@Boulderon what happens if you create a new note folder in the QOwnNotes settings, does the welcome notes get created then?

pbek commented 6 years ago

18.07.0

pbek commented 6 years ago

There now is a new release, could you please test it and report what debug messages you get?

OnlyAMedic commented 6 years ago

Downloaded new release, did a QOwnNotes.exe --clear-settings & used default settings and everything ended up working.

pbek commented 6 years ago

@OnlyAMedic nothing changed in that release that would solve this. Did you start with an empty note folder or did you use a note folder that already had the notes.sqlite database?

OnlyAMedic commented 6 years ago

@pbek I started with a completely new note folder. I deleted all of the my prior notes, re-downloaded from latest release, and used all default settings and it ended up working. I don't know why it randomly started working again, even though I took similar steps last time. Extremely strange.

pbek commented 6 years ago

That really is strange... Anyone else can report that it's now working for you?

Boulderon commented 6 years ago

Same issue on the server machine, the application is able to startup if I create the folder manually but if the application has to create the folder it wont (running as a domain admin). Log file below.

[Jul 02 09:35:05] [debug]: Set proxy configuration to use NO proxy [Jul 02 09:35:05] [debug]: initShortcuts - 'menuBarIsVisible': true [Jul 02 09:35:05] [debug]: initShortcuts - 'menuBarIsVisible': true [Jul 02 09:35:05] [debug]: buildNotesIndex - 'noteSubFolderId': 0 [Jul 02 09:35:05] [debug]: setupNoteFolderTables - 'database version': 13 [Jul 02 09:35:05] [debug]: fetchShares - 'url': QUrl("https://*****/ocs/v1.php/apps/files_sharing/api/v1/shares")

[Jul 02 09:35:05] [debug]: reloadTagTree - 'noteSubFolderIds': (-1)

QOwnNotes Debug Information

General Info

Current Date: Mon Jul 2 09:34:17 2018 Version: 18.07.0 Build date: Jul 1 2018 Build number: 3677 Platform: windows Operating System: Windows Server 2012 R2 (6.3) Build architecture: i386 Current architecture: x86_64 Release: AppVeyor Qt Version (build): 5.10.1 Qt Version (runtime): 5.10.1 Portable mode: no Settings path / key: \HKEY_CURRENT_USER\Software\PBE\QOwnNotes Application database path: C:\Users\c.gibson\AppData\Roaming\PBE\QOwnNotes\QOwnNotes.sqlite Application arguments: qownnotes, --clear-settings Qt Debug: 0 Locale (system): en_US Locale (interface): empty Icon theme: breeze-qownnotes Notes in current note folder: 0 Enabled scripts: 0

Server Info

serverUrl: ***** appIsValid: yes notesPathExists: yes serverVersion: 13.0.4.0 appVersion: 17.5.0

Note folders

currentNoteFolderId: 0

Enabled scripts

There are no enabled scripts.

Settings

Debug/fakeOldVersionNumber: false Debug/fileLogging: false Editor/CurrentSchemaKey: EditorColorSchema-6033d61b-cb96-46d5-a3a8-20d5172017eb Editor/autoBracketClosing: true Editor/autoBracketRemoval: true Editor/editorWidthInDFMOnly: true Editor/highlightCurrentLine: true MainWindow/mainToolBar.iconSize: 0 MainWindow/noteTextEdit.code.font: Courier New,9,-1,2,50,0,0,0,0,0 MainWindow/noteTextEdit.font: MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 MainWindow/noteTextView.code.font: Courier New,9,-1,2,50,0,0,0,0,0 MainWindow/noteTextView.font: MS Shell Dlg 2,8.25,-1,5,50,0,0,0,0,0 MainWindow/noteTextView.rtl: false PiwikClientId: <hidden> SearchEngineId: 2 SettingsDialog/geometry: <binary data> SettingsDialog/mainSplitterState: <binary data> ShowSystemTray: false StartHidden: false WelcomeDialog/geometry: <binary data> acceptAllExternalModifications: false allowDifferentNoteFileName: false allowOnlyOneAppInstance: false appMetrics/disableAppHeartbeat: false appMetrics/disableTracking: false closeTodoListAfterSave: false cryptoKey: <hidden> cursorWidth: 1 customNoteFileExtensionList: empty darkMode: false darkModeColors: false darkModeTrayIcon: false defaultNoteFileExtension: md disableAutomaticUpdateDialog: false externalEditorPath: empty fullyHighlightedBlockquotes: false gitCommitInterval: 30 gitExecutablePath: empty gitLogCommand: empty ignoreAllExternalModifications: false ignoreAllExternalNoteFolderChanges: false imageScaleDown: false imageScaleDownMaximumHeight: 1024 imageScaleDownMaximumWidth: 1024 insertTimeFormat: empty interfaceLanguage: empty internalIconTheme: false itemHeight: 15 localTrash/autoCleanupDays: 30 localTrash/autoCleanupEnabled: true localTrash/supportEnabled: true markdownHighlightingEnabled: true networking/ignoreSSLErrors: true networking/proxyType: 2 newNoteAskHeadline: false noteEditIsCentralWidget: true noteSaveIntervalTime: 10 noteSubfoldersPanelDisplayAsFullTree: true noteSubfoldersPanelHideSearch: false noteSubfoldersPanelOrder: 0 noteSubfoldersPanelShowFullPath: false noteSubfoldersPanelShowNotesRecursively: false noteSubfoldersPanelShowRootFolderName: true noteSubfoldersPanelSort: 0 notesPanelOrder: 0 notesPanelSort: 1 notesPath: C:/Users/c.gibson/Notes notifyAllExternalModifications: false ownCloud/password: <hidden> ownCloud/serverUrl: ***** ownCloud/supportEnabled: true ownCloud/todoCalendarBackend: 3 ownCloud/todoCalendarCalDAVPassword: <hidden> ownCloud/todoCalendarCalDAVServerUrl: empty ownCloud/todoCalendarCalDAVUsername: empty ownCloud/todoCalendarDisplayNameList: empty ownCloud/todoCalendarEnabledList: empty ownCloud/todoCalendarEnabledUrlList: empty ownCloud/todoCalendarUrlList: empty ownCloud/userName: boulderon restoreCursorPosition: true taggingShowNotesRecursively: false tagsPanelHideSearch: false tagsPanelOrder: 0 tagsPanelSort: 0 useUNIXNewline: false

System environment

ALLUSERSPROFILE: C:\ProgramData APPDATA: C:\Users\c.gibson\AppData\Roaming CLIENTNAME: PANDORA CommonProgramFiles: C:\Program Files (x86)\Common Files CommonProgramFiles(x86): C:\Program Files (x86)\Common Files CommonProgramW6432: C:\Program Files\Common Files COMPUTERNAME: TS-V1 ComSpec: C:\Windows\system32\cmd.exe FP_NO_HOST_CHECK: NO HOMEDRIVE: C: HOMEPATH: \Users\c.gibson LOCALAPPDATA: C:\Users\c.gibson\AppData\Local LOGONSERVER: \\DC-V1 LTSHARE: L: NUMBER_OF_PROCESSORS: 4 OS: Windows_NT Path: C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\PuTTY\;C:\Program Files (x86)\Bitvise SSH Client;C:\Program Files\FileBot\ PATHEXT: .COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC PROCESSOR_ARCHITECTURE: x86 PROCESSOR_ARCHITEW6432: AMD64 PROCESSOR_IDENTIFIER: Intel64 Family 6 Model 44 Stepping 2, GenuineIntel PROCESSOR_LEVEL: 6 PROCESSOR_REVISION: 2c02 ProgramData: C:\ProgramData ProgramFiles: C:\Program Files (x86) ProgramFiles(x86): C:\Program Files (x86) ProgramW6432: C:\Program Files PROMPT: $P$G PSModulePath: C:\Windows\system32\WindowsPowerShell\v1.0\Modules\ PUBLIC: C:\Users\Public SESSIONNAME: RDP-Tcp#53 SystemDrive: C: SystemRoot: C:\Windows TEMP: C:\Users\C5E84~1.GIB\AppData\Local\Temp\2 TMP: C:\Users\C5E84~1.GIB\AppData\Local\Temp\2 USERDNSDOMAIN: INTERNAL.LOCAL USERDOMAIN: INTERNAL USERDOMAIN_ROAMINGPROFILE: INTERNAL USERNAME: c.gibson USERPROFILE: C:\Users\c.gibson windir: C:\Windows

pbek commented 6 years ago

@Boulderon thank you for testing.

if I create the folder manually

what exactly did you do? you created an empty folder and used that in the setup process? or did you use an already existing note folder with notes and notes.sqlite file?

Application arguments: qownnotes, --clear-settings

strange, it says qownnotes, did you rename the executable?

Boulderon commented 6 years ago

I had created an empty folder named notes with nothing in it and let the application populate notes.sqlite and it loaded with no issues. If there was not an existing empty notes folder and the application tried to create the folder it would crash.

Also the executable was not renamed, it was straight from the archive

pbek commented 6 years ago

Thank you, @Boulderon, that's very interesting... So you were able at first start to select a folder that didn't exist? How were you able to do that?

pbek commented 6 years ago

Also the executable was not renamed, it was straight from the archive

@Boulderon for me the arguments look like this:

Application arguments: C:\Users\patri\Downloads\QOwnNotes (2)\QOwnNotes.exe

QOwnNotes.exe is what's in the archive from https://www.qownnotes.org/installation...

Boulderon commented 6 years ago

Sorry, had ran it from command line and didnt add the .exe at the end. The circled below isn't working, if I try and let the application create the folder it fails and crashes even though permissions are elevated. If I manually create the empty folder and point the application to it or use the same default path it works. Does the application need to be pointed to the Nextcloud sync'd copy of Notes by any chance?

image

pbek commented 6 years ago

Sorry, had ran it from command line and didnt add the .exe at the end.

Ah, seems like a Windows thing to allow to execute it that way

The circled below isn't working, if I try and let the application create the folder it fails and crashes even though permissions are elevated.

I just tried that under Windows 10 Home and it created the folder even with its parent flawlessly.

Does the application need to be pointed to the Nextcloud sync'd copy of Notes by any chance?

no, not at all. all possible ways are supposed to work

pbek commented 6 years ago

@Boulderon do you get an error message when the note folder can't be created, like stated in: https://github.com/pbek/QOwnNotes/blob/047e44a0d1cdf0c2043a38bf9ed262691b81360d/src/dialogs/welcomedialog.cpp#L72-L80

Boulderon commented 6 years ago

Nothing, just appcrash. Still trying to build and debug it on the server but i'm having some issues getting the build enviroment setup

pbek commented 6 years ago

Nothing, just appcrash.

so when does it crash? when you hit the "next" button (that you shouldn't be able to click if the note folder doesn't exist)?

are you able to create a note folder in the dialog where you can select a note folder? (and than use this note folder)

Still trying to build and debug it on the server but i'm having some issues getting the build enviroment setup

awesome, that would help a lot! what are your issues? anything I can help with?

Boulderon commented 6 years ago

so when does it crash? when you hit the "next" button (that you shouldn't be able to click if the note folder doesn't exist)? The app continues like there's nothing wrong, if I take the defaults and C:\users\%username%\Nextcloud\Notes doesnt exist the application doesn't prompt to create it and continues.

are you able to create a note folder in the dialog where you can select a note folder? (and than use this note folder) Yes, if I choose a folder and create a new folder from within initial setup then its happy and loads up

There's only one other issue but i'll post a separate bug report when this one gets taken care of.

On Tue, Jul 3, 2018 at 10:50 AM Patrizio Bekerle notifications@github.com wrote:

Nothing, just appcrash.

so when does it crash? when you hit the "next" button (that you shouldn't be able to click if the note folder doesn't exist)?

are you able to create a note folder in the dialog where you can select a note folder? (and than use this note folder)

Still trying to build and debug it on the server but i'm having some issues getting the build enviroment setup

awesome, that would help a lot! what are your issues? anything I can help with?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbek/QOwnNotes/issues/951#issuecomment-402204808, or mute the thread https://github.com/notifications/unsubscribe-auth/AmuvkMssLQC3pHt80ySn-unj9arCXuffks5uC5LMgaJpZM4U4kcY .

pbek commented 6 years ago

The app continues like there's nothing wrong, if I take the defaults and C:\users\%username%\Nextcloud\Notes doesnt exist the application doesn't prompt to create it and continues.

I've not the slightest idea how that can happen or what to do about it without (me or someone else) debugging QOwnNotes on a machine where that happens... :(

Boulderon commented 6 years ago

Yeah, I've tried several times to compile and build but either the app crashes or fails to run. Since I've never used qt creator I probably have a kit or compiler or something setup wrong.

On Wed, Jul 4, 2018, 11:17 PM Patrizio Bekerle notifications@github.com wrote:

The app continues like there's nothing wrong, if I take the defaults and C:\users%username%\Nextcloud\Notes doesnt exist the application doesn't prompt to create it and continues.

I've not the slightest idea how that can happen or what to do about it without (me or someone else) debugging QOwnNotes on a machine where that happens... :(

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pbek/QOwnNotes/issues/951#issuecomment-402602118, or mute the thread https://github.com/notifications/unsubscribe-auth/AmuvkPODLcy0XdS502WFu_O_z8N_jIVdks5uDZNNgaJpZM4U4kcY .

pbek commented 6 years ago

You mean QtCreator crashes? Or QOwnNotes? Are there any errors?

doesnt exist the application doesn't prompt to create it and continues.

I'll try to add some extra checks in log messages to dir.mkpath(_notesPath) in the next release.

pbek commented 6 years ago

18.07.2

pbek commented 6 years ago

There now is a new release.

@Boulderon, can you please test this new release on the command line interface (where you should get new debug text) to see if the note folder can be created.

You can run QOwnNotes.exe --session test to start a new session with new settings (so you don't have to remove your settings every time)

Boulderon commented 6 years ago

What's the switch to enable debugging? Since the change to the welcome screen I cant click into the menu during initial setup to enable it.

pbek commented 6 years ago

You should be able to see the text output on the terminal (cmd.exe).