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

[Bug]: Obsidian closes during initial clone

Open mannidung opened this issue 1 year ago • 12 comments
trafficstars

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

mannidung avatar Feb 20 '24 09:02 mannidung

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 avatar Mar 05 '24 06:03 benjaminv

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

benjaminv avatar Mar 05 '24 07:03 benjaminv

same issue

iostreamrain avatar May 17 '24 10:05 iostreamrain

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

vertoker avatar May 18 '24 12:05 vertoker

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

ArneNostitz avatar Jun 10 '24 11:06 ArneNostitz

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.

Silventino avatar Jun 14 '24 12:06 Silventino

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

uni-vinay-p avatar Jul 19 '24 13:07 uni-vinay-p