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

Every 30s I'm getting a warning: "Command '\"git\" init' failed" when run as snap #1306

Closed
marisradu opened this issue Oct 10, 2019 · 21 comments

Comments

@marisradu
Copy link

marisradu commented Oct 10, 2019

Expected behaviour

Everything seems to work as expected, but seems to be stuck in some strange state.

Actual behaviour

The features I used work as expected.

Steps to reproduce

Did not used the app for a couple of weeks and now when I opend it I'm getting this warning every 30s. I set it to "don't display again", but something might be broken that's not in plain view right now.

OS: Ubuntu 16.04.02 LTS
QOwnNotes installed via snap. Made sure I upgraded to the latest version today, current version is:
QOwnNotes - version 19.10.4 - Snapcraft - build 595

Git is installed in the system and work as expected in command line.
Git path is not an issue:

git: /usr/bin/git

When setting this path in the git config of QOwnNotes I'm getting pretty much the same error:

[Oct 10 23:04:05] [warning]: "Command '\"/usr/bin/git\" init' failed"

As git does not seem to be the issue, the init command fails due to some reason, but don't know the folder it's trying to execute it in, and not sure what's the real error returned by git.

Let me know if there is another debug flag to enable to get more details.

Relevant log output in the Log panel

Expand
[Oct 10 22:43:53] [warning]: "Removed log file: " "/home/radu/snap/qownnotes/3023/.local/share/PBE/QOwnNotes/QOwnNotes.log"
[Oct 10 22:44:04] [debug]: Set proxy configuration to use NO proxy
[Oct 10 22:44:04] [debug]: initShortcuts  - 'menuBarIsVisible':  true
[Oct 10 22:44:04] [debug]: cloudConnection:  CloudConnection: <id>1 <name>"Default" <serverUrl>"" <username>"" <priority>1
[Oct 10 22:44:04] [debug]: loadNoteDirectoryList
[Oct 10 22:44:04] [debug]: reloadTagTree
[Oct 10 22:44:04] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:44:04] [debug]: reloadNoteSubFolderTree
[Oct 10 22:44:04] [debug]: reloadNoteSubFolderTree
[Oct 10 22:44:05] [debug]: reloadTagTree
[Oct 10 22:44:05] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:44:05] [debug]: loadNoteDirectoryList
[Oct 10 22:44:05] [debug]: reloadTagTree
[Oct 10 22:44:05] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:44:05] [debug]: reloadNoteSubFolderTree
[Oct 10 22:44:05] [debug]: cloudConnection:  CloudConnection: <id>1 <name>"Default" <serverUrl>"" <username>"" <priority>1
[Oct 10 22:44:05] [debug]: reloadTagTree
[Oct 10 22:44:05] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:44:07] [debug]: cloudConnection:  CloudConnection: <id>1 <name>"Default" <serverUrl>"" <username>"" <priority>1
[Oct 10 22:44:09] [debug]: getDiskDatabasePath  - 'databaseFileName':  "/home/radu/snap/qownnotes/3023/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite"
[Oct 10 22:44:35] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:45:05] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:45:35] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:45:59] [debug]: Set proxy configuration to use NO proxy
[Oct 10 22:45:59] [debug]: initShortcuts  - 'menuBarIsVisible':  true
[Oct 10 22:45:59] [debug]: cloudConnection:  CloudConnection: <id>1 <name>"Default" <serverUrl>"" <username>"" <priority>1
[Oct 10 22:45:59] [debug]: loadNoteDirectoryList
[Oct 10 22:45:59] [debug]: reloadTagTree
[Oct 10 22:45:59] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:46:00] [debug]: reloadNoteSubFolderTree
[Oct 10 22:46:00] [debug]: reloadNoteSubFolderTree
[Oct 10 22:46:00] [debug]: reloadTagTree
[Oct 10 22:46:00] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:46:00] [debug]: loadNoteDirectoryList
[Oct 10 22:46:00] [debug]: reloadTagTree
[Oct 10 22:46:00] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:46:00] [debug]: reloadNoteSubFolderTree
[Oct 10 22:46:00] [debug]: cloudConnection:  CloudConnection: <id>1 <name>"Default" <serverUrl>"" <username>"" <priority>1
[Oct 10 22:46:00] [debug]: reloadTagTree
[Oct 10 22:46:00] [debug]: reloadTagTree  - 'noteSubFolderIds':  (-1)
[Oct 10 22:46:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:46:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:47:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:47:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:48:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:48:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:49:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:49:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:50:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:50:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:51:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:51:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:52:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:52:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:53:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:53:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:54:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:54:59] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:55:29] [warning]: "Command '\"git\" init' failed"
[Oct 10 22:55:59] [warning]: "Command '\"git\" init' failed"

Information about the application, settings and environment

Expand

QOwnNotes Debug Information

General Info

Current Date: Thu Oct 10 22:57:12 2019
Version: 19.10.4
Build date: Oct 10 2019
Build number: 595
Platform: linux
Operating System: Ubuntu Core 16
Build architecture: x86_64
Current architecture: x86_64
Release: Snapcraft
Qt Version (build): 5.5.1
Qt Version (runtime): 5.5.1
Portable mode: no
Settings path / key: /home/radu/snap/qownnotes/3023/.config/PBE/QOwnNotes.conf
Application database path: /home/radu/snap/qownnotes/3023/.local/share/PBE/QOwnNotes/QOwnNotes.sqlite
Application arguments: /snap/qownnotes/3023/usr/bin/QOwnNotes, -style=Fusion, --snap
Qt Debug: 0
Locale (system): en_GB
Locale (interface): empty
Icon theme: breeze-dark-qownnotes
Notes in current note folder: 13
Calendar items: 0
Enabled scripts: 0

Server Info

serverUrl: empty
appIsValid: no
notesPathExists: empty
connectionErrorMessage: empty

Note folders

currentNoteFolderId: 1

Note folder default

id: 1
isCurrent: yes
activeTagId: -1
localPath: /home/radu/pCloudDrive/Documents/Notes
remotePath: Notes
cloudConnectionId: 1
isShowSubfolders: yes
isUseGit: yes
activeNoteSubFolder name: empty
database file: /home/radu/pCloudDrive/Documents/Notes/notes.sqlite

Cloud connections

Cloud connection Default

id: 1
isCurrent: yes
serverUrl: empty
username: empty

Enabled scripts

Settings

AboutDialog/geometry (QByteArray): <binary data>
ActiveNoteHistoryItem (NoteHistoryItem): <binary data>
Debug/fakeOldVersionNumber (bool): false
Debug/fileLogging (bool): true
DistractionFreeMode/isEnabled (QString): true
DistractionFreeMode/menuBarGeometry (QByteArray): <binary data>
DistractionFreeMode/menuBarHeight (int): 24
DistractionFreeMode/menuBarVisible (bool): false
DistractionFreeMode/windowState (QByteArray): <binary data>
Editor/CurrentSchemaKey (QString): EditorColorSchema-cdbf28fc-1ddc-4d13-bb21-6a4043316a2f
Editor/autoBracketClosing (bool): true
Editor/autoBracketRemoval (bool): true
Editor/disableCursorBlinking (bool): false
Editor/editorWidthInDFMOnly (bool): true
Editor/highlightCurrentLine (bool): true
Editor/vimMode (bool): false
FileDialog/LastPath (QString): /home/radu/Desktop
FileDialog/LastPath-SaveDebugInfo (QString): /home/radu/Desktop
IssueAssistantDialog/geometry (QByteArray): <binary data>
LastUpdateCheck (QDateTime): 2019-10-10T22:37:10
LogWidget/criticalLog (bool): true
LogWidget/debugLog (bool): true
LogWidget/fatalLog (bool): true
LogWidget/infoLog (bool): true
LogWidget/scriptingLog (bool): true
LogWidget/statusLog (bool): true
LogWidget/warningLog (bool): true
MainWindow/geometry (QByteArray): <binary data>
MainWindow/mainToolBar.iconSize (int): 24
MainWindow/menuBarGeometry (QByteArray): <binary data>
MainWindow/noteTextEdit.code.font (QString): monospace,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextEdit.font (QString): DejaVu Sans,12,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.code.font (QString): monospace,9,-1,2,50,0,0,0,0,0
MainWindow/noteTextView.font (QString): DejaVu Sans,12,-1,5,50,0,0,0,0,0
MainWindow/noteTextView.ignoreCodeFontSize (bool): true
MainWindow/noteTextView.rtl (bool): false
MainWindow/noteTextView.underline (bool): true
MainWindow/showNotesFromAllNoteSubFolders (bool): true
MessageBoxOverride/command-failed (int): 1024
NoteHistory-1 (QVariantList): <variant list with 11 item(s)>
NoteHistoryCurrentIndex-1 (int): 10
PiwikClientId (QString): <hidden>
SearchEngineId (int): 2
SettingsDialog/geometry (QByteArray): <binary data>
SettingsDialog/mainSplitterState (QByteArray): <binary data>
ShowSystemTray (bool): false
StartHidden (bool): false
UpdateDialog/geometry (QByteArray): <binary data>
WelcomeDialog/geometry (QByteArray): <binary data>
acceptAllExternalModifications (bool): false
allowDifferentNoteFileName (bool): false
allowNoteEditing (bool): false
allowOnlyOneAppInstance (bool): true
appMetrics/disableAppHeartbeat (bool): false
appMetrics/disableTracking (bool): true
appMetrics/notificationShown (QString): true
automaticNoteFolderDatabaseClosing (bool): false
closeTodoListAfterSave (bool): false
cryptoKey (QString): <hidden>
currentNoteFolderId (QString): 1
currentWorkspace (QString): 4ecbab0c-b296-47e0-8338-3d24d947af06
cursorWidth (int): 1
customNoteFileExtensionList (QStringList): empty
darkMode (bool): true
darkModeColors (bool): true
darkModeIconTheme (bool): true
darkModeTrayIcon (bool): true
defaultNoteFileExtension (QString): md
disableAutomaticUpdateDialog (bool): true
disableSavedSearchesAutoCompletion (bool): false
dockWasInitializedOnce (QString): true
enableSocketServer (bool): true
externalEditorPath (QString): empty
fullyHighlightedBlockquotes (bool): false
gitCommitInterval (int): 30
gitExecutablePath (QString): empty
gitLogCommand (QString): empty
guiFirstRunInit (bool): true
ignoreAllExternalModifications (bool): false
ignoreAllExternalNoteFolderChanges (bool): false
ignoreNoteSubFolders (QString): ^\.
imageScaleDown (bool): false
imageScaleDownMaximumHeight (int): 1024
imageScaleDownMaximumWidth (int): 1024
insertTimeFormat (QString): empty
interfaceFontSize (int): 11
interfaceLanguage (QString): empty
internalIconTheme (bool): false
itemHeight (int): 19
legacyLinking (bool): false
localTrash/autoCleanupDays (int): 30
localTrash/autoCleanupEnabled (bool): true
localTrash/supportEnabled (bool): true
markdownHighlightingEnabled (bool): true
navigationPanelHideSearch (bool): false
networking/ignoreSSLErrors (bool): false
networking/proxyType (int): 2
newNoteAskHeadline (bool): false
noteEditIsCentralWidget (bool): true
noteListPreview (bool): false
noteSaveIntervalTime (int): 10
noteSubfoldersPanelDisplayAsFullTree (bool): true
noteSubfoldersPanelHideSearch (bool): false
noteSubfoldersPanelOrder (int): 0
noteSubfoldersPanelShowFullPath (bool): false
noteSubfoldersPanelShowNotesRecursively (bool): false
noteSubfoldersPanelShowRootFolderName (bool): true
noteSubfoldersPanelSort (int): 0
notesPanelOrder (int): 0
notesPanelSort (int): 1
notesPath (QString): /home/radu/pCloudDrive/Documents/Notes
notifyAllExternalModifications (bool): false
overrideInterfaceFontSize (bool): false
ownCloud/supportEnabled (bool): false
ownCloud/todoCalendarBackend (int): 3
ownCloud/todoCalendarCalDAVPassword (QString): <hidden>
ownCloud/todoCalendarCalDAVServerUrl (QString): empty
ownCloud/todoCalendarCalDAVUsername (QString): empty
ownCloud/todoCalendarCloudConnectionId (int): 1
ownCloud/todoCalendarDisplayNameList (QStringList): empty
ownCloud/todoCalendarEnabledList (QStringList): empty
ownCloud/todoCalendarEnabledUrlList (QStringList): empty
ownCloud/todoCalendarUrlList (QStringList): empty
ownCloudInfo/appIsValid (bool): false
ownCloudInfo/connectionErrorMessage (QString): empty
ownCloudInfo/notesPathExistsText (QString): empty
ownCloudInfo/serverVersion (QString): empty
previousWorkspace (QString): a427baee-e7ae-4766-b7f1-d5396576abb6
restoreCursorPosition (bool): true
savedSearches/noteFolder-1 (QStringList): Custom Events — Vue.js, Note 2018-05-29T09.40.02
showMenuBar (bool): false
showStatusBar (bool): true
systemIconTheme (bool): false
taggingShowNotesRecursively (bool): false
tagsPanelHideSearch (bool): false
tagsPanelOrder (int): 0
tagsPanelSort (int): 0
toolbar/1/items (QStringList): action_New_note, action_Find_note, action_Remove_note, action_Open_note_in_external_editor, actionShow_local_trash, 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): main toolbar
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): formatting toolbar
toolbar/3/items (QStringList): actionInsert_Link_to_note, actionInsert_image, actionInsert_current_time
toolbar/3/name (QString): insertingToolbar
toolbar/3/title (QString): inserting toolbar
toolbar/4/items (QStringList): action_Encrypt_note, actionEdit_encrypted_note, actionDecrypt_note
toolbar/4/name (QString): encryptionToolbar
toolbar/4/title (QString): encryption toolbar
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): window toolbar
toolbar/6/items (QStringList): action_Quit
toolbar/6/name (QString): quitToolbar
toolbar/6/title (QString): quit toolbar
toolbar/size (int): 6
useUNIXNewline (bool): false
webSocketServerService/bookmarksNoteName (QString): Bookmarks
webSocketServerService/bookmarksTag (QString): bookmarks
webSocketServerService/port (int): 22222
workspace-4ecbab0c-b296-47e0-8338-3d24d947af06/name (QString): full
workspace-4ecbab0c-b296-47e0-8338-3d24d947af06/noteSubFolderDockWidgetVisible (bool): true
workspace-4ecbab0c-b296-47e0-8338-3d24d947af06/windowState (QByteArray): <binary data>
workspace-a427baee-e7ae-4766-b7f1-d5396576abb6/name (QString): minimal
workspace-a427baee-e7ae-4766-b7f1-d5396576abb6/noteSubFolderDockWidgetVisible (QString): true
workspace-a427baee-e7ae-4766-b7f1-d5396576abb6/windowState (QByteArray): <binary data>
workspaces (QStringList): 4ecbab0c-b296-47e0-8338-3d24d947af06, a427baee-e7ae-4766-b7f1-d5396576abb6

System environment

LC_PAPER: en_GB.UTF-8
XDG_VTNR: 7
QT_SELECT: snappy-qt5
LC_ADDRESS: en_GB.UTF-8
XDG_SESSION_ID: c2
GST_PLUGIN_SCANNER: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/gstreamer1.0/gstreamer-1.0/gst-plugin-scanner
XLOCALEDIR: /snap/qownnotes/3023/usr/share/X11/locale
CLUTTER_IM_MODULE: xim
XDG_GREETER_DATA_DIR: /var/lib/lightdm-data/radu
LC_MONETARY: en_GB.UTF-8
XDG_DATA_HOME: /home/radu/snap/qownnotes/3023/.local/share
LIBVA_DRIVERS_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/dri
GIO_LAUNCHED_DESKTOP_FILE_PID: 5317
SESSION: ubuntu
GDK_PIXBUF_MODULEDIR: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders
GPG_AGENT_INFO: /home/radu/.gnupg/S.gpg-agent:0:1
QTWEBENGINEPROCESS_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/qt5/libexec/QtWebEngineProcess
QML2_IMPORT_PATH: /snap/qownnotes/3023/lib/x86_64-linux-gnu
SHELL: /bin/bash
SNAP_USER_COMMON: /home/radu/snap/qownnotes/common
BAMF_DESKTOP_FILE_HINT: /var/lib/snapd/desktop/applications/qownnotes_QOwnNotes.desktop
SNAP_CONTEXT: jKw688RJKgMH1BwcddbTJ4jKDsB7t3TWh0MnVCwK55s8
TMPDIR: /tmp
QT_LINUX_ACCESSIBILITY_ALWAYS_ON: 1
LC_NUMERIC: en_GB.UTF-8
UPSTART_SESSION: unix:abstract=/com/ubuntu/upstart-session/1000/2870
GNOME_KEYRING_CONTROL: empty
GIO_MODULE_DIR: /home/radu/snap/qownnotes/common/.cache/gio-modules
GTK_MODULES: gail:atk-bridge:unity-gtk-module
PULSE_SERVER: unix:/run/user/1000/snap.qownnotes/../pulse/native
LOCPATH: /snap/qownnotes/3023/usr/lib/locale
SNAP_REEXEC: empty
USER: radu
FONTCONFIG_FILE: /snap/qownnotes/3023/etc/fonts/fonts.conf
GST_PLUGIN_SYSTEM_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/gstreamer-1.0
LIBGL_DRIVERS_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/dri
QT_ACCESSIBILITY: 1
LC_TELEPHONE: en_GB.UTF-8
LD_LIBRARY_PATH: /var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void::/snap/qownnotes/3023/lib:/snap/qownnotes/3023/usr/lib:/snap/qownnotes/3023/lib/x86_64-linux-gnu:/snap/qownnotes/3023/usr/lib/x86_64-linux-gnu:/snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/mesa:/snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/mesa:/snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/mesa-egl:/snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/dri:/var/lib/snapd/lib/gl
XDG_SESSION_PATH: /org/freedesktop/DisplayManager/Session0
UNITY_HAS_3D_SUPPORT: true
XDG_SEAT_PATH: /org/freedesktop/DisplayManager/Seat0
SSH_AUTH_SOCK: /run/user/1000/keyring/ssh
SNAP_LIBRARY_PATH: /var/lib/snapd/lib/gl:/var/lib/snapd/lib/gl32:/var/lib/snapd/void
SNAP_INSTANCE_NAME: qownnotes
DEFAULTS_PATH: /usr/share/gconf/ubuntu.default.path
SNAP_COMMON: /var/snap/qownnotes/common
SNAP_USER_DATA: /home/radu/snap/qownnotes/3023
GIO_LAUNCHED_DESKTOP_FILE: /var/lib/snapd/desktop/applications/qownnotes_QOwnNotes.desktop
XDG_CONFIG_DIRS: /snap/qownnotes/3023/etc/xdg:/etc/xdg/xdg-ubuntu:/usr/share/upstart/xdg:/etc/xdg
SNAP_DATA: /var/snap/qownnotes/3023
UNITY_DEFAULT_PROFILE: unity
FONTCONFIG_PATH: /snap/qownnotes/3023/etc/fonts
PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/qt5/bin:/snap/qownnotes/3023/usr/sbin:/snap/qownnotes/3023/usr/bin:/snap/qownnotes/3023/sbin:/snap/qownnotes/3023/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
DESKTOP_SESSION: ubuntu
QTCHOOSER_NO_GLOBAL_DIR: 1
QT_IM_MODULE: ibus
QT_QPA_PLATFORMTHEME: appmenu-qt5
TEMPDIR: /tmp
LC_IDENTIFICATION: en_GB.UTF-8
GDK_PIXBUF_MODULE_FILE: /home/radu/snap/qownnotes/common/.cache/gdk-pixbuf-loaders.cache
JOB: unity-settings-daemon
PWD: /home/radu
XDG_SESSION_TYPE: x11
XMODIFIERS: @im=ibus
XKB_CONFIG_ROOT: /snap/qownnotes/3023/usr/share/X11/xkb
LANG: en_GB.UTF-8
GNOME_KEYRING_PID: empty
GDM_LANG: en_GB
MANDATORY_PATH: /usr/share/gconf/ubuntu.mandatory.path
LC_MEASUREMENT: en_GB.UTF-8
IM_CONFIG_PHASE: 1
COMPIZ_CONFIG_PROFILE: ubuntu
QT_QPA_PLATFORM: xcb
XCURSOR_PATH: /snap/qownnotes/3023/usr/share/icons
PAPERSIZE: a4
GDMSESSION: ubuntu
GTK2_MODULES: overlay-scrollbar
SESSIONTYPE: gnome-session
SNAP_REVISION: 3023
HOME: /home/radu/snap/qownnotes/3023
SHLVL: 0
XDG_SEAT: seat0
XDG_CONFIG_HOME: /home/radu/snap/qownnotes/3023/.config
SNAP_NAME: qownnotes
LANGUAGE: en_GB:en
DISABLE_WAYLAND: 1
GNOME_DESKTOP_SESSION_ID: this-is-deprecated
QT_PRINTER_MODULE: qtubuntu-print
QTCOMPOSE: /snap/qownnotes/3023/usr/share/X11/locale
SNAP_COOKIE: jKw688RJKgMH1BwcddbTJ4jKDsB7t3TWh0MnVCwK55s8
UPSTART_INSTANCE: empty
GTK_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/gtk-2.0
XDG_CACHE_HOME: /home/radu/snap/qownnotes/common/.cache
UPSTART_EVENTS: xsession started
XDG_SESSION_DESKTOP: ubuntu
LOGNAME: radu
COMPIZ_BIN_PATH: /usr/bin/
XDG_DATA_DIRS: /home/radu/snap/qownnotes/3023/.local/share:/home/radu/snap/qownnotes/3023:/snap/qownnotes/3023/usr/share:/usr/share/ubuntu:/usr/share/gnome:/home/radu/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share:/var/lib/snapd/desktop:/var/lib/snapd/desktop
DBUS_SESSION_BUS_ADDRESS: unix:abstract=/tmp/dbus-FX8NfxfhdU
QT4_IM_MODULE: xim
GST_PLUGIN_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/gstreamer-1.0
SNAP_ARCH: amd64
SNAP_VERSION: 19.10.4
UPSTART_JOB: unity7
INSTANCE: empty
DISPLAY: :0
XDG_RUNTIME_DIR: /run/user/1000/snap.qownnotes
QT_PLUGIN_PATH: /snap/qownnotes/3023/usr/lib/x86_64-linux-gnu/qt5/plugins
SNAP_LAUNCHER_ARCH_TRIPLET: x86_64-linux-gnu
SNAP: /snap/qownnotes/3023
XDG_CURRENT_DESKTOP: Unity
GTK_IM_MODULE: ibus
LC_TIME: en_GB.utf8
SNAP_INSTANCE_KEY: empty
LC_NAME: en_GB.UTF-8
XAUTHORITY: /home/radu/.Xauthority

@pbek
Copy link
Owner

pbek commented Oct 10, 2019

isUseGit: yes

You have git support turned on for your note folder, do you have git installed?

@marisradu
Copy link
Author

Yes, git is installed. I even set-up the git path manually and getting the same error but with the new path, so the issue seems to come from the "init" command, but the log does not reveal the actual return from "git init", that might help.

BTW: If I go the the terminal and run "git init" in the note folder, everything works as expected:

$ git init
Initialized empty Git repository in /home/radu/pCloudDrive/Documents/Notes/.git/

but still getting the warnings, guessing it's trying to run "git init" in another folder ?

@pbek
Copy link
Owner

pbek commented Oct 10, 2019

What happens if you remove the .git folder in your note folder?
Or maybe there is some AppArmor problem that is preventing the execution of git from inside the snap.

@marisradu
Copy link
Author

marisradu commented Oct 10, 2019

Extra tests:

  • manually git init in folder
  • same warning
  • re-open QOwnNotes (hoping it's not stuck in state, tries git status at init and moves forward)
  • same warning

Another as requested by @pbek :

  • remove .git folder
  • same warning
  • re-open QOwnNotes
  • same warning

@pbek
Copy link
Owner

pbek commented Oct 11, 2019

I've the same issue when running QOwnNotes as a snap. It really seems you cannot execute commands outside your home folder. (see https://forum.snapcraft.io/t/how-do-i-run-bash-commands-from-a-go-program-inside-a-snap/12686/2)

You could experiment by creating a symlink of /usr/bin/git to your home folder and setting the git path to it in the QON settings.

@pbek pbek changed the title Every 30s I'm getting a warning: "Command '\"git\" init' failed" Every 30s I'm getting a warning: "Command '\"git\" init' failed" when run as snap Oct 11, 2019
@pbek
Copy link
Owner

pbek commented Dec 31, 2020

I will close this issue until there is more information.

@pbek pbek closed this as completed Dec 31, 2020
@lwinkler
Copy link

I had the same issue this morning, also with QOwnNotes installed via snap on Ubuntu. Creating a symlink did not help.

[08:37:03] [warning] "Command 'git' (" ("init") ) failed
[08:37:33] [warning] "Command 'git' (" ("init") ) failed
[08:38:03] [warning] "Command 'git' (" ("init") ) failed
[08:38:43] [warning] "Command '/home/lwinkler/scripts/git' (" ("init") ) failed
[08:39:13] [warning] "Command '/home/lwinkler/scripts/git' (" ("init") ) failed

@pbek
Copy link
Owner

pbek commented Jan 18, 2024

Hm, I wonder if there is a good way in snaps to allow that...

@lwinkler
Copy link

Thanks for taking the time to reply. I compiled QOwnNotes from sources and it worked so the problem is indeed linked with snap.
There may be some comments on this page that may help: https://forum.snapcraft.io/t/using-git-from-a-program/12599/11

Other than this the warning in my previous post contained a lot of suspicious "(". I wondered if it is significant.

@pbek
Copy link
Owner

pbek commented Jan 18, 2024

You simply could have tried the AppImage, which also has no confinement. 😉
I just recently spend 2 weeks and like 70 commits to get the Snaps from Core18 to 20 and then 22. 😬
Why are there never such issues with Flatpak...

I'm also not sure what's the ( is about. But it works without confinement...

pbek added a commit that referenced this issue Jan 18, 2024
@pbek pbek reopened this Jan 18, 2024
@pbek
Copy link
Owner

pbek commented Jan 18, 2024

@lwinkler, if the snap build process runs through, there might be a new release you can test on the snap "edge" channel within an hour or so.

@pbek
Copy link
Owner

pbek commented Jan 20, 2024

Anyone?

pbek added a commit that referenced this issue Jan 20, 2024
pbek added a commit that referenced this issue Jan 20, 2024
@pbek
Copy link
Owner

pbek commented Jan 20, 2024

Ok, I think I finally got everything in that git needs in a snap.

pbek added a commit that referenced this issue Jan 20, 2024
@lwinkler
Copy link

Hi. Sorry for the delayed reply.

I did manage to install version 24.1.5

channels: latest/stable: 24.1.4 2024-01-18 (11128) 146MB - latest/candidate: ↑ latest/beta: ↑ latest/edge: 24.1.5 2024-01-22 (11146) 153MB - installed: 24.1.5 (11146) 153MB -

I created a new note folder but I still have notifications that git init failed. The log error message says:

[09:23:52] [warning] "Command '/usr/bin/git' (" ("init") ) failed

@pbek
Copy link
Owner

pbek commented Jan 22, 2024

That's strange. I was getting the error before I started to work on it on Ubuntu 23.10. And after I worked through all the issues, there was no error (because there were multiple after "git" was enabled after the first commit) everything worked fine, and the notes were committed.

@pbek
Copy link
Owner

pbek commented Jan 22, 2024

Can you maybe try to remove the snap first and then installing it again? I did that once in the process. Maybe it's a snap issue (again).

@lwinkler
Copy link

OK. Now I managed to get it to work. There is a small matter though. In the setting the "path to git executable" must remain empty (using default git exe). Otherwise if I set it to "/bin/git" for example, I get the the error message again.

Tested on Ubuntu 22.04.

Thanks a ton for the amazing reaction time.

@pbek
Copy link
Owner

pbek commented Jan 22, 2024

Yes, of course. The path it needs points inside the snap, since it can't execute things outside of it.

GIT_EXEC_PATH: $SNAP/usr/lib/git-core
GIT_TEMPLATE_DIR: $SNAP/usr/share/git-core/templates
GIT_AUTHOR_NAME: "QOwnNotes"
GIT_AUTHOR_EMAIL: "snap@qownnotes.git"
GIT_COMMITTER_NAME: "QOwnNotes"
GIT_COMMITTER_EMAIL: "snap@qownnotes.git"
EMAIL: "snap@qownnotes.git"

...is taking care of everything. Took a while to reverse-engineere all of it.

@lwinkler
Copy link

Thanks again.

Just for clarity: for anyone having this issue: if QOwnNotes in installed from snap, the "git executable" field should be left blank.

@pbek
Copy link
Owner

pbek commented Jan 23, 2024

Yes, or you enter the correct path. 😁 I'm on NixOS. If I'd enter /bin/git I'd have the same issue. 😆

@pbek pbek added this to the 24.1.5 milestone Jan 30, 2024
@pbek
Copy link
Owner

pbek commented Jan 30, 2024

24.1.5

  • the Snap version of QOwnNotes is now able to use git

There now is a new release, could you please test it and report if it works for you?

@pbek pbek closed this as completed Feb 4, 2024
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

3 participants