obsidian-git icon indicating copy to clipboard operation
obsidian-git copied to clipboard

[Bug]: Auto commit and push stops working nearly everyday

Open Samuelodan opened this issue 2 years ago • 8 comments

Describe the bug

I often notice that there has been no update from the plugin for a while and I see that its last Git update was hours ago. So I have to disable and enable the plugin for to resume normal operation. This wasn't the case when I initially installed the plugin but it's been happening for a few months now.

I have included the error I found from the logs. The screenshot below shows the error go away after toggling the disable plugin button and the app proceeds to commit and push changes I made over 24 hours ago. I hope this is descriptive enough. Thanks. Screenshot 2023-03-13 at 03 40 38

Relevant errors (if available)

git obsidian error: Connection reset by 140.82.121.4 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

VM148 plugin:obsidian-git:23985 Uncaught (in promise) Error: Connection reset by 140.82.121.4 port 22
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

    at Object.action (plugin:obsidian-git:23985:25)
    at PluginStore.exec (plugin:obsidian-git:24010:25)
    at eval (plugin:obsidian-git:21571:43)
    at new Promise (<anonymous>)
    at GitExecutorChain.handleTaskData (plugin:obsidian-git:21569:16)
    at GitExecutorChain.eval (plugin:obsidian-git:21553:44)
    at Generator.next (<anonymous>)
    at fulfilled (plugin:obsidian-git:20402:24)

Steps to reproduce

It just happens.

Expected Behavior

I expect it to work consistently to back up changes.

Addition context

No response

Operating system

macOS

Installation Method

None

Plugin version

2.17.4

Samuelodan avatar Mar 13 '23 02:03 Samuelodan

Please try some answers here

Vinzent03 avatar Mar 13 '23 13:03 Vinzent03

Hi, thanks for responding. I can connect to GitHub just fine. I constantly push code to GitHub; plus I tried ssh -T [email protected] according to one of the answers there and it worked fine. This issue happens only with Obsidian Git.

Samuelodan avatar Mar 13 '23 15:03 Samuelodan

Have the same issue on multiple macs. Started happening with the latest version. It is constantly committing 0 files. The issue is only with the auto-commit/push. Manual still works fine.

Wit4r7 avatar Mar 19 '23 09:03 Wit4r7

@Wit4r7 So your issue is not authentication when pushing, but committing of zero files? Then this is probably a different issue. Is just the notification wrong or do you really have empty commits, which I really doubt, because git doesn't allow that by default.

Vinzent03 avatar Mar 19 '23 10:03 Vinzent03

@Vinzent03 Yeah it is committing zero files. I downgraded and updated again. Currently, I'm unable to reproduce the error, but I'm also not on my main pc. If the error occurs again, I will create a new ticket and provide additional information.

Wit4r7 avatar Mar 19 '23 18:03 Wit4r7

Have the same issue on multiple macs. Started happening with the latest version. It is constantly committing 0 files. The issue is only with the auto-commit/push. Manual still works fine.

Interesting. I noticed it also happens after the laptop has been put to sleep for a while. The file changes counter remains at zero and it says the last Git update was a while ago (it just happened some mins ago and last Git update was 19 hours ago). It's like it stopped checking for changes and didn't resume even after the laptop was woken.

Samuelodan avatar Mar 19 '23 23:03 Samuelodan

I've also encountered this issue, it stops syncing after the laptop has returned from sleep. I'm forced to reload the plugin in order to get it to work again.

The "List changed files" shows the correct number of changed files.

image

NicklasWallgren avatar Jul 19 '23 08:07 NicklasWallgren

I think it's due to the PromiseQueue which stop processing tasks if the queue is larger than one, due to race condition.

NicklasWallgren avatar Jul 25 '23 15:07 NicklasWallgren