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

[Bug]: Nothing Happens on Git Clone

Open ethanimproving opened this issue 2 years ago • 12 comments

Describe the bug

When attempting to clone any existing repository, nothing happens. It waits about 3 seconds and then blinks as though it did something, but there are no files.

Relevant errors (if available)

No errors are provided.

Steps to reproduce

  1. Create a new vault
  2. git clone https://github.com/ethanimproving/Personal-Journal.git

Expected Behavior

The repo should be cloned.

Addition context

This happens for both my Pixel 1 and my iPhone 14 Pro. Initially I had a somewhat large repo with images, and got a Buffer error, so I deleted the vault from mobile to clone it fresh, then I encountered this problem. After playing around, I decided to create a brand new repo with only 1 md file and no images, and still Obsidian Git is not able to clone it.

Operating system

iOS

Installation Method

Other

Plugin version

2.16.0

ethanimproving avatar Feb 09 '23 02:02 ethanimproving

I am having the same issue. The close starts and then disappears, no files ever being pulled.

intrepidsilence avatar Feb 11 '23 15:02 intrepidsilence

Same problem for my iPad and Android - Obsidian crashes on first pull. On iPad it manages to show git message "Counting objects 150/150", but on Android just crushes

opticoder avatar Feb 16 '23 21:02 opticoder

The workaround is to make initial pull from a terminal app. For Android I used Termux (got idea from https://gist.github.com/Makeshift/43c7ecb3f1c28a623ea4386552712114) to run git pull in /storage/emulated/0/Notes/Main directory. Then obsidian-git is woking fine: able to pull and push by itself. For iPad i used iSH (idea from https://github.com/denolehov/obsidian-git/issues/413#issuecomment-1373783604) and then obsidian-git can make pull, BUT on push the error happens, something like: "Promise.allSettled is not a function". Still looking for workaround

opticoder avatar Feb 17 '23 15:02 opticoder

Same here. iPhone shows 'Initializing clone' for about a minute, and then Obsidian crashes.

maakbaas avatar Feb 20 '23 18:02 maakbaas

Same here on android, clone starts, then app crashes after the last step "Over-write .obsidian folder" .I did initial clone via termux, then obsidian-git can pull okay, but can't push/commit. I can push from termux without issues,so I think its an obsidian-git issue. Is there a way to check the logs of this plugin ?

mayukhc avatar Feb 21 '23 15:02 mayukhc

Has anyone found a workaround that allows push from the obsidian app?

Edit: I just found a solution, download an old version of Obsidian Git and install it manually (I chose one at random, so I don't know which version has caused the trouble). Then clone your repo and install the old verion of Obsidian Git inside it.

gBonvenuto avatar Mar 15 '23 21:03 gBonvenuto

I am experiencing the same issue, @KubGames how did you downloaded and installed older obsidian git for mobile app?

conmute avatar Mar 16 '23 16:03 conmute

I am experiencing the same issue, @KubGames how did you downloaded and installed older obsidian git for mobile app?

Go to releases and download the zip of an old version , It will be called "obsidian-git...zip" (I don't remember which I installed, so it's try and error until you find one that works). Extract it inside .obsidian/plugins and reload Obsidian.

gBonvenuto avatar Mar 16 '23 16:03 gBonvenuto

Out of curiosity I tried another method that worked even better.

  1. Connect your mobile to your computer with a usb cable and transfer your vault to it.
  2. Open your vault in your mobile obsidian app
  3. Obsidian-git will try to pull, but it will fail since your computer was using ssh (or another method)
  4. Open the command pallet and type "edit remotes" and select the appropriate command
  5. Select origin (or master) and replace the url with the http of your repository
  6. Go to the Obsidian-Git settings and put your username (it's probably already there) and your token
  7. Try to pull and see if it works

gBonvenuto avatar Mar 16 '23 16:03 gBonvenuto

Same issue here. I've used the workaround proposed by @gBonvenuto and it worked. Thank You!

fscheu avatar Apr 11 '23 13:04 fscheu

Could it be that the reason for this bug is the repo size? I know regular git can increase the buffer size, is there a way to do it for the js implementation?

jorgegomzar avatar Sep 17 '23 19:09 jorgegomzar

The answer worked for me.

Tanks.

g1ronn1mo avatar Oct 21 '23 08:10 g1ronn1mo