Server has stopped working "The document id cannot be null"

I have been deploying for some time now with no problems, one day recently they just stopped and I am getting the following error:

Failed: Deploy
2015-09-15 03:52:30 ERROR One or more errors occurred. System.ArgumentNullException: The document id cannot be null
Parameter name: id
Server stack trace:
at Raven.Client.Document.DocumentSession.Load[T](String id) in c:\Builds\RavenDB-Stable\Raven.Client.Lightweight\Document\DocumentSession.cs:line 206
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at System.Linq.Enumerable.WhereEnumerableIterator1.MoveNext()
at System.Collections.Generic.List1..ctor(IEnumerable1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Octopus.Server.Tasks.Deploy.DeploymentControllerActivity.<>c__DisplayClassb.<LoadDeployment>b__8(IDocumentSession session) in c:\w\e6923628be6eaf72\source\Octopus.Server\Tasks\Deploy\DeploymentControllerActivity.cs:line 74 at Octopus.Core.Persistance.UnitOfWorkFactory.<>c__DisplayClass11.b__0(IDocumentSession session) in c:\w\e6923628be6eaf72\source\Octopus.Core\Persistance\UnitOfWorkFactory.cs:line 44
at Octopus.Core.Persistance.UnitOfWorkFactory.InSession(Action1 callback) in c:\w\e6923628be6eaf72\source\Octopus.Core\Persistance\UnitOfWorkFactory.cs:line 33 at Octopus.Core.Persistance.UnitOfWorkFactory.InSession[TReturn](Func2 callback) in c:\w\e6923628be6eaf72\source\Octopus.Core\Persistance\UnitOfWorkFactory.cs:line 47
at Octopus.Server.Tasks.Deploy.DeploymentControllerActivity.d__2.MoveNext() in c:\w\e6923628be6eaf72\source\Octopus.Server\Tasks\Deploy\DeploymentControllerActivity.cs:line 30
Exception rethrown at [0]:
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
at Octopus.Shared.Activities.ActivityRuntime.d__5.MoveNext() in c:\w\e6923628be6eaf72\source\Octopus.Shared\Activities\ActivityRuntime.cs:line 56

Any help in debuggin this issue would be much appreciated.

Thanks,

Trent

Hi Trent,

I’m sorry to hear you’re experiencing problems.

I think it’s worth trying a reset of your RavenDB indexes. The procedure for doing so is here.

Please let me know if this resolves the problem?

Also, what version of Octopus Deploy are you using?

Regards,
Michael

Hi Trent,

I apologize, I provided you with outdated instructions for resetting the RavenDB indexes. There is a nicer way via the Octopus Manager.

Regards,
Michael

Awesome thank you Michael. I used the first option to reset the Raven indexs and this fixed the issue.

Thanks for your help,

Trent

Great news!

Happy deployments,
Michael