Skip to content
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]: buffer error on iOS #659

Open
mpapamanz opened this issue Dec 20, 2023 · 10 comments
Open

[Bug]: buffer error on iOS #659

mpapamanz opened this issue Dec 20, 2023 · 10 comments

Comments

@mpapamanz
Copy link

Describe the bug

Since i added a pdf/blob in my git repository i am getting "buffer error".
The directory with the pdf doesn't pull (but some others do)
Pushes totally fail

Interestingly i have another directory with a much bigger PDF that just works

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

No response

Steps to reproduce

  • Add a pdf in a directory
  • Fetch/commit
  • Get buffer error

Expected Behavior

Not getting buffer error 🙂

Addition context

No response

Operating system

iOS

Installation Method

None

Plugin version

2.22

@philipcristiano
Copy link

I’ve been running into this as well when adding a ~5MB jpg file.

@RDust4
Copy link

RDust4 commented Jan 3, 2024

I have the exact same problem, pushing just throws a "buffer error".
However, there are no big files in the commit or in the vault itself.

@mpapamanz
Copy link
Author

I did a bit of experiments, in the following the finding:

  1. Deleting/adding to gitignore the largest fine (~9MB) everything works perfectly
  2. Adding the big file on the mobile, committing works. Push doesn't (and Pull doesn't either that triggered me filing this bug)
  3. Once the large file is committed, there is no way back (I guess it is because the file stays in the local log and needs to be pushed)

(2) makes me think that the issue is with network rather than with the local client.
(3) makes me thing that what @RDust4 is experiencing may be due to a huge log (for some reason)

Happy to do more experiments and/or grabbing logs (I have to figure out how though :)

@RDust4
Copy link

RDust4 commented Jan 3, 2024

I had a plugin installed named obsidian-likzjax, which does not work on mobile (it threw a "plugin failed to load" on startup).
As soon as thr main.js of that plugin was in the commit, it failed to push.
After then uninstalling the plugin, everything works as normal.

@anibaldeboni
Copy link

I have the same bug on iOS. At first it was working fine but after some time using the feature the error begun to appear.
I don't have any large files, only small text files. I have tried to disable all extension except obsdian-git, reinstall the app, but nothing worked.

@RDust4
Copy link

RDust4 commented Jan 5, 2024

I don't have any large files, only small text files. I have tried to disable all extension except obsdian-git, reinstall the app, but nothing worked.

Disabling extensions doesn't do anything because the plugins themselves are backed up either way.
You would have to uninstall extensions for that to work.

Personally, I have fixed my problem by adding a .gitignore for plugins.
This backs up everything except plugins and their settings, thus resolving the problem.

The exact steps I took:

On desktop:

  1. add the ".gitignore" file to the vault root
  2. add "/.obsidian/plugins" to the gitignore file (I used notepad -> save under -> go to your vault root)
  3. backup (commit all changes and push) the vault
  4. check on git if the .obsidian/plugins folder is gone in the latest commit

Then on mobile:
5. delete old vault & create new empty vault
6. install obsidian-git, enable, and add git credentials
7. clone your vault
8. install all your plugins manually
9. change something and test if commit&push works

Hope that helps!

@anibaldeboni
Copy link

I had a plugin installed named obsidian-likzjax, which does not work on mobile (it threw a "plugin failed to load" on startup). As soon as thr main.js of that plugin was in the commit, it failed to push. After then uninstalling the plugin, everything works as normal.

I don't have any large files, only small text files. I have tried to disable all extension except obsdian-git, reinstall the app, but nothing worked.

Disabling extensions doesn't do anything because the plugins themselves are backed up either way. You would have to uninstall extensions for that to work.

Personally, I have fixed my problem by adding a .gitignore for plugins. This backs up everything except plugins and their settings, thus resolving the problem.

The exact steps I took:

On desktop:

1. add the ".gitignore" file to the vault root

2. add "/.obsidian/plugins" to the gitignore file (I used notepad -> save under -> go to your vault root)

3. backup (commit all changes and push) the vault

4. check on git if the .obsidian/plugins folder is gone in the latest commit

Then on mobile: 5. delete old vault & create new empty vault 6. install obsidian-git, enable, and add git credentials 7. clone your vault 8. install all your plugins manually 9. change something and test if commit&push works

Hope that helps!

Unfortunately it didn't work. I did everything you mentioned (including reinstalling obsidian and only using obsidian-git plugin) but the buffer error is still happening

@RDust4
Copy link

RDust4 commented Jan 12, 2024

Could you try the same thing again, but add the whole .obsidian folder to .gitignore?
I think the problem lies somewhere in there.

@zed106
Copy link

zed106 commented Feb 22, 2024

I have faced the same issue. Here is how I solve it:

  1. Delete the directory of the old vault in iphone: My Iphone->Obsidian->XXX(my vault name)
  2. Use a new git client to clone the repository of my vault. I use PolyGit(I think it doesn't matter, I just want to clone the repository to my iphone).
  3. Find the repository directory in "My Iphone->PolyGit->XXX", and move it to "My Iphone->Obsidian"
  4. open Obsidian on iphone

The old (WRONG) way to create the vault on my iphone was like this:

  1. git clone the reposity XXX (on windows)
  2. zip XXX to XXX.zip (on windows)
  3. send XXX.zip to my iphone, and place it under "My Iphone->Obsidian".
  4. Open Obsidian in iphone
    Then it popped "buffer error" when "git push". Then I used a git client app on my iphone to open the XXX, and it also popped errors. So I assume something went wrong when I copy files from windows to my iphone. Then I used a git client clone the repository directly on my iphone, then move it to Obsidian dir. It works well。

@truppelito
Copy link

Could you try the same thing again, but add the whole .obsidian folder to .gitignore? I think the problem lies somewhere in there.

I’ve just encountered the same issue. I don’t have large files in my vault. And I also have had, since the beginning, the entire .obsidian folder in my .gitignore. The problem must be lying somewhere else.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants