-
-
Notifications
You must be signed in to change notification settings - Fork 299
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Obsidian mobile support #57
Comments
This comment has been minimized.
This comment has been minimized.
I'm using termux on Android. Maybe there is a gateway to send shell commands to termux? I don't have access to Obsidian mobile so I currently use Markor when I want to do some writing on the phone. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Status updateI decided to use isomorphic-git, which is a "rewritten" git in javascript. Sadly it brings some problems:
The CORS problem is a real problem, because pulling/pushing does not work. It would need a proxy server, which is not very secure. The Obsidian devs have a method to fix CORS, but that's currently not exposed and does not support all features that are needed to push/pull. They have to improve and expose it. Sadly they have more urgent things to do, so it's not high priority on their list. |
This comment has been minimized.
This comment has been minimized.
I am really not happy with this situation, but even the Obsidian dev @lishid said that there is most likely no way for the plugin to fix this without a Server. (Discord message) I guess I will work on the mobile version (since there is a lot to do), but I won't be able to publish/finish it while this API is not available. I have no clue, when this will be. Maybe I will publish a version where the user has to insert a proxy server url. So the user can decide over his data. |
|
I did some huge progress on the pr #66 . Sadly there is a big problem with the file system. I have to customize and proxy the Obsidian adapter. At the moment, the method |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I think a much much much more wiser option would've been to use WASM and just transpile official implementation of libgit. I am not quite sure on the extent this kind of dogfuckery would've taken to do it, but probably much lesser evil than using an implementation of git, that's meant to be ran in web browsers with localStorages n shit |
@Vinzent03 thanks first of all for giving us this amazing plugin, it worked flawlessly in Windows 10. |
This comment has been minimized.
This comment has been minimized.
Status UpdateHey I am still alive. I did nothing regarding this issue the last months, because of some frustration. 😅😅 My implementation is mostly done. But I have huge doubt that I will ever be able to publish the update. It was a horrible journey with isomorphic-git and the restrictions on mobile (such as CORS). Now that everything works. There is still a huge problem: Performance
I doubt that my implementation is the problem. I think isomorphic-git doesn't work well with the limited resources on mobile. I am happy about any help. Maybe it's my fault after all. |
First, thank you for the update and your work on this! 🚀 |
That's the problem. You can't use node libraries on mobile. |
@Vinzent03 where can we read about limitation for mobile libraries in obsidian? |
https://discord.com/channels/686053708261228577/707816848615407697/823558775943331850 |
I meant using FileSystemAdapter, and associated internals like basePath, etc. I have a workaround for the CORS issue coming soon in the API. I guess this doesn't really help with the memory or speed issues though. |
Just a quick workaround for anyone who needs Git syncing with Obsidian (iOS only) (note this is not ideal, but can work as a good stop-gap imo):
This process can be automated at intervals with Apple Shortcuts. Hope this can help someone :) Thanks to @Vinzent03 for all the work being put into this, and hopefully we'll have a more cohesive experience in the future |
For Android you can use termux, and follow this guide: |
It should probably be mentioned that Working Copy costs $19.99 to use. The only alternative I could find was Polygit for $2/mo or $10/year. |
For what it's worth, this is apparently a free iOS method: https://forum.obsidian.md/t/mobile-sync-with-git-on-ios-for-free-using-ish/ |
I had issues with mgit, i ended up buying pocketgit, that works pretty well. Easier to manage your commits. But I did have some success with mgit. Its just another step I would like to avoid. |
It seems the problem is pretty much solved for iOS users.
Here is my solution for Android users. I have been using this very successfully for multiple months now. Everything stays in sync and my life is good!! |
I also use Dropbox and One drive sync plugin now. It's great, and I no longer require git based solution. That being said, I'm also looking forward to forking MGit in my free time and working something out with intents. possibly I can extend MGit to run commit and push from external intents. The obsidian part I'm not sure. |
I think I have something interesting to share with you. I finally got time and motivation 😄 to work on a mobile version. It's still in beta, but you can try it out by following this README. Please tell me if you encounter any issues. |
Hi there, I created a guide on how to use Termux on Android the simple way with a widget and an automatic sync setup. It is available on Reddit, hope it'll help. |
Exciting news! Currently testing this plugin, but cannot move beyond the setup stage. When I was asked if I have an .obsidian folder in my remote repo, I've chosen yes and chose to delete all my local configs, and then the clone was aborted immediately. Does this mean that I have to delete all my local config folders BEFORE cloning? Don't how to do that though, since every time Obsidian launches it will always create a new config folder, isn't it? |
@HybridRbt Thanks for the feedback. Should be fixed in |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
I have updated and tested it again, and indeed it now starts to clone successfully. But I don't know if it's due to my outdated hardware (iPhone X) or something else, it can never finish the clone: a few minutes after the clone starts, Obsidian will crash. I have plugged it in and turned off automatic screen lock so the app is always on. |
@HybridRbt I'm really sorry, but your repo is too big then. It crashes, because of an out of memory error, and there's nothing I can do to fix this. May I ask how big it is as listed here |
@Vinzent03 yes, I think you are right. I checked the size of my repo and it's nearly 500MB. Is there a way to make it sync slower and use less memory? I think this only happens for the initial clone, am I right? if this is the case, I can leave it syncing for, say, an hour or so |
@HybridRbt I don't know yet why running |
My current workaround: edit in Obsidian for Android, then open GitJournal to sync the workspace manually |
@Vinzent03 |
What should one do in case of merge conflicts? |
Thanks! So I've done another round of tests using your suggested method. Strangely, I cannot just copy the folder from my mac to my iPhone, it always stuck at around 28 MB. So I have turned on the core sync plugin, and used it to perform an initial sync. But even after this, the backup process still failed. It always stuck in "initializing fetch" or "getting status". |
@Columpio Merge conflicts should be supported. What happens for your when you get a merge conflict? I'm locking the issue now. Please create a new issue or discussion for bugs or feature requests. |
Because you cannot install git on Android/iOS the plugin has to include git in itself.
Maybe the npm package isomorphic-git is the solution.
The text was updated successfully, but these errors were encountered: