mirror of
https://github.com/wiremock/WireMock.Net.git
synced 2026-01-11 22:30:41 +01:00
Index must be within the bounds of the List - Bug #202
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gregoks on GitHub (Aug 21, 2019).
Originally assigned to: @StefH on GitHub.
hi,
I'm getting the following error when using the MyGet version - 1.0.27-11567
I'm using it with the following properties:
MaxRequestLogCount = 100
RequestLogExpirationDuration = 6
Can you please check?
Thanks :)
Greg
@StefH commented on GitHub (Aug 21, 2019):
Please try
1.0.28-ci-11744@gregoks commented on GitHub (Aug 22, 2019):
I have tried using version 1.0.28 and its still happening, 1.0.28 was deployed later than 1.0.28-ci-11744?
@StefH commented on GitHub (Aug 22, 2019):
A possible fix for your problem is only present in preview version : 1.0.28-ci-11744
@gregoks commented on GitHub (Sep 4, 2019):
hi @StefH , this issue still happens in version 1.0.31-ci-11865. can you please check?
@gregoks commented on GitHub (Nov 17, 2019):
hi @StefH ,
I'm using version 1.0.37 and still getting the following error:
HttpStatusCode set to 500 System.ArgumentOutOfRangeException: Index must be within the bounds of the List. Parameter name: index at System.Collections.Generic.List
1.Insert(Int32 index, T item) at System.Collections.ObjectModel.ObservableCollection1.InsertItem(Int32 index, T item) at WireMock.Util.ConcurrentObservableCollection`1.InsertItem(Int32 index, T item) at WireMock.Owin.WireMockMiddleware.LogRequest(LogEntry entry, Boolean addRequest) at WireMock.Owin.WireMockMiddleware.InvokeInternal(HttpContext ctx) at WireMock.Owin.GlobalExceptionMiddleware.InvokeInternal(HttpContext ctx)this is how I start the wiremock:
var fluentMockServer = StandAloneApp.Start(new FluentMockServerSettings
{
Port = port,
StartAdminInterface = true,
StartTimeout = 5000,
MaxRequestLogCount = 100,
RequestLogExpirationDuration = 6,
Logger = new WireMockLogger(port)
});
WireMockLogger is my class and I assign to an open port.
@StefH commented on GitHub (Nov 17, 2019):
It maybe has to do with a lot of (fast) requests. Or maybe the logic for MaxRequestLogCount and RequestLogExpirationDuration is wrongly implemented. I need to make a sample where your settings are used and where I use HttpClient to send 100+ requests.
@StefH commented on GitHub (Nov 19, 2019):
I've created a example console app:
https://github.com/WireMock-Net/WireMock.Net/tree/master/examples/WireMock.Net.Console.RequestLogTest
Can you take a look if this is the code you use? And make a PullRequest if you have different code.
@gregoks commented on GitHub (Nov 20, 2019):
@StefH looks ok. did the error recreated when you ran your code?
@StefH commented on GitHub (Nov 20, 2019):
I had no errors when running this example code, but you can try yourself and maybe use your own logger?
@StefH commented on GitHub (Jul 7, 2020):
@gregoks
Did you have any luck solving this issue yet ?
@gregoks commented on GitHub (Jul 10, 2020):
Sorry, havent got around to handle it. Im not sure it still happens though
@StefH commented on GitHub (Sep 6, 2020):
Hello @gregoks
I'm closing this issue for now. It could be that this is related to https://github.com/WireMock-Net/WireMock.Net/issues/478, so please take a look at that issue + solution.
In case you encounter this again, please raise a new issue.