Community
Participate
Working Groups
Sometimes during loading git-repository.html I get an error in logs: "TypeError: currentBranch is undefined" in gitRepositoryExplorer.js line 541. Then it tries to remove one of the tasks twice (probably a seperate bug). It result the "Commits" section never finishes loading. After page refresh everything is working. This doesn't happen regularly, but I've seen it an least few times.
Created attachment 210584 [details] Task response This is the response for the problematic task. This may be irrelevant, because it's a request for tags list. For reason I don't understand now this task is checked twice after it finished, so this has probably something to do with deleting it twice later on. My intuition tells me that maybe for some reason this view with commits gets the wrong response. This tag list is returned to it instead of the commits list.
Created attachment 210585 [details] Git log response The git log task was also completed successfully. This is it's outcome.
(In reply to comment #0) > Then it tries > to remove one of the tasks twice (probably a seperate bug). Opened Bug 370729 for this.
The problems with tasks seem to be unrelated. Please raise separate bugs for them and investigate. From looking at the code it looks like no branch is marked as active. I would expect to see it after rebase, or just the server returns wrong response. Next time you see it, please copy the response for /gitapi/branches and paste it here.
This is not after rebase. The problem is always on page loading, usually no major changes in repository have been made before the page loading. I often get it after I restart my server or when I load the page first time in a day. And note that if you reload the page immediately after seeing this error without making any changes on the server it's usually not reproduceable. Current branch probably exists but for some reason is not passed to the explorer. The problem with the task is indeed unrelated. I managed to reproduce it without "currentBranch is undefined" error.
I reproduced the problem today again (I still don't know how) and looked a little bit closer. The problem is not caused by the repository page but by the task service. It seems that two tasks got the same Id. TaskService is using UniversalUniqueIdentifier to obtain an id and it seems that if there are identifiers are created too fast after each other they are the same. It results in overwriting task info by the running jobs. In this case the explorer got a response from the wrong task and that's why the result was incorrect and didn't contain currentBranch.
This bug has the same root cause as bug 370729. *** This bug has been marked as a duplicate of bug 370729 ***