Unable to Create Branch Line or Revert Commit from Revision History (Newtonsoft.Json.JsonReaderException)

0
Hi Everyone,I'm facing an issue in Mendix Studio Pro 10.24.0 (Build 73019) where I'm unable to create a branch line or revert a commit from the Revision History.Whenever I select a revision, Studio Pro throws the following exception:Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonConverter[] converters) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonConverter[] converters) at Mendix.Modeler.VersionControl.Git.RevisionMetadata.RevisionMetadataManager.FromJson(String json) in Mendix.Modeler.VersionControl.Git\RevisionMetadata\RevisionMetadataManager.cs:line 25 at Mendix.Modeler.VersionControl.Git.CommandLine.Readers.BranchHistoryReader.TryParseCollectedCommitLines() in Mendix.Modeler.VersionControl.Git\CommandLine\Readers\BranchHistoryReader.cs:line 67 at Mendix.Modeler.VersionControl.Git.CommandLine.Readers.BranchHistoryReader.ShouldAppendLine(String line) in Mendix.Modeler.VersionControl.Git\CommandLine\Readers\BranchHistoryReader.cs:line 39 at Mendix.Modeler.VersionControl.Git.CommandLine.Readers.GitResponseReader`1.Handle(String line, Boolean addNewLine) in Mendix.Modeler.VersionControl.Git\CommandLine\Readers\GitResponseReader.cs:line 52 at Mendix.Modeler.VersionControl.Git.GitProcessRunner.<>c__DisplayClass11_0`1.<Call>b__0(Object s, DataReceivedEventArgs a) in Mendix.Modeler.VersionControl.Git\CommandLine\GitProcessRunner.cs:line 117 at System.Diagnostics.AsyncStreamReader.FlushMessageQueue(Boolean rethrowInNewThread)--- End of stack trace from previous location --- at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch() at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()(or)Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: A. Path '', line 0, position 0.at Newtonsoft.Json.JsonTextReader.ParseValue()at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(...)at Newtonsoft.Json.JsonConvert.DeserializeObject(...)at Mendix.Modeler.VersionControl.Git.RevisionMetadata.RevisionMetadataManager.FromJson(String json)at Mendix.Modeler.VersionControl.Git.CommandLine.Readers.BranchHistoryReader.TryParseCollectedCommitLines()at Mendix.Modeler.VersionControl.Git.CommandLine.Readers.GitResponseReader`1.Handle(...)IssueThe problem occurs only when:Creating a Branch Line from an older revision.Reverting a commit from Revision History.All other Git operations (Commit, Pull, Push, Merge) work normally.Anyone faced this type of issue?Any suggestions or guidance would be greatly appreciated.Thank you!
asked
2 answers
0

If you view the revision in the History Dialogue, does it show the Mendix version, or is that field blank?


If the field is blank, it means the metadata is missing for this commit. This can happen if a commit is created outside Studio Pro, of if you've encountered a bug inside Studio Pro. There recently was a bug (solved in 10.24.22 iirc) that metadata could be empty after rebasing.

To prevent this for future commits, update to the newest LTS version. For existing commits I don't think this can be fixed, but I'm not 100% certain.


If the field is showing a Mendix version (so the metadata exists), I'm not sure what's going on, and I would recommend submitting a Support ticket.

answered
0

Hi,

I haven't seen this exact error documented as a known/fixed issue, but based on the stack trace, here's what's likely happening and some things worth trying:

What's likely going on

The error comes from Studio Pro trying to parse commit metadata returned by git log as JSON, and it's choking on something that starts with the letter "A" instead of the expected {. This usually points to one specific commit having output (like an "Author:" line or unusual characters in the commit message) that doesn't match the format Studio Pro expects, which throws off its parser for that revision.

Since Commit/Pull/Push/Merge all work fine, this looks like it's isolated to whatever revision(s) you're trying to branch from or revert — not a general Git connectivity issue.

Things to try

  1. Bisect the bad revision – Try branching/reverting from different revisions in your History to narrow down which specific commit triggers the error. It's likely just one (or a few) with malformed metadata, not the whole history.
  2. Check that commit's message – If you can identify it, look for anything unusual in the commit message: multi-line text, special/non-UTF8 characters, emojis, or unusually long messages. These have been known to break git-output parsing in other tools too.
  3. Try a fresh local copy – Use Version Control > Download from Version Control Server into a new folder. If the error goes away, the problem is with your local working copy/cache rather than the actual history on the server. If it persists, the corrupted metadata is server-side.
  4. Check your Git config/locale – Run git config --list in the app's folder and check for anything unusual (custom pager, log format, aliases). Also worth confirming Windows regional/locale settings are set to English, as this has caused similar parsing issues in other .NET/git tools.
  5. Workaround via command line – If you can pinpoint the exact commit SHA causing the issue, you can create the branch or revert directly using git commands outside Studio Pro (git branch <name> <sha> / git revert <sha>), then reopen the project in Studio Pro.

Recommendation

Since this is an internal exception in Studio Pro's version control module and not something caused by normal usage, I'd strongly suggest logging a ticket with Mendix Support with the full stack trace and build number (10.24.0, Build 73019) — and if possible, which specific revision triggers it. This kind of bug usually needs someone from Mendix to look at the actual git data to fix properly, and it may already be addressed in a later patch build.

Hope this helps narrow it down — let us know what you find!

answered