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]: Android sync "Cannot read properties of null" #379

Open
BrunoAFK opened this issue Nov 17, 2022 · 18 comments
Open

[Bug]: Android sync "Cannot read properties of null" #379

BrunoAFK opened this issue Nov 17, 2022 · 18 comments

Comments

@BrunoAFK
Copy link

BrunoAFK commented Nov 17, 2022

Describe the bug

I was following steps from wiki https://github.com/denolehov/obsidian-git/wiki/Installation#mobile but after i did everything right i got error

TypeError: Cannot read properties of null (reading 'slice')

I'm using gitlab and syncing .obsidian folder too

Steps to reproduce

https://github.com/denolehov/obsidian-git/wiki/Installation#mobile

I'm using gitlab and syncing .obsidian folder too

Expected Behavior

That repo is synced

Operating system

Android

Plugin version

2.10.1

@mathisgauthey
Copy link

Same issue there when I'm not starting fresh on a new vault.

@tomshaffner
Copy link

tomshaffner commented Dec 29, 2022

Same issue here.

Of note though; in my case closing the app completely out of memory and reopening it and then pushing seemed to solve the issue.

@tildejustin
Copy link

I am having this issue when trying to push to remote.

@BusterBlade5
Copy link

I have the same error. Did you manage to solve it? @tildejustin

@BusterBlade5
Copy link

Any idea how to solve it? @denolehov

@tildejustin
Copy link

tildejustin commented Feb 7, 2023

I redid my local install and cloned my repo through the app instead of mgit but was still having unfixable mergeconflict errors and wierd gitignore issues on mobile so I just gave up for the time being.

@miaoerduo
Copy link

same issue when pulling from remote.

@makkuro-kuroe
Copy link

I have had the same problem since today morning...
Can I check the error trace from the mobile app?

I tried searching for "slice" in my vault, but I have no results.

@PierreGtch
Copy link

Same here (gitlab.com repo, android) except the error appeared with reading 'length'.
Cloning the repo worked by following the instructions here, the error appeared when trying to commit.

@LightTemplar
Copy link

me too :(

@LightTemplar
Copy link

I've used an ADB debugger and got this message in the console:

Uncaught (in promise) TypeError: Cannot read properties of null (reading 'slice')
    at GitPackIndex.readSlice (plugin:obsidian-git:13460:35)
    at async readObjectPacked (plugin:obsidian-git:13560:22)
    at async _readObject (plugin:obsidian-git:13584:14)
    at async GitWalkerRepo.readdir (plugin:obsidian-git:14336:30)
    at async Promise.all (/index 0)
    at async unionWalkerFromReaddir (plugin:obsidian-git:14614:21)
    at async walk2 (plugin:obsidian-git:14624:46)
    at async Promise.all (/index 2)
    at async walk2 (plugin:obsidian-git:14628:28)
    at async Object.walk (plugin:obsidian-git:20599:12) 

I hope, it will help.

@LightTemplar
Copy link

I checked repo on the phone with termux and its git - git pull and git status works.
So, the problem is in the plug-in.

@BusterBlade5
Copy link

@LightTemplar I was hoping that the dev would maybe fix this. But I surrender and now I use Syncthing to sync with my phone and just deactivate the plugin in the mobile. At least there is an option to do that. And it works pretty nicely. I just use git on my pc.

@Trel725
Copy link

Trel725 commented Jun 13, 2023

Same here. Seems to be connected with size of pack files, created by isomorphic-git.
isomorphic-git/isomorphic-git#1163 (comment)

@mathisgauthey
Copy link

I ended up paying for Sync, student promo code. But don't know yet what I'll do next year.

@LightTemplar
Copy link

@mathisgauthey, I don't have problems with paying, I have problems with trusting someone with my data.

@mathisgauthey
Copy link

mathisgauthey commented Jun 13, 2023

@mathisgauthey, I don't have problems with paying, I have problems with trusting someone with my data.

I would recommend that you check this post

That's what I used to do on Android for using Obsidian sync with a git repo before moving to obsidian sync !

It's a bit techy but it works fine.

@LightTemplar
Copy link

@mathisgauthey, that would work for me, 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

10 participants