Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Locked Files not Appearing in Locks Tab - JSON Parsing Issue #835

Closed
@RandomOutput

Description

@RandomOutput

Prerequisites

Unity: 2017.4.1f1
Windows: Windows 10 x64 Enterprise 17134.112
Git: 2.14.1.windows.1

github-unity.log

180619-09:37:56.690 ERROR [162] <LocksOutputProcessor>              Failed to parse lock line [{"id":"7","path":"Assets/Main.unity","owner":{"name":"Daniel Plemmons"},"locked_at":"2018-06-19T16:37:28.38Z"}]
System.FormatException: Invalid format string
  at System.DateTimeOffset.ParseExact (System.String input, System.String[] formats, IFormatProvider formatProvider, DateTimeStyles styles) [0x00082] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System/DateTimeOffset.cs:345 

Description

After creating a new repo and adding origin, I tried to lock a file via the right-click menu in Unity. The file locks successfully:

$ git lfs locks
Assets/Main.unity       Daniel Plemmons ID:7

but the lock does not display in the locks tab, and the option to unlock the file is not available in the right-click menu.

locknotworking

Of note is that I'm hosting my repo on VisualStudio.com through VSTS rather than GitHub.

Steps to Reproduce

  1. Create new Unity Project
  2. Add Unity Github addon
  3. Initialize git repo via the addon.
  4. Connect to new remote hosted on VSTS.
  5. Save main scene.
  6. Commit and push main scene.
  7. Attempt to lock main scene.
  8. Observe that the lock completes successfully but is not displayed in the UI and can only be unlocked via the command line.

Expected behavior:
I expect to see the locked file listed in the lock tab.

Actual behavior:
The lock tab is empty.

Reproduces how often:
100% repro rate.

Additional Information

I've compared the JSON returned by git lfs locks --json on a VSTS repo and a GitLab repo (my GitHub repo didn't support LFS locking which is confusing to me). The difference appears to be a decimal point in the final portion of the timestamp from the VSTS hosted repo.

[{"id":"7"   ,"path":"Assets/Main.unity","owner":{"name":"Daniel Plemmons"},"locked_at":"2018-06-19T16:37:28.38Z"}]
[{"id":"2375","path":"Assets/main.unity","owner":{"name":"Daniel Plemmons"},"locked_at":"2018-06-19T20:33:25Z"}]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions