-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Error: JGitInternalException: Exception caught during execution of merge command
#139
Comments
It looks like your git repo is in a bad state somehow. There are a few things you can do
If you get this issue even after resetting up, please do let me know |
JGitInternalException: Exception caught during execution of merge command
Hey, Thanks for the quick response. The problem is that I always have to reset the repository. After I reset it and then I push something from any other device, then the sync doesn't work. One another problem that I have, is that sometimes after cloning the repository gitsync will delete some the files and then I have to revert from desktop. (I am not sure why this happens tbh...) |
Can you confirm that you still see this in the latest version? |
Could you:
|
So, I did the following steps:
After syncing the changes my files were removed. !-- PROVIDE ERROR REPRO STEPS --> Android Version: 14 (SDK 34) TEST: GITHUB |
Hey, could you take a screen recording of that process just so I can see what it looks like for you?
Also, is it just removing the new files or all files?
Are the changes making it to remote? (Can you see them on github.com?)
Does this happen reliably?
…________________________________
From: Petros Stergioulas ***@***.***>
Sent: Tuesday, January 21, 2025 5:59:22 AM
To: ViscousPot/GitSync ***@***.***>
Cc: ViscousPot ***@***.***>; Assign ***@***.***>
Subject: Re: [ViscousPot/GitSync] Error: `JGitInternalException: Exception caught during execution of merge command` (Issue #139)
So, I did the following steps:
* Removed the repository
* Reinstalled gitsync
* Use github for authentication
* Cloned the repository with a lot of small files
* Sync changes (I didn't even open obsidian in this case)
After syncing the changes my files were removed.
!-- PROVIDE ERROR REPRO STEPS -->
________________________________
Android Version: 14 (SDK 34)
Device Model: samsung SM-S921B
App Version: 1.701 (1701)
TEST: GITHUB
TEST: GITHUB
GithubOAuthFlow: Launching Flow
GithubOAuthFlow: Flow Ended
TEST: GITHUB
GithubAuthCredentials: Auth Token Obtained
GithubAuthCredentials: Getting User Profile
GithubAuthCredentials: Username Retrieved
GithubAuthCredentials: Username and Token Received
TEST: GITHUB
GetRepos: Getting User Repos
GetRepos: Repos Received
CloneRepo: Cloning Repo
TEST: GITHUB
CloneRepo: Operation not permitted
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
ToServiceCommand: Force Sync
Sync: Start Sync
Sync: Start Pull Repo
PullFromRepo: Getting local directory
PullFromRepo: Fetching changes
TEST: GITHUB
PullFromRepo: Closing repository
Sync: Pull Not Required
Sync: Start Push Repo
PushToRepo: Getting local directory
GitStatus: HasUncommittedChanges: true
Missing: []
Modified: []
Removed: [ personal files here]
IgnoredNotInIndex: []
Changed: []
Untracked: [ personal files here ]
Added: []
Conflicting: []
UncommittedChanges: [ personal files here ]
PushToRepo: Adding Files to Stage
PushToRepo: Getting current time
PushToRepo: Committing changes
PushToRepo: Pushing changes
TEST: GITHUB
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: []
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Closing repository
Sync: Push Complete
Sync: Sync Complete
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
—
Reply to this email directly, view it on GitHub<#139 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/BH2KNXBNI2ZBQTYY6PLQOR32LXO3VAVCNFSM6AAAAABVOSE63KVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMBTG4ZTAMJXG4>.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
Hey, yeah sure. I'll do that later this evening. Yeah this happens reliably. |
Hey @ViscousPot, here is a screen recording (https://drive.google.com/file/d/1wfbT4V66YWUTYbLqDQpOmKBG1pXbfggF/view?usp=sharing). Is it maybe the issue that after the clone fails? (maybe not all files are downloaded? 🤔 ) and then when I sync git just thinks they are removed? I'm quite unsure tbh. When I clone the repo I get an error (Operation not permitted), I am not sure why this happens, but if I try to sync manually I can see which files are going to be deleted. I tried to force-pull via the UI function that you provide, but this also fails with Operation not permitted. I am wondering if it is something with my file system, but I don't think since GitSync has all the required permissions + some of the files are already cloned successfully. I can't understand how it determines which files are removed, it is totally random and spread throughout my repository. |
Thanks for the detailed response! I'll keep looking into this and see if I can repro Can you confirm that you have storage space left on your device? I'm seeing online that this is sometimes caused by the app running out of space to clone into |
Yeah I have enough space (around 150gb). The repo is around 150 MB. Sadly I can't make my repo public since it has my obsidian notes and I prefer keeping it private. |
Oh of course! I mean, is there any other repo on your account or otherwise that causes this same issue for you, that you WOULD be willing to make public? Maybe a new repo initialised with readme? |
I tried also some of the of my repositories but it worked without problems. Let's close the issue then, something must be wrong with the repo... If I find out I'll inform you. 😊 |
I'll leave it open so I can revisit it and so that other people with a similar issue can add to the conversation if they like. Thanks for reporting this :) |
Android Version: 14 (SDK 34)
Device Model: samsung SM-S921B
App Version: 1.641 (1641)
TEST: GITHUB
PullFromRepo: Closing repository
Sync: Pull Complete
Sync: Start Push Repo
PushToRepo: Getting local directory
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Pushing changes
TEST: GITHUB
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Closing repository
Sync: Push Not Required
Sync: Sync Complete
AccessibilityService: Application Closed
ToServiceCommand: AccessibilityService Sync
Sync: Start Sync
Sync: Start Pull Repo
PullFromRepo: Getting local directory
PullFromRepo: Fetching changes
TEST: GITHUB
PullFromRepo: Pulling changes
TEST: GITHUB
PullFromRepo: Closing repository
Sync: Pull Complete
Sync: Start Push Repo
PushToRepo: Getting local directory
GitStatus: HasUncommittedChanges: true
Missing: []
Modified: [Quicknote.md]
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: [Quicknote.md]
PushToRepo: Adding Files to Stage
PushToRepo: Getting current time
PushToRepo: Committing changes
PushToRepo: Pushing changes
TEST: GITHUB
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Closing repository
Sync: Push Complete
Sync: Sync Complete
AccessibilityService: Application Opened
ToServiceCommand: AccessibilityService Sync
Sync: Start Sync
Sync: Start Pull Repo
PullFromRepo: Getting local directory
PullFromRepo: Fetching changes
TEST: GITHUB
PullFromRepo: Pulling changes
TEST: GITHUB
PullFromRepo: Closing repository
Sync: Pull Complete
Sync: Start Push Repo
PushToRepo: Getting local directory
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Pushing changes
TEST: GITHUB
AccessibilityService: Application Closed
ToServiceCommand: AccessibilityService Sync
Sync: Sync Scheduled
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Closing repository
Sync: Push Not Required
Sync: Sync Complete
Sync: Scheduled Sync Starting
Sync: Start Sync
Sync: Start Pull Repo
PullFromRepo: Getting local directory
PullFromRepo: Fetching changes
TEST: GITHUB
PullFromRepo: Pulling changes
TEST: GITHUB
PullFromRepo: Closing repository
Sync: Pull Complete
Sync: Start Push Repo
PushToRepo: Getting local directory
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Pushing changes
TEST: GITHUB
GitStatus: HasUncommittedChanges: false
Missing: []
Modified: []
Removed: []
IgnoredNotInIndex: [.obsidian]
Changed: []
Untracked: []
Added: []
Conflicting: []
UncommittedChanges: []
PushToRepo: Closing repository
Sync: Push Not Required
Sync: Sync Complete
TEST: content://com.android.externalstorage.documents/tree/primary%3AVault
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
TEST: content://com.android.externalstorage.documents/tree/primary%3AVault
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
TEST: content://com.android.externalstorage.documents/tree/primary%3AVault
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
TEST: content://com.android.externalstorage.documents/tree/primary%3AVault
RecentCommits: .git folder found
RecentCommits: Recent commits retrieved
AccessibilityService: Application Opened
ToServiceCommand: AccessibilityService Sync
Sync: Start Sync
Sync: Start Pull Repo
PullFromRepo: Getting local directory
PullFromRepo: Fetching changes
TEST: GITHUB
PullFromRepo: Pulling changes
TEST: GITHUB
PullFromRepo: Error: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. java.io.IOException: Operation not permitted
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:413)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:322)
at com.viscouspot.gitsync.util.GitManager.downloadChanges(GitManager.kt:241)
at com.viscouspot.gitsync.GitSyncService$sync$job$1.invokeSuspend(GitSyncService.kt:147)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.io.IOException: Operation not permitted
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:368)
at java.io.File.createTempFile(File.java:2023)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1238)
at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:451)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:396)
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:288)
... 9 more
PullFromRepo: Error: org.eclipse.jgit.api.errors.JGitInternalException: Exception caught during execution of merge command. java.io.IOException: Operation not permitted
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:413)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:322)
at com.viscouspot.gitsync.util.GitManager.downloadChanges(GitManager.kt:241)
at com.viscouspot.gitsync.GitSyncService$sync$job$1.invokeSuspend(GitSyncService.kt:147)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:108)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Caused by: java.io.IOException: Operation not permitted
at java.io.UnixFileSystem.createFileExclusively0(Native Method)
at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:368)
at java.io.File.createTempFile(File.java:2023)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkoutEntry(DirCacheCheckout.java:1238)
at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:451)
at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:396)
at org.eclipse.jgit.api.MergeCommand.call(MergeCommand.java:288)
... 9 more
The text was updated successfully, but these errors were encountered: