Vinzent03 / obsidian-git

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

[Bug]: Obsidian closes during initial clone #694

Open mannidung opened 5 months ago

mannidung commented 5 months ago

Describe the bug

When I try to perform an initial clone on my Pixel 7 using Android 14, the initial clone causes Obsidian to crash. After the crash, obsidian-git has disappeared and needs to be installed again.

Relevant errors (if available) from notifications or console (CTRL+SHIFT+I)

No response

Steps to reproduce

  1. Make sure to have a git repository available on e.g. github.
  2. Create an empty vault using Obsidian 1.4.16 on Android 14
  3. Install obsidian-git 2.23.2 plugin and enable it.
  4. Clone the remote repo:
    • choose to put it in the vault root
    • Select "YES" at "does your remote repo contain a .obisidan directory"
    • Select "DELETE ALL YOUR LOCAL CONFIG AND PLUGINS"
    • Leave "depth of clone" empty for full clone, press enter
    • Cloning starts, after about 5-10 seconds, obsidian closes
  5. Restart obsidian - clone did not succeed and obsidian-git is no longer available.

Expected Behavior

Obsidian should not crash and clone finishes successfully.

Addition context

This error did not happen with Android 13.

I have not been able to retrieve any errors from the console. Please provide instructions on how to extract log output on mobile, and I can provide them.

Operating system

Android

Installation Method

None

Plugin version

2.23.2

benjaminv commented 4 months ago

I am having this too after making a relatively large number (64 commits, involving 200 files) of commits on PC. No longer able to do any git command on mobile devices now, including a Galaxy Tab 8 running Android 11 and iOS 17. Feeling this maybe related and useful however not sure how may I edit .git/config file on mobile.

Plugin version

2.24.0

Device OS

iOS 17, Android 11

benjaminv commented 4 months ago

since this in README, I guess there is very little can we do to fix this.

Mobile
The git implementation on mobile is very unstable!

Restrictions
I am using [isomorphic-git](https://isomorphic-git.org/), which is a re-implementation of Git in JavaScript, because you cannot use native Git on Android or iOS.

SSH authentication is not supported (https://github.com/isomorphic-git/isomorphic-git/issues/231)
Repo size is limited, because of memory restrictions
Rebase merge strategy is not supported
Submodules are not supported
iostreamrain commented 2 months ago

same issue

vertoker commented 2 months ago

I have same issue and Obsidian crashes with out of memory exception

Screenshot_2024-05-18-17-39-58-117_com.miui.bugreport-edit.jpg

ArneNostitz commented 1 month ago

same happens to me on initial sync of a vault with just a few 100 files. this is the last notification before crashing

IMG_5860

Silventino commented 1 month ago

Like @vertoker said, the problem seems to be memory usage to clone the repository. An easy workaround (at least for android) is to make the initial clone yourself. One option is to:

  1. Clone the repo in a PC and zip it;
  2. Send it to your phone and unzip it where you want your vault to be;
  3. Open the folder as a vault;
  4. Configure the git plugin (username, password, author, email).

Downloading the .zip directly from github will not work, because it will not download the .git folder.

uni-vinay-p commented 1 week ago

@Silventino this won't work as the sync strategy on PC is via ssh