Getting this error after setting up Git sync with our internal Bitbucket.
It’s a 2 way sync and files from the server made it to the repo ok and are being updated as changes are made however I keep getting this error about a null parameter but not sure what it’s referring to.
Any update to this?
I am on 3.1.4 and getting the same error. I am using GitHub with a PAT.
The sync appears to be working, though i get no logs in GIT, just the errors.
The files synced with this also do not show up in the Scripts tab, just the folders.
2022-07-20 12:38:05.121 +10:00 [ERR] Failed to sync: Value cannot be null. (Parameter 'objectish') at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in /_/LibGit2Sharp/Core/Ensure.cs:line 54
at LibGit2Sharp.Repository.Lookup(String objectish, GitObjectType type, LookUpOptions lookUpOptions) in /_/LibGit2Sharp/Repository.cs:line 605
at LibGit2Sharp.Repository.Lookup(String objectish, ObjectType type) in /_/LibGit2Sharp/Repository.cs:line 569
at LibGit2Sharp.RepositoryExtensions.Lookup[T](IRepository repository, String objectish) in /_/LibGit2Sharp/RepositoryExtensions.cs:line 32
at UniversalAutomation.Git.GitService.GetChangesSinceCommit(String sha)+MoveNext() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitService.cs:line 360
at UniversalAutomation.GitSyncService.TrySync() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 199
at UniversalAutomation.GitSyncService.Sync() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 67
Can you enable debug logging? I’m specifically wondering if there is a git commit without a commit ID in the database. It would cause this but we should see a log where it’s trying to find changes for a commit ID that doesn’t exist.
_logger.LogDebug("Getting changes since {0}", lastSync.CommitId);
_changes = _gitService.GetChangesSinceCommit(lastSync.CommitId);
You’d see something like this:
[DBG] Getting changes since
That said, I’m not sure why there is a git sync without a commit ID but we should fix this so it will avoid this exception and just write a warning and continue on.
UPDATE: I added a check for this in the git sync to ensure we can handle this issue.
I did notice that under the GIT settings [/admin/settings/git] the remote and branch were showing the same in the UI despite what is configured in the appsettings.json
Jumping in here because I’ve just now started to see the same error. Sync is still working, but the error pops up in PSU after every sync.
Did you guys manage to get to the bottom of this?
ps. @mikedhanson I am seeing the same as you in the Git UI. “Branch” is showing the same value as “Remote”, rather than “main” like it used to. @adam that could be a hint!
Yay! Looks like v3.1.5 fixed it for us. We are using Bitbucket and were getting that null error. I did notice that the Branch still shows the full Remote path instead of the Branch name, but that just appears to be a display issue as the syncing is now successful.
Updated to version 3.5.5 and seeing this issue once again.
2022-11-23 11:43:28.969 -06:00 [ERR] Failed to sync: Value cannot be null. (Parameter 'name') at LibGit2Sharp.Core.Ensure.ArgumentNotNull(Object argumentValue, String argumentName) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 24
at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 50
at LibGit2Sharp.Identity..ctor(String name, String email) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Identity.cs:line 21
at UniversalAutomation.Git.GitService.Pull() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitService.cs:line 388
at UniversalAutomation.GitSyncService.TrySync(GitStatus status, Boolean force, GitSettings settings) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 151
at UniversalAutomation.GitSyncService.Sync(Boolean force) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 87
2022-11-23 11:44:01.757 -06:00 [ERR] Failed to sync: Value cannot be null. (Parameter 'name') at LibGit2Sharp.Core.Ensure.ArgumentNotNull(Object argumentValue, String argumentName) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 24
at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 50
at LibGit2Sharp.Identity..ctor(String name, String email) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Identity.cs:line 21
at UniversalAutomation.Git.GitService.Pull() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitService.cs:line 388
at UniversalAutomation.GitSyncService.TrySync(GitStatus status, Boolean force, GitSettings settings) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 151
at UniversalAutomation.GitSyncService.Sync(Boolean force) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 87
2022-11-23 11:45:01.788 -06:00 [ERR] Failed to sync: Value cannot be null. (Parameter 'name') at LibGit2Sharp.Core.Ensure.ArgumentNotNull(Object argumentValue, String argumentName) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 24
at LibGit2Sharp.Core.Ensure.ArgumentNotNullOrEmptyString(String argumentValue, String argumentName) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Core\Ensure.cs:line 50
at LibGit2Sharp.Identity..ctor(String name, String email) in C:\actions-runner\_work\universal\universal\src\libgit2sharp\LibGit2Sharp\Identity.cs:line 21
at UniversalAutomation.Git.GitService.Pull() in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitService.cs:line 388
at UniversalAutomation.GitSyncService.TrySync(GitStatus status, Boolean force, GitSettings settings) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 151
at UniversalAutomation.GitSyncService.Sync(Boolean force) in C:\actions-runner\_work\universal\universal\src\Universal.Server\Services\GitSyncService.cs:line 87