Error while pulling or pushing
romixch opened this issue · comments
First of all: Thank you very much for creating this great peace of software. I really love Gitnuro!
Describe the bug
I now cannot pull or push anything since the version 1.3.0. When I go back to 1.2.1 it works again. I get following Stacktrace in the console:
2023-09-29 22:32:24 INFO slf4j:8 - TabViewModel - Trying to open repository /home/roman/development/Apptiva/Leoba/leoba-app
2023-09-29 22:32:25 INFO slf4j:8 - SharedRepositoryStateMa - Refreshing repository state com.jetpackduba.gitnuro.git.rebase.RebaseInteractiveState$None@6ada0bd3
Public key auth
Status is Success
Running command git-upload-pack 'apptivateam/leoba-app.git'
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Fatal("Socket error: disconnected")', src/ssh.rs:80:32
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
org.eclipse.jgit.api.errors.TransportException: git@bitbucket.org:apptivateam/leoba-app.git: remote hung up unexpectedly
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:249)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:266)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2$1.invokeSuspend(PullBranchUseCase.kt:29)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2$1.invoke(PullBranchUseCase.kt)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2$1.invoke(PullBranchUseCase.kt)
at com.jetpackduba.gitnuro.git.remote_operations.HandleTransportUseCase.invoke(HandleTransportUseCase.kt:40)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2.invokeSuspend(PullBranchUseCase.kt:23)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2.invoke(PullBranchUseCase.kt)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2.invoke(PullBranchUseCase.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase.invoke(PullBranchUseCase.kt:16)
at com.jetpackduba.gitnuro.viewmodels.MenuViewModel$pull$1.invokeSuspend(MenuViewModel.kt:35)
at com.jetpackduba.gitnuro.viewmodels.MenuViewModel$pull$1.invoke(MenuViewModel.kt)
at com.jetpackduba.gitnuro.viewmodels.MenuViewModel$pull$1.invoke(MenuViewModel.kt)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1$2.invokeSuspend(TabState.kt:138)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1$2.invoke(TabState.kt)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1$2.invoke(TabState.kt)
at com.jetpackduba.gitnuro.extensions.StateManagementUtilsKt.delayedStateChange(StateManagementUtils.kt:21)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1.invokeSuspend(TabState.kt:126)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: org.eclipse.jgit.errors.TransportException: git@bitbucket.org:apptivateam/leoba-app.git: remote hung up unexpectedly
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:311)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:152)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:153)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:105)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1465)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:238)
... 28 more
Caused by: uniffi.gitnuro.InternalException: called `Result::unwrap()` on an `Err` value: Fatal("Socket error: disconnected")
at uniffi.gitnuro.GitnuroKt.checkCallStatus(gitnuro.kt:238)
at uniffi.gitnuro.GitnuroKt.access$checkCallStatus(gitnuro.kt:1)
at uniffi.gitnuro.Channel.openSession(gitnuro.kt:1563)
at com.jetpackduba.gitnuro.ssh.libssh.ChannelWrapper.openSession(ChannelWrapper.kt:17)
at com.jetpackduba.gitnuro.credentials.SshProcess.setup(SshProcess.kt:65)
at com.jetpackduba.gitnuro.credentials.SshRemoteSession.exec(SshRemoteSession.kt:25)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:294)
... 33 more
2023-09-29 22:32:31 ERROR slf4j:16 - TabState - git@bitbucket.org:apptivateam/leoba-app.git: remote hung up unexpectedly
org.eclipse.jgit.api.errors.TransportException: git@bitbucket.org:apptivateam/leoba-app.git: remote hung up unexpectedly
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:249)
at org.eclipse.jgit.api.PullCommand.call(PullCommand.java:266)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2$1.invokeSuspend(PullBranchUseCase.kt:29)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2$1.invoke(PullBranchUseCase.kt)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2$1.invoke(PullBranchUseCase.kt)
at com.jetpackduba.gitnuro.git.remote_operations.HandleTransportUseCase.invoke(HandleTransportUseCase.kt:40)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2.invokeSuspend(PullBranchUseCase.kt:23)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2.invoke(PullBranchUseCase.kt)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase$invoke$2.invoke(PullBranchUseCase.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.jetpackduba.gitnuro.git.remote_operations.PullBranchUseCase.invoke(PullBranchUseCase.kt:16)
at com.jetpackduba.gitnuro.viewmodels.MenuViewModel$pull$1.invokeSuspend(MenuViewModel.kt:35)
at com.jetpackduba.gitnuro.viewmodels.MenuViewModel$pull$1.invoke(MenuViewModel.kt)
at com.jetpackduba.gitnuro.viewmodels.MenuViewModel$pull$1.invoke(MenuViewModel.kt)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1$2.invokeSuspend(TabState.kt:138)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1$2.invoke(TabState.kt)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1$2.invoke(TabState.kt)
at com.jetpackduba.gitnuro.extensions.StateManagementUtilsKt.delayedStateChange(StateManagementUtils.kt:21)
at com.jetpackduba.gitnuro.git.TabState$safeProcessing$job$1.invokeSuspend(TabState.kt:126)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher.run(LimitedDispatcher.kt:42)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:95)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Caused by: org.eclipse.jgit.errors.TransportException: git@bitbucket.org:apptivateam/leoba-app.git: remote hung up unexpectedly
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:311)
at org.eclipse.jgit.transport.TransportGitSsh.openFetch(TransportGitSsh.java:152)
at org.eclipse.jgit.transport.FetchProcess.executeImp(FetchProcess.java:153)
at org.eclipse.jgit.transport.FetchProcess.execute(FetchProcess.java:105)
at org.eclipse.jgit.transport.Transport.fetch(Transport.java:1465)
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:238)
... 28 more
Caused by: uniffi.gitnuro.InternalException: called `Result::unwrap()` on an `Err` value: Fatal("Socket error: disconnected")
at uniffi.gitnuro.GitnuroKt.checkCallStatus(gitnuro.kt:238)
at uniffi.gitnuro.GitnuroKt.access$checkCallStatus(gitnuro.kt:1)
at uniffi.gitnuro.Channel.openSession(gitnuro.kt:1563)
at com.jetpackduba.gitnuro.ssh.libssh.ChannelWrapper.openSession(ChannelWrapper.kt:17)
at com.jetpackduba.gitnuro.credentials.SshProcess.setup(SshProcess.kt:65)
at com.jetpackduba.gitnuro.credentials.SshRemoteSession.exec(SshRemoteSession.kt:25)
at org.eclipse.jgit.transport.TransportGitSsh$SshFetchConnection.<init>(TransportGitSsh.java:294)
... 33 more
To Reproduce
Open a repo and try to pull or push from the remote.
I tried it with bitbucket repos and it may have to do with my ssh config. So here it is:
Host git.cloudbees.com
Hostname git.cloudbees.com
User git
IdentityFile ~/.ssh/id_gmail_rsa
Host github.com
Hostname github.com
User git
IdentityFile ~/.ssh/id_gmail_rsa
Host bitbucket.org
Hostname bitbucket.org
User git
IdentityFile ~/.ssh/id_gmail_rsa
Expected behavior
I would expect to be able to pull and push exactly as it works when I run git pull
in my terminal.
Desktop (please complete the following information):
- OS: Manjaro Linux
- Version 1.3.0 from Flathub
Let me know if I can provide some more information or test something.
Hey, thanks for the detailed report 😄
I've been able to reproduce it but I'm not sure why does this happen. Next week I'll be away for vacations, once I'm back this will have the highest priority and fixed in v1.3.1.
Great to hear. I can still use 1.2.1 thanks to flatpak. I wish you a relaxing vacation!
Thank you :)
@romixch Could you please show me the comand to switch to Gitnuro 1.2.1? I used the following command but I got error: Server returned status 404: Not Found
sudo flatpak update --commit=f1b3b73901ceaf74b79f1f0169aa33eb4e36cbe3 com.jetpackduba.Gitnuro
@vt107 I used sudo flatpak update --commit=34b8d34ce9ebc7cac943d42b691207de5bf08d392bc0f0299c4286dd3715e0f6 com.jetpackduba.Gitnuro
@vt107 I used
sudo flatpak update --commit=34b8d34ce9ebc7cac943d42b691207de5bf08d392bc0f0299c4286dd3715e0f6 com.jetpackduba.Gitnuro
I was able to pull push by ssh after downgrading Gitnuro version using this command. Thank a lot
I've found the issue to be related to the vendored version of libssh included by the libssh-rs dependency. I'm opening an issue in their repo to see if we can somehow fix it.
Sorry for the late response. I think I've spent over 50h in this issue but I'm not really sure why it fails when using the built-in build script. I've got a workaround for Linux (and perhaps MacOS, not yet tested) using CMake as build system but that's not an option on Windows, which is quite more problematic unfortunately. I'll try to release it this week.
Thank you very much for looking at it. I just use the version 1.2.1 on Linux for now. So there is no need to hurry from my perspective. But when you release a new version I will surely test it.
The release is out if you want to test it 😸
I tested it and it works perfectly! Thanks again for your efforts!