Android not finding snippets

Problem

I have obsidian installed on my windows computer and android device. I have a custom css in my vault/.obsidian/snippets folder that simply changes the color of bolded and italicized text in obsidian. It works on my computer.

I then copy and pasted the obsidian folder, including the vault, from my computer onto my android device. At first, it looks like it worked, with all my notes being present. However, my css snippet doesn’t appear in the settings >appearance menu. I’ve verified that the css does exist on my phone, is in the same relative location as that on my computer, and carries the .css extension.

Was wondering why this is happening

Did you press the refresh button in the snippets section of the Appearance menu? (Reloading the app will also work, and if if any substantial time has passed and you’ve been switching between apps it may have already happened.)

Yep, I did hit the refresh button and I get a “Reloaded CSS snippets” message, but still get stuck with a “No CSS snippets found” in the section.

To take this more extreme, I’ve restarted the app as well as the device.

All this took place approximately 12 hours prior to this message, which should take into account the passing of “any substantial time”

I can verify that doing this has not caused the snippets to appear, nor has it taken effect somewhere in the background since I don’t see differentially colored italics or bold text.

I wonder if there are permission issues since I just did a copy paste of the directories from windows to the phone, but I don’t really know how to verify that. I installed a terminal and see that I have some access, but I don’t know if the terminal user is different from how obsidian behaves with respect to local files.

Eventually recreate the snippets folder on your phone, to make sure you’ve no whitespaces, returns or typing errors.
Also, check if your CSS files end with “.css”. Restarting your phone isn’t necessary, just restart obsidian. CSS files are loaded together with obsidian where they’re active.

Finally, deactivate plugins and themes for a moment just to remove any interference.

Permission issues may happen if you have rooted your device. At least with jailbroken iOS I’ve seen similar problems when I downloaded and wanted to try some example vaults: Obsidian notified me I was not allowed to make changes to the vault. First I thought it was the “price” I had to pay for downloading example vaults with zero dollars/euros paid. :slight_smile:
Then I quickly realized I should check the properties of the vault folder I had after unzipping: possibly the unzip created root ownership and Obsidian wants ‘mobile’ (equivalent of ‘user’?) ownership.
So you may be on the right track identifying the problem.
Check online how to chmod or chown your file the right way.

For record keeping purposes, playing around with ownership also didn’t work. I’ve given up on this and have resorted to using my subpar vision to parse differentially formatted text like a plebian.

Try installing the CSS Editor plugin in Obsidian (mobile), create the CSS file and copy paste what you have into the newly created file. The plugin automatically enables the snippet.

Thanks! I was able to install the plugin and create a css file. I had actually seen this solution before but couldn’t figure out hotkeys within 3 mintues (and subsequently moved on forgot about it).

For anyone who might happen upon this and also don’t know how to deal with hotkeys, I had to plug a keyboard to my device.

Additional update

After playing with the plugin a little more, what I learned is that the css file location was actually the issue. I accidentally set the root folder as the vault, not the actual vault…

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.