HTTP error 500 with LAN Optimizations enabled

Arsène von Wyss's Avatar

Arsène von Wyss

25 Feb, 2016 10:20 PM

Our build server TeamCity (V9.1.6) issues the following command to get changes:

hg --config ui.interactive=False pull --config extensions.progress= --config "progress.format=topic number" --config progress.delay=0 --config progress.assume-tty=True https://user:pass@server/repo

The result is this:
abort: HTTP Error 500: Sequence contains no elements

When LAN Optimizations are disabled, the command works fine.

Related question: do LAN Optimizations apply to all clients or only there on the same IP subnet?

  1. Support Staff 1 Posted by Anton Gogolev on 29 Feb, 2016 06:36 PM

    Anton Gogolev's Avatar

    Arsene,

    LAN Optimizations work no matter where the client is coming from (but
    restricting this to requests coming from the intranet is a neat idea).

    Do you happen to have any logs related to this issue (under
    HGLAB_HOME_DIRECTORY\logs\hgsharp-yyyy-MM-dd.log)?

  2. 2 Posted by Arsène von Wyss on 01 Mar, 2016 06:10 PM

    Arsène von Wyss's Avatar

    Here you go:

    23:16:20.3773 - Error -      admin - HgSharp.Server.HgHttpServer - exceptionSystem.InvalidOperationException: Sequence contains no elements
       at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
       at HgSharp.Core.HgPathEncoder.auxencode(String path) in d:\projects\hgsharp\src\HgSharp.Core\HgPathEncoder.cs:line 220
       at HgSharp.Core.HgPathEncoder.EncodePath(String path) in d:\projects\hgsharp\src\HgSharp.Core\HgPathEncoder.cs:line 65
       at HgSharp.Core.HgFnCacheStore.<GetDataFiles>b__2(String f) in d:\projects\hgsharp\src\HgSharp.Core\HgFnCacheStore.cs:line 51
       at System.Linq.Enumerable.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x)
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at HgSharp.Core.HgFnCacheStore.GetDataFiles() in d:\projects\hgsharp\src\HgSharp.Core\HgFnCacheStore.cs:line 49
       at HgSharp.Server.HgHttpServer.ExecuteStreamOut(NameValueCollection arg) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 559
       at HgSharp.Server.HgHttpServer.<>c__DisplayClass2`1.<Args>b__1(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 92
       at HgSharp.Server.HgHttpServer.<>c__DisplayClass8.<ReadCommand>b__7(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 143
       at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 152    at System.Linq.Enumerable.Last[TSource](IEnumerable`1 source)
       at HgSharp.Core.HgPathEncoder.auxencode(String path) in d:\projects\hgsharp\src\HgSharp.Core\HgPathEncoder.cs:line 220
       at HgSharp.Core.HgPathEncoder.EncodePath(String path) in d:\projects\hgsharp\src\HgSharp.Core\HgPathEncoder.cs:line 65
       at HgSharp.Core.HgFnCacheStore.<GetDataFiles>b__2(String f) in d:\projects\hgsharp\src\HgSharp.Core\HgFnCacheStore.cs:line 51
       at System.Linq.Enumerable.<>c__DisplayClass7_0`3.<CombineSelectors>b__0(TSource x)
       at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()
       at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
       at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__1.MoveNext()
       at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
       at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
       at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
       at HgSharp.Core.HgFnCacheStore.GetDataFiles() in d:\projects\hgsharp\src\HgSharp.Core\HgFnCacheStore.cs:line 49
       at HgSharp.Server.HgHttpServer.ExecuteStreamOut(NameValueCollection arg) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 559
       at HgSharp.Server.HgHttpServer.<>c__DisplayClass2`1.<Args>b__1(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 92
       at HgSharp.Server.HgHttpServer.<>c__DisplayClass8.<ReadCommand>b__7(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 143
       at HgSharp.Server.HgHttpServer.<>c__DisplayClassb.<ExceptionHandler>b__a(HgHttpCommandContext httpContext) in d:\projects\hgsharp\src\HgSharp.Server\HgHttpServer.cs:line 152
    

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Feb, 2019 09:20 AM
26 Nov, 2018 01:47 PM
16 Nov, 2018 07:51 PM
06 Nov, 2018 04:30 PM
24 Oct, 2018 07:57 AM

 

20 Jul, 2018 11:07 PM
05 Jul, 2018 10:53 AM
27 May, 2018 01:33 AM
14 May, 2018 03:38 PM
04 May, 2018 07:45 AM
28 Feb, 2018 07:08 AM