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

[Bug]: Android crash when pulling large files (55mb video), seems oom

Open Lesnao opened this issue 9 months ago • 5 comments

Describe the bug

pull large files get crash

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

crash logs from hyperos2

java.lang.OutOfMemoryError: Failed to allocate a 154056216 byte allocation with 61110704 free bytes and 58MB until OOM, target footprint 268435456, growth limit 268435456
	at java.lang.StringFactory.newStringFromBytes(StringFactory.java:98)
	at java.lang.StringFactory.newStringFromBytes(StringFactory.java:79)
	at android.util.Base64.encodeToString(Base64.java:459)
	at com.capacitorjs.plugins.app.AppPlugin.requestUrlAndroid(SourceFile:254)
	at com.capacitorjs.plugins.app.AppPlugin.lambda$requestUrl$3(SourceFile:38)
	at com.capacitorjs.plugins.app.AppPlugin.r(SourceFile:1)
	at com.capacitorjs.plugins.app.d.run(SourceFile:1)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1251)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
	at java.lang.Thread.run(Thread.java:1012)

Steps to reproduce

  1. setup pull on startup
  2. push large file(video or else) 55mb
  3. open obsidian
  4. get crash

Expected Behavior

no crash, and pulling file

Addition context

Android 15 HyperOS2 16G RAM

Operating system

Android

Installation Method

None

Plugin version

2.32.0

Lesnao avatar Mar 18 '25 09:03 Lesnao

Hi, try checking out the gitless sync plugin for mobile. It avoids the use of isomorphic-git.

shumadrid avatar Mar 20 '25 23:03 shumadrid

Hi, try checking out the gitless sync plugin for mobile. It avoids the use of isomorphic-git.

I tried it, but it seems that gitlab is not supported? only github?

Lesnao avatar Mar 21 '25 06:03 Lesnao

It says it uses github apis so only github

shumadrid avatar Mar 21 '25 11:03 shumadrid

+1 seeing the same thing on iOS (iPhone 16 Pro running iOS 18.3.2, Obsidian 1.8.9, Git plugin 2.32.1) – it worked fine before I added a bunch of files to my repo (specifically ~32MB of data across 24 files, each file no heavier than ~2MB) and starting with this commit pulling on mobile crashes the app.

If I can help debug this issue provide any other helpful information like logs, happy to do so – just let me know what to look for. This is kind of a dealbreaker for my Obsidian setup at the moment.

rkoten avatar Mar 30 '25 01:03 rkoten

@rkoten it's a known issue for mobile in this plugin, as mentioned in the README.

For iOS, have you tried using the Working Copy app? It might fit your needs. I remember seeing guides on r/ObsidianMD on how to use it.

shumadrid avatar Mar 30 '25 01:03 shumadrid