-
Notifications
You must be signed in to change notification settings - Fork 250
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
[Bug]: InternalError on iOS when Tasks is installed #503
Comments
I am having the exact same issue |
I'm having this issue on iOS, but I don't have the Tasks plugin installed, FYI. |
@GJRobert, could you list the plugins you have installed on your iOS? |
Hi thanks. Here they are:
Very few because this is just a vault in its early stage for testing Git syncing between 3 systems. |
I don't know the cause. All my commits on iPad cannot be pushed any more, this error message starts today (5/12 UTC+8) on my iPad. |
I'm having exact same issue since yesterday on my iOS device. While trying to pinpoint the cause I was switching branches and were able to push and pull most of the commits, but then issue came back. The issue also crashes obsidian UI and becomes totally black and unresponsive until app restart, I can only prevent it by shutting down network with airplane mode. |
I couldn't solve it. I just copy all the files from my iPad to google drive and commit the changes from my PC, then I delete the vault and create a new one and clone the repo again. |
After copying the vault to iCloud and got it to my MacBook, on MacBook the error message would read:
and I searched for "corrupt loose object" and found this bug #423 I did upgrade my iPad to iOS 16 recently, but this issue is occurring on my iPad 1 week after the upgrade. Not sure if iOS 16 is the cause. And now I'm trying to look for how to fix "loose object" of a Git repo to see if I can push them normally. |
Although I have researched and tried several ways to try to fix the corrupted vault repo (even with the one Linus Torvalds documented), I still can't correct it. So finally I re-cloned the repo and replaced the I'll keep testing to see if iOS cause any problem. And perhaps everybody using Obsidian-git on iOS should watch not to modify files during pushing, or take care not having any disk issue to try to prevent this issue from happening again. |
I see that @GJRobert is reporting here as well :) @tamiroh there is an issue open at isomorphic-git/isomorphic-git#1760 that tracks the git side of things. Is it possible that files are hashed (not pushed, but hashed) while they are being modified? Could that lead to a broken state? If yes, then you could try to lock the file for the time (e.g., copy the currently active file to a temporary file/buffer, finish the git task and then replace the committed file with the buffer (which should be commited file plus the delta of typed stuff). Something there seems to be corrupting the commit. I had the same problems but only another LaTeX-helper installed, not the tasks add-on. |
Hmm... @Vinzent03 |
@GJRobert have you been able to copy the |
@anpin iOS will surely copy the whole vault including |
I can access it via shell: https://forum.obsidian.md/t/mobile-ios-app-to-work-with-hidden-folder/25741/2 |
thanks @dbischof90, I'll try that. Got this issue again after recovering it and using for like 5 days :( |
The error message
is a cryptic way to say that the
The error message says that the hash over the first two parts is not correct. Isomorphic-git has the class GitIndexManager.js which maintances the In the obsidian-git repository there is a file:
Why do you do this? The issue in isomorohic-git: isomorphic-git/isomorphic-git#1760 |
I have this issue as well, but can still replicate it without the Tasks plugins. I sync from multiple desktops and an iOS phone and starting in may, I can no longer commit changes from the iOS phone. This is a huge issue for me. |
My personal solution, limiting the number of plugins on iOS. |
Even with no plugins other than git installed, with my repo, this happens |
I am now at the same stage. I am not able to sync anymore. |
@dead-end The reason for me to cache the |
For me, it works with version I have 122 Do you have any ideas to try? |
From a quick look at the CHANGELOG, I can't find any change that could affect this, so I doubt the plugin version is responsible. I guess it's a more race condition or similar and thus hard to reproduce. Though once the index is broken, it's not that easy to recover. |
Is there any trick to re-create the index on the mobile (iOS)? |
@Vinzent03 As I said in the note above, the
which has the wrong order. I think this is a race problem, but I have no evidence jet. With your implementation you only save the reading of the index file, but the file has to be parsed each time. A better way to improve performance is to use the isomorphic git cache: https://isomorphic-git.org/docs/en/cache Create a global cache object, pass this to the function calls and flush the cache from time to time. You get better performance because you cache pared objects and you relay on the official api. |
I'm aware of the cache object and pretty sure I've tested that as well, but will look into that again. |
I've just tried it and it still reads the index file for every file, so using a cache does not fix it. It's only useful if I call a isogit function many times, but methods like |
@Vinzent03 I think the intended way to use the cache is to create one (global) cache object and to pass it to all function calls. If this does not work, create an issue at isomorphic git with some example code and we will fix it. This is better than implementing a cache for yourself. |
I have the same with:
Anything I can do, or is the plugin basically broken? |
For me, now, it is working on iOS with version If I try to update, it breaks. |
I'm also having this issue and I've tried with a clean new vault, with only two plugins (Excalidraw and Obsidian-Git). Obsidian-Git version: 2.20.5 Im not sure how to resolve this issue and I'm hoping there will be a solution soon, because this plugin is awesome :-) |
At least make your vault sync properly again, people, you don't have to stuck here. Good luck!
|
Does any one know a way to export the .obsidian folder from your iPad ? I might have an idea. |
@Vinzent03 what do you think about disabling the optimisation just for iOS? This is a really painful experience which results in having to reclone the entire repo every ~few days. |
@tl87 Mine: copying the vault to iCloud and got it synced to my MacBook. |
Yeah, there is no other way to fix this bug but completely delete vault and clone it from git. For those who have many devices - I strongly advice to rename your .obsidian folders(settings -> about) for each device specifically and backup those to your repo as well. So in this case all I had to do is to only clone my vault, open it from obsidian, go to settings->about, change name to ".obsidian-ios" and hit "Relaunch" and I'm up and running. |
This sounds random and unsatisfactory but if that's the current solution... could you elaborate what the problem here is? What is so special about this folder that it brings down a git repo? |
I didn't say that .obsidian folder brings down git repo. My comment was written in addition to working temporary fix by completely deleting problematic vault folder and cloning it from git. To make such actions a bit easier and faster, so you won't have to move your .obsidian folder in terminal back and forth every time this error occurs. |
I found that you can compress the Obsidian folder in the Files app on iOS, then move it to a computer and merge it with a repo. Then you can reclone the repo in Obsidian on the iOS device, but then Obsidian on the iOS device, starts complaining about merge error, which is unsupported. Even with a clean clone from the git repo, this keeps happening. You can always delete the plugin and use working-copy app on the iOS device to keep Obisidan synced. |
That makes absolute sense! I was just wondering whether it's the So it seems like we get an incorrect index written at some times, hence next time we check the index, the SHA can't be recalculated correctly and we get therefore an inconsistent state. I'm not sure if the authors of the articles that I scanned through use the terms "parallel" and "concurrent" correct but I read a few times that in iOS applications, async function calls can indeed be called in parallel - which would mean that while you'd await the termination of the index write, another task could make progress and modify the filesystem. If the index creation task is still not done, that could theoretically lead to this situation.
|
A second thought: I just read this comment here and that could apply to us here as well: https://stackoverflow.com/a/1115956/5058041 So if we don't find out and accept that for now something fucky goes on a fix could look like:
|
So it happened again. But I wasn't able to do what you wrote, because a-shell's lg2, seems like, doesn't support such command. Or I don't know) But, I tried to search for another solution, because I made changes in vault that I didn't want to lose. I tried so many things, that I'm not even sure that this is the way to go, but, at least, it looks like P.S. I got that error right after installing Minimal theme, Minimal Settings plugin and Style Settings plugin. |
Describe the bug
I get this error:
And the backup is not completed.
To solve the issue, I have to not install Tasks, and clone again the repository.
Relevant errors (if available)
Steps to reproduce
The steps I am doing:
.obsidian
.1
.No issues so far. Then...
Obsidian Git: Create backup
No issues so far. Then...
Obsidian Git: Create backup
Expected Behavior
No response
Addition context
Obsidian: 1.4.4 (98) << From TestFligth
Also tested with the stable release from the AppStore.
iPhone 12
iOS: 16.4.1
Calendar: 1.5.10
Dataview: 0.5.55
Obsidian Git: 2.19.1
No other plugin installed on my phone.
Operating system
iOS
Installation Method
Other
Plugin version
2.19.1
The text was updated successfully, but these errors were encountered: