[BUG] App crashes

How big is your vault?

If you create an empty vault on mobile, does it work?
If so, move your files into this vault a bit at time, when does it stop working?

Also, when you submit bug reports, there should be no third party plugins and no custom theme enabled.

My vault has about 12 MB of content, exclusively markdown files a few directories. For magnitude, it clocks in at 532 files.

Iā€™ll start bisecting the files and adding them slowly at a time to see if I can manually spot the culprit.

Understood. Iā€™ll remove the plugins I have. This wasnā€™t my original thread, as I was ushered here haha

I want to ask this again, as itā€™d be way easier to fix this:

Is there any way we can procure some log or crash report to understand why our app is crashing rather than guessing?

I was able to open my directory without the app crashing. I achieved this by deleting the three directories I still have in my vault folder, as I havenā€™t gotten to refactoring them out into a flat hierarchy.

I donā€™t know which file caused an issue but I can identify the file thatā€™s causing problems in the future and share that here.

that would be awesome. Ping me when you do.

1 Like

I ended up paying for sync. When I did, during sync error messages kept popping up, saying that particular files couldnnā€™t be synced. Looking at the files, all the ones I noticed had a semicolon ā€œ:ā€ in the filename. Maybe try search and replace all semicolons in your vault and that might fix your problem. Iā€™d be interested to hear if that works for you.

Interesting I had the same issue, do you remember actually writing the semicolon in the filename?

Interesting.

Unfortunately Iā€™ve ready verified that I do not have weird characters in my file names. Quoting from above:

Iā€™ve verified my directory, and its sub directoriesā€™, contents do not contain a file name with any characters that are a-z, 0-9, dot, dash, or underscore by running:

$ find . -type f | grep -i '[^a-z0-9\.\/_\-]'

Hey @WhiteNoise took a while but I found the file causing my android app to crash. Itā€™s a file simply called notes.md but it is rather large. Clocking in at roughly 2.5 MB.

I can try to bisect the file to figure out what specifically inside the file is causing the crash.

But once again, if you have any way for me to get any logs or stack trace, thatā€™d be greatly appreciatedā€¦ As simply guessing and bisecting is getting old real fast, especially from my phoneā€™s terminal haha

There is no simple way. You need to connect chrome to android to get access to the console log and thereā€™s no guarantee youā€™ll get anything if obsidian crashes.

Now there are two options here,

  1. the file is just too big, and for being a markdown file 2.5 mb is nonsensically huge.
    PS: I wanna reiterate here that if you dump you logs in a .md file and hope obsidian will parse them, itā€™s not gonna work. Use .txt.
  2. that file might be manageable on mobile but there is something that trips the parser.

I tend to favor the first opinion. You can split that file in 20-100 parts and see if it works.

If you are willing to share the file, you can DM me or licat on Discord and send it. We can have a look it there is something that trips the parser.

Understood on the logs not being an option.

Yeah, unfortunately itā€™s not ant sort of logging. It just happens to be a very long file I wrote in VS Code, prior to switching to Obsidian.

Unfortunately Iā€™m not willing to share it. Iā€™ll probably just break it up into a few different parts and see where this takes me.

If I have any success, Iā€™ll report back. Thanks @WhiteNoise

Exact same issue for me. Didnā€™t check yet if itā€™s fixed.

Hey @GrehgHils , Iā€™ve tried multiple pathsā€¦ Nothing worked. (Sorry for late reply.)

I think Iā€™ve solved it.

The issue is those characters, but not on file names because files with bad names donā€™t get synced to Android. However, folders do! (I believe the fact that it allows sync apps to create folders with semicolons in their names is probably an Android bug.)

So if you have folders in your drive with those characters in it (for example ā€œ:ā€), then those folders will be created in Android and as a result, Obsidian app will crash when opening a vault with such folders in it!

Removing those characters from folder names seems to have solved my issue.

Why moving a parent folder and then moving it back again solves the issue: This is a theory, but Iā€™m pretty sure this is what is happening (I havenā€™t tested it after fixing my issue): If you move a folder, which contains subfolders with ā€œillegal filenamesā€, then Android will probably either remove such folders or change the names of the subfolders. This would explain the really weird behavior that moving the location of a vault fixes the crash issue.

I hope it helps.

To the Obsidian devs: I think this can be a very big headache. It should either be very clear that folders with illegal names will crash the app, or the app should have some kind of mechanism that handles this situation which does not leave the user scratching their head.

Weird issue indeed, and an Android bug for sure (the fact that it even allows you to create folders with ā€œillegalā€ characters in their names), but this solved it for me.

Obsidian Sync creates those folders? Which character was it?
I think the bug is ultimately with the third-party sync services you are using probably a lower level api that circumvents the official specs.

For some reason, even though I have this thread as ā€œWatchingā€ i never get actual emails related to replies, so sorry for the late reply as wellā€¦

@yusufhgmail and @WhiteNoise I have been unable to figure out any more information. Specifically if its because my one file is so large or if it contains some unexpected content. Its quite time consuming to iterate on, as I have to get the modified file on my phone to test if it crashes.

@yusufhgmail interesting, in my case, I do not have any folders at all. So i donā€™t think I have the same situation as you do.

I do wish there was some sort of exception handling, logging and stack trace exposure, as weā€™ve all been simply guessing at this.

I am gonna close this thread because it contains several issues some solved some maybe not.
If you have issues, open a new thread and attach reproducible steps if possible