SolvedGitJournal Sync after inital clone doesn't work

Environment

App version:
Device information:

  • OS name and version: Android 10
  • Manufacturer: Nokia
  • Model: 7 plus

Description

Expected behavior:
Changes in notes are pushed/fetched to git repo

Current behavior:
After initial synch, no longer pushes or fetches with the repo.

Steps to reproduce

Version 1

  1. Follow automatic git setup of gitjournal
  2. Choose existing repo
  3. Successfully first sync/clone
  4. Add document/change document and automatically let sync happen / manually trigger sync
  5. Check git repo for changes

Version 2

Same as Version 1, with the exception of manually creating deploy key with write rights.

Version 3

Same as Version 1, with the exception of manually creating a general key with write rights on all repos.

Logs
09:27:05 Got Exception Exception: Current Branch null #0 GitNoteRepository.merge (package:gitjournal/core/git_repo.dart:190) <asynchronous suspension> #1 Repository.syncNotes (package:gitjournal/repository.dart:188) <asynchronous suspension> 

Full logs:

{"t":1607622700301,"l":"i","msg":"--------------------------------"}
{"t":1607622700301,"l":"i","msg":"--------------------------------"}
{"t":1607622700301,"l":"i","msg":"--------------------------------"}
{"t":1607622700301,"l":"i","msg":"--------- App Launched ---------"}
{"t":1607622700301,"l":"i","msg":"--------------------------------"}
{"t":1607622700301,"l":"i","msg":"--------------------------------"}
{"t":1607622700301,"l":"i","msg":"--------------------------------"}
{"t":1607622700301,"l":"i","msg":"AppSetting {onBoardingCompleted: true, collectUsageStatistics: true, collectCrashReports: true, version: 0, proMode: true, proExpirationDate: 2021-01-07T00:10:34.148Z, pseudoId: aaa9520a-847f-480d-8a2a-117636b95740, debugLogLevel: v, experimentalFs: false, experimentalMarkdownToolbar: false, experimentalGraphView: false, experimentalZeroConf: false}"}
{"t":1607622700308,"l":"d","msg":"Analytics Collection: true"}
{"t":1607622700312,"l":"d","msg":"Event.Settings"}
{"t":1607622700312,"l":"i","msg":"Setting {noteFileNameFormat: FromTitle, journalNoteFileNameFormat: FromTitle, yamlModifiedKey: modified, yamlCreatedKey: created, yamlTagsKey: tags, customMetaData: , yamlHeaderEnabled: true, journalEditordefaultNewNoteFolderSpec: , journalEditorSingleNote: false, defaultEditor: Markdown, defaultView: Standard, sortingField: Modified, sortingOrder: desc, remoteSyncFrequency: automatic, showNoteSummary: true, folderViewHeaderType: TitleGenerated, version: 2, markdownDefaultView: Last Used, markdownLastUsedView: Edit, homeScreen: all_notes, imageLocationSpec: ., zenMode: false, saveTitleInH1: true, swipeToDelete: true, inlineTagPrefixes: #, emojiParser: true, folderName: journal, bottomMenuBar: true, storeInternally: true, storageLocation: , sshPublicKey: true}"}
{"t":1607622700326,"l":"d","msg":"Event.RepoSynced"}
{"t":1607622700328,"l":"i","msg":"Checking if ProMode should be enabled. Exp: 2021-01-07T00:10:34.148Z"}
{"t":1607622700328,"l":"i","msg":"Not checking PurchaseInfo as exp = 2021-01-07T00:10:34.148Z and cur = 2020-12-10T17:51:40.328094Z"}
{"t":1607622700364,"l":"i","msg":"Finished loading the notes cache"}
{"t":1607622700369,"l":"v","msg":"Ignoring file","p":{"path":"/data/user/0/io.gitjournal.gitjournal/app_flutter/journal/.dendron.version","reason":"IgnoreReason.HiddenFile"}}
{"t":1607622700369,"l":"v","msg":"Ignoring file","p":{"path":"/data/user/0/io.gitjournal.gitjournal/app_flutter/journal/.gitignore","reason":"IgnoreReason.HiddenFile"}}
{"t":1607622700610,"l":"d","msg":"Received Share with App (text): null"}
{"t":1607622700907,"l":"d","msg":"Saving the NotesCache"}
{"t":1607622700939,"l":"i","msg":"Finished loading all the notes"}
{"t":1607622701828,"l":"e","msg":"Got Exception","ex":"Exception: Current Branch null","stack":"#0      GitNoteRepository.merge (package:gitjournal/core/git_repo.dart:190) <asynchronous suspension> #1      Repository.syncNotes (package:gitjournal/repository.dart:188) <asynchronous suspension> "}
{"t":1607622701831,"l":"v","msg":"Ignoring file","p":{"path":"/data/user/0/io.gitjournal.gitjournal/app_flutter/journal/.dendron.version","reason":"IgnoreReason.HiddenFile"}}
{"t":1607622701831,"l":"v","msg":"Ignoring file","p":{"path":"/data/user/0/io.gitjournal.gitjournal/app_flutter/journal/.gitignore","reason":"IgnoreReason.HiddenFile"}}
{"t":1607622701859,"l":"d","msg":"Synced!"}
{"t":1607622701866,"l":"d","msg":"Saving the NotesCache"}
{"t":1607622706572,"l":"d","msg":"Event.DrawerSettings"}
{"t":1607622710924,"l":"i","msg":"No log file for 2020-12-09 18:51:50.924100"}
32 Answers

✔️Accepted Answer

Okay. I'm planning to look at this tomorrow depending on my state.

Things that would help:

  • Where is remote repo? (GitHub / GitLab / Bitbucket / etc)
  • How many branches does it have?
  • What is the default branch?

I've pushed an update 1.73.5 right which (pending review) might fix some of the issues, but I'm planning to properly isolate the relevant code and write automated tests for it.

Other Answers:

Weird. I've been a bit away (look at the November update). I'll take a look tomorrow morning and report back.

Related Issues:

4
GitJournal Sync after inital clone doesn't work
Okay I'm planning to look at this tomorrow depending on my state Environment App version: Device inf...
570
desktop The user name or passphrase you entered is not correct.
It sure looks like something's screwy with Keychain Try opening Keychain Access.app ...
381
git lfs Encountered 1 file(s) that should have been pointers, but weren't
Run git lfs uninstall and then git reset --hard (assuming there are no changes you want to keep!) On...
356
desktop Could not resolve host: github.com
Check this out as well it helped me. Description I create a new repository in my local and complete ...
339
husky Can't find Husky, skipping pre-commit hook
I was able to fix this issue with: yarn in v1.6.0 husky installed information: config in .huskyrc I ...
322
desktop It keeps saying The user name or passphrase you entered is not correct.
@tom10271 we think this is related to Keychain access due to some sort of macOS update: Try opening ...
230
git lfs Simple steps to uninstall Git LFS from your repository
Thanx that helped me a lot while I was migrating from BitBucket to AWS CodeCommit ...
226
git lfs git-lfs aborts with "LFS: Git credentials for https://XXX not found." even for repositories without passwords
In my case on Windows using gitbash I had to use: git config --global credential.helper wincred ...
219
desktop A lock file already exists in the repository, which blocks this operation from completing.
@simhox thank you for updating the issue body and uploading the log file! Here's the related error: ...
145
husky husky with sourcetree : Can't find node in PATH, trying to find a node binary on your system
I was experiencing this error with NVM & WebStorm (while everything was fine from the Ubuntu termina...
133
desktop Improve ease of configuring Git to work with corporate proxy
@DanielKeogh currently you still need to tell Git about your proxy settings: git config --global htt...
109
desktop fatal: unable to access 'https://github.com/': Could not resolve proxy: aproxy
Run the below command git config --global --unset http.proxy Description [Description of the issue] ...
104
nodegit Can't install via NPM
Latest Xcode just straight up broke things all across the world Try running sudo xcode-select --inst...
101
husky Command "husky-run" not found.
Try yarn husky install Just have upgraded from v4.3.8 to v5.0.9 and got the error have tried to unin...
95
git lfs installation in ubuntu is not working
Running the following command looks to have fixed this issue for me: Trying the instruction: yields ...
89
desktop reference broken
@herio5154 thanks for the feedback! It looks like something with the underlying Git repository has b...
83
desktop Feature Request: Graph history view
IMO full tree is too complex and we should decide the main reason to add this feature ...
82
desktop Commit failed error with GPG signing turned on
In case it helps someone the workaround I'm using for now is to disable gpg signing with a repositor...
77
git lfs git lfs issue even after adding the file
Hi @kamlekar thanks for opening this issue and I'm sorry that you're having some trouble! Here's my ...
75
gitsome Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-7SrToZ/gitsome/
I had the same problem on OSX and Solve my issue (I have both python versions installed). ...
71
git lfs Authentication required : You must have push access to verify locks error.
I'm trying to help you skip the pre-push hook You inadvertently re-installed it :) Try this: Sorry a...
71
bat Ubuntu install error when rg is installed also
As a workaround one can use sudo apt install -o Dpkg::Options::=--force-overwrite bat ripgrep (taken...
69
lint staged Build typescript on commit
hi I know this is an already closed issue but I still ran into it I'm trying to rebuild my typescrip...
62
pre commit python3.7: command not found
Just adding this here for anyone that comes across this issue When you create a virtualenv using for...
61
lint staged No staged files match src/**/*.{ts,tsx}
I solved my problem I had a space in between ts and tsx change in .lintstagedrc.json from *.{ts tsx}...
60
bfg repo cleaner Just write how to install it.
@srugano I agree I had no idea how to properly install it Luckily I found it on homebrew so I instal...
59
patchwork remote Permission to jlord/patchwork.git denied returned error: 403
When you get a 403 on this challenge it is because you are trying to push your changes to a reposito...
51
desktop "Warning: line endings have changed from 'LF' to 'CRLF'." when files have LF line endings on Windows
@stuartpb Isn't configuration from Github Desktop you using Windows Git assumes CRLF but your text e...
47
desktop Authentication Failed
Experienced this issue with a Bitbucket SSH URL changing to a https URL in the Repository Settings f...
45
cli Ability to configure a default editor for use with gh
I think it would make most sense to honour GIT_EDITOR since that is likely what people will have set...
45
44
git lfs cannot spawn .git/hooks/pre-push: No such file or directory
Cool glad you got it working What ended up being the solution? my solution was git lfs update --forc...
44
git lfs Force pushes can lead to "bad object" message from git rev-list
You can run git fetch to fetch from the remote first. Describe the bug When force-pushing a ref to a...
41
desktop Github Desktop version 1.0.12 Authentication Failed during fetch with remote
Goto File > Options > Sign Out and Sign In again It works for me. Description After upgrading to the...
41
lint staged lint-staged ignores tsconfig.json when it called through husky hooks
Similar issue with tsc Passing files AND project config is not possible When invoked from husky ...
37
netlify cms Support for multilingual content authoring
So I can see from #2988 that we're still looking for UI/UX solutions on this Thanks @barthc for the ...
36
git lfs Object does not exist on the server
For anyone in a situation where git lfs thinks everything is dandy but repos are spouting Object doe...
36
husky husky is using some strange node version when running hooks
The fix for node v10 is to update lint-staged to ^7.0.5: or First problem husky is using npm when I'...
35
desktop file too large, but can't remove it
This worked for me: A simple solution I used: Do git reset HEAD^ for as many commits you want to und...
35
vscode gitlens GitLens disables merging CodeLens
Hey guys So after long searching with trying i may discovered the reason of disabled options for the...
34
Git Credential Manager for Windows Credential prompt does not save credentials to store
@whoisj there is a typo on # 3 UserProfile in your comment above I have the same issue ...
33
bat [fzf] Bat is awesome, but
It's so awesome but whyyyyy Whenever bat detects a non-interactive terminal it will fall back to pri...
32
desktop GitHub Desktop unable to fetch ("url has no scheme")
Found a solution that worked for me Update: This has been fixed for Windows in the latest release of...
29
desktop Error: Cannot lock ref 'refs/remotes/origin/master'
@arbuzzer apologies -- I think we need to clean things up before running that command ...
28
conventional changelog Information about security issue
What happened A core contributor to the conventional-changelog ecosystem had their npm credentials c...
27
lint staged Add better support for partially staged files
Why not simply temporarily doing git stash -k? See react-boilerplate/react-boilerplate#1064 (comment...
27
spring cloud config Datasource Issue with Spring Boot 2.1.x
Spring Boot 2.1.x disables the overrides of this type of bean by default I have a very simple spring...
26
desktop Window hiding after using a second screen
I've also been able to reproduce the issue on my Windows 10 environment The only solution was to del...
25
netlify cms Authentication problem if not running on localhost
I have the same issue with GitHub backend I can access the content manager just normal when running ...
25
netlify cms Add sorting ability to list of entries
Requesting some more flexibility here User needs: to more efficiently be able to locate a post when ...