Vinzent03 / obsidian-git

Integrate Git version control with automatic backup and other advanced features in Obsidian.md
MIT License
6.78k stars 289 forks source link

[Bug]: Nothing Happens on Git Clone #435

Open ethanimproving opened 1 year ago

ethanimproving commented 1 year ago

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

intrepidsilence commented 1 year ago

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

opticoder commented 1 year ago

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 commented 1 year ago

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

maakbaas commented 1 year ago

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

mayukhc commented 1 year ago

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 ?

gBonvenuto commented 1 year ago

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.

conmute commented 1 year ago

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

gBonvenuto commented 1 year ago

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 commented 1 year ago

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
fscheu commented 1 year ago

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

jorgegomzar commented 1 year ago

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?

g1ronn1mo commented 1 year ago

The answer worked for me.

Tanks.

skakdollar commented 15 hours ago

4. Open the command pallet and type "edit remotes" and select the appropriate command

Edit remotes does not open on the latest version of Obsidian and Git plugin. Pull does not work either.