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

sync issue: upload on desktop works great, download on android fails 3/4 through #18

Open
martapien opened this issue May 3, 2024 · 4 comments

Comments

@martapien
Copy link

Hello! Thank you so much for this plugin, it really is quite amazing that you're building this!

I have just tried to sync everything between my desktop:

  1. installed plugin on desktop (linux)
  2. initialised on desktop
  3. everything got pushed to drive (in mydrivefolder/obsidian/vault-name that got created automatically)
  4. created a vault on my phone called vault-name
  5. installed plugin on desktop
  6. the download started
  7. the donwload crashed on 180 files (out of ~230)

I then did some troubleshooting on my phone:

  1. disable plugin and enable; still crashed at 180 files
  2. click the download again from scratch: still crashed at 180 files
  3. deleted all files from the vault manually and clicked to download again from scratch: still crashed at 180 files

I then noticed that the files, upon initialisation, did not get the lastSync property (and the attachment names did not change).

I opened on desktop one of the files that did not sync on android. I edited it. It then added the lastSync property and uploaded it. When I then opened obsidian on android and disabled & enabled the plugin, it downloaded the 181st file (the one that I edited on desktop) and then crashed as before.

So this issue may be related to the fact that those properties are not added at initialisation time? Although it works for 180 of the files and then crashes, while none of the files have those properties added.

I am attaching the error log files here:
verbose-log-gdrive-plugin.md
error-log-gdrive-plugin.md

In other news, I wanted to ask you how this will work with the "attachment name formatting" plugin? It may be an issue given that both plugins rename attachments?

@stravo1
Copy link
Owner

stravo1 commented May 3, 2024

will take a look into the issues asap, thanks for pointing them out.

also, i have received this bug about "Folder Already Exits" once before, if possible can you share the vault structure?

if you don't want to publicly disclose the vault content, you can mail it to me at stravoone@gmail.com (that too if you are comfortable), that would greatly help me debug this issue.

@stravo1
Copy link
Owner

stravo1 commented May 28, 2024

hello!

i was unable to recreate the issue you faced for a long time, but recently another issue was reported with the same error "Folder Already Exists" and seems like the user is facing that issue for the "Templates" folder. #26

can you please check out the latest release and report back the logs, i have now added probes which help me debug the exactly which path/folder is causing the issue

thank you :)

@vorzdesigns
Copy link

i had the exact same problem but i told me it was a problem with the file that i had "test.md", because it was already present in my gdrive i guess im not sure. but after deletion of this file on my pthon through obsidian, and reloading the plugin its fixed

@stravo1
Copy link
Owner

stravo1 commented Oct 30, 2024

thanks for posting this, i thought of writing this down as well but forgot 😅

yes so seemingly this might be the problem:
one or more files in the vault was uploaded more than once to Drive and as Drive allows multiple files with the same name it doesn't cause an error while uploading the files from the vault.
however while downloading and creating the files in other devices it tries to create the same file again and again because it knows that the files (the duplicate copies) exist in Drive but not in the vault and fails as the same name file can not be created twice.
so the solution for now is to look at the error logs, it shows which file it can't create and look for the same named file on Drive and delete all the duplicate occurrences.

thanks

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

3 participants