[Bug]: Repeated notification that "Everything is up to date" and high CPU usage, even when plugin disabled
izosozi opened this issue · 1 comments
Describe the bug
Setting sync timing to 0 caused indefinite, repeated "Everything is up to date" notifications (indicating an infinite loop of git pull commands?), using lots of CPU, even though the plugin shouldn't be doing anything at all.
I unfortunately can't trace back the exact steps that led to this, but here's the basic context. I'll add to this in case I get it to happen again.
Relevant errors (if available) from notifications or console (CTRL+SHIFT+I
)
{
"settings": {
"commitMessage": "obsidian-git manual vault backup: {{date}}",
"commitDateFormat": "YYYY-MM-DD HH:mm:ss",
"autoSaveInterval": 0,
"autoPushInterval": 0,
"autoPullInterval": 0,
"autoPullOnBoot": true,
"disablePush": false,
"pullBeforePush": true,
"disablePopups": false,
"disablePopupsForNoChanges": false,
"listChangedFilesInMessageBody": false,
"showStatusBar": true,
"updateSubmodules": false,
"syncMethod": "merge",
"customMessageOnAutoBackup": false,
"autoBackupAfterFileChange": true,
"treeStructure": false,
"refreshSourceControl": true,
"basePath": "",
"differentIntervalCommitAndPush": false,
"changedFilesInStatusBar": false,
"showedMobileNotice": true,
"refreshSourceControlTimer": 5000,
"showBranchStatusBar": true,
"setLastSaveToLastCommit": false,
"submoduleRecurseCheckout": false,
"gitDir": "",
"showFileMenu": true,
"authorInHistoryView": "hide",
"dateInHistoryView": false,
"lineAuthor": {
"show": false,
"followMovement": "inactive",
"authorDisplay": "full",
"showCommitHash": false,
"dateTimeFormatOptions": "date",
"dateTimeFormatCustomString": "YYYY-MM-DD HH:mm",
"dateTimeTimezone": "viewer-local",
"coloringMaxAge": "1y",
"colorNew": {
"r": 255,
"g": 150,
"b": 150
},
"colorOld": {
"r": 120,
"g": 160,
"b": 255
},
"textColorCss": "var(--text-muted)",
"ignoreWhitespace": false,
"gutterSpacingFallbackLength": 18,
"lastShownAuthorDisplay": "full",
"lastShownDateTimeFormatOptions": "date"
},
"autoCommitMessage": "obsidian-git automatic vault backup: {{date}}"
},
"pluginVersion": "2.28.2"
}
Steps to reproduce
These steps alone will likely not reproduce the bug, but it was at least the direct trigger.
- obsidian-git was configured and running properly, automatically committing and syncing with a remote as expected
- I changed the commit-and-sync time to 0 and the auto-push time to 0, auto-pull was greyed out.
Expected Behavior
Expected: This would disable any git commands and the plugin should remain idle.
Actual: Git commits and pushes seemed to stop, but "Everything is up to date" notifications begin spawning around 2x per second indefinitely. My CPU usage spiked and caused high temps.
I clicked "Disable on this device" in the obsidian-git settings, but this didn't stop the notifications until I quit Obsidian (this part I expected, since it does tell you to restart Obsidian at that point).
Additional context
The reason I set the auto time settings to 0 was to stop any git interactions with the remote repo without having to restart Obsidian. This was in order to wipe the remote and local repo clean during the process of troubleshooting a similar issue in the iOS app, in which repeated "buffer error" notifs appear at a high rate; this might be related or an indirect cause.
System:
- M3 Macbook Air
- macOS Sequoia 15.1.1
Software:
- Obsidian macOS app 1.7.7
- Remote repo on a Gitea instance
.gitignore:
.obsidian/plugins/
Obsidian Vault contents
.
├── .git
├── .gitignore
├── .obsidian
│ ├── app.json
│ ├── appearance.json
│ ├── community-plugins.json
│ ├── core-plugins.json
│ ├── graph.json
│ ├── plugins
│ │ ├── github-embeds
│ │ ├── obsidian-excalidraw-plugin
│ │ ├── obsidian-git
│ │ ├── obsidian-minimal-settings
│ │ ├── obsidian-style-settings
│ │ └── system3-relay
│ ├── themes
│ │ ├── Encore
│ │ ├── GitHub Theme
│ │ ├── Minimal
│ │ ├── Terminal
│ │ └── Transparent
│ ├── types.json
│ └── workspace.json
└── Untitled.md
Operating system
macOS
Installation Method
None
Plugin version
2.28.2
EDIT 2024-11-23:
The problem hasn't happened again after these steps:
- Wiped the local repository and git init a new one
- Changed the .gitignore to
**/.obsidian/
(.obsidian
didn't seem to work for the iOS path structure and the.obsidian/plugins/
folder didn't contain the obsidian-git settings I originally wanted to exclude anyway) - Pushed to a blank remote repo
- Changed from merge to rebase in the plugin settings
- Reenabled the plugin features one by one on both macOS and iOS
My guess is the pull attempts were affecting the settings for the plugin since they weren't properly excluded in my first .gitignore, which prevented the new value of the auto pull setting from being saved. I know nothing about the codebase so, take that with a grain of salt.
Thanks for the detailed issue report. Should be fixed now in 2.29.0.