-
Notifications
You must be signed in to change notification settings - Fork 654
[Bug] SyntaxError: Unexpected end of JSON input #2690
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
Comments
Perhaps related to #2567. |
I am having exactly the same issue. Cannot find the .git directory and Unexpected end of JSON. I've narrowed it down to be because of using the following in the pipeline for the job that calculates version: Of course by not checking out, it wont even sync to a git repository, so the .git folder stays empty. The reason it was working sometimes and not others for us, was because some of our Azure DevOps agents still had the workspace mapped from a previous build of the same repository (pre breaking changes), therefore meaning the .git folder was already present. |
I am facing the same issue. Any idea how to solve it or troubleshoot it? Thanks UPDATE - I manage to solve it: an existing release branch had wrong name (v1.0.0.0). I deleted the branch and the task run successfully |
I've hit a similar, error message today - Possible workaround (if related) is to fix/specify the |
Version Example azure-pipelines.yml
|
Im using version 5.10.3 and im getting the same issue
|
I've hit this issue again today on GitVersion v5.9.0 and also tried v5.10.3 (and an older v5.7.0) - All hit the Oddly, I've only hit this issue on a couple of repos that I've created today in Azure DevOps Services - Other builds that were using GitVersion v5.9.0 were working OK and have been for a while since my previous post in this thread. Given that it only seemed to be impacting the new repos and the error message also seemed to state that it couldn't find the initial/first commit, I'd been able to create a new repo in Azure DevOps, initialize it locally/offline then push a commit back to the remote, Azure DevOps repo - I noted that GitVersion did work sucessfully in the build on the initial/single commit, but then failed once a second commit was added to the I'm not clear how to resolve this for these new repos at present, and am unclear why this isn't also impacting the older/existing repos that use the same build templates that make use of the same version of GitVersion (existing repos/builds work on v5.9.0 and v5.10.3, but new repos fail on both). I can only think it's something in GitVersion potentially not supporting a later/newer version of Git, perhaps (I'm now using Git Any help/suggestions would be appreciated. Build Log Following 2nd Commit, using v5.10.3 (Checkout task):
Build Log Following 2nd Commit (same build as above), using v5.10.3 (GitVersion task - FAILS):
|
@SphenicPaul, the argument |
Thanks @asbjornu - that link and solution has been able to resolve/workaround the problem I was hitting. Much appreciated. |
I'm glad @SphenicPaul. As this is a bug in the task/action and not within GitVersion itself, I'm closing in favor of GitTools/actions#730. |
Even though this ticket is closed, I'd like to share a task definition that solved the issue for me:
Be sure to use |
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
In our Azure DevOps Pipeline, we are trying to specify the path to an externalized GitVersion.yaml which is in the Resources repo we also use for ADO templates.
When we specify the configFilePath to the yaml, we receive the error:
##[error]SyntaxError: Unexpected end of JSON input
I can confirm the file is physically available in the working directory and also the GitVersion.yaml works on my local macbook without issues.
We are running on a self-managed linux vm
Expected Behavior
We would expect the extension to be able to take the input for the location where the configuration file is located, read it, and use it during the pipeline duration.
Actual Behavior
We receive an error:
##[error]SyntaxError: Unexpected end of JSON input
Full log output of task:
Possible Fix
The only workaround we have is to commit the GitVersion.yaml directly into the repo being built.
So far, have not found any way to get an external file to read successfully
Steps to Reproduce
Context
We are trying to tune gitversion to provide semantic versions differently than the plugin defaults, so we can control the versioning increment as desired by our organization. Without this, we are getting alpha and beta tags on our releases, which is not desired.
Your Environment
GitVersion Task version: 0.9.9, GitVersion.Tool 5.6.9 x64
ADO agent version 2.184.2
Linux, CentOS 7
The text was updated successfully, but these errors were encountered: