Error creating projection/query with multiple streams (EventStore: 1.0.1, EventStore.Client: 1.1.0)

I was trying to write a query with two streams and enabled ‘reorderEvents’.

Here is my query:

options({

            useEventIndexes: false,  reorderEvents: true,  processingLag: 50,              

});

fromStreams(['Stream1','Stream2'])

.when({

    $init: function () {

        return { count1: 0, }; // initial state

    },

  

    event_type1: function(s, e) {

        s.count1 += 1;

        return s;

    },

})

When above query is executed, it enters running state and never completes in screen. Also, below specified error is logged in the console:

[00096,20,11:35:06.485] Error while processing message EventStore.Projections.Core.Messages.ProjectionCoreServiceMessage+EventReaderIdle in queued handler ‘Projection Core #0’.

Operation is not valid due to the current state of the object.

[00096,20,11:35:06.485] Error while processing message EventStore.Projections.Core.Messages.ProjectionCoreServiceMessage+EventReaderEof in queued handler ‘Projection Core #0’.

Operation is not valid due to the current state of the object.

  1. How do I resolve above error? I am using EventStore version: 1.0.1 and EventStore.Client 1.1.0

  2. Is processingLag applied to every event in the stream?

Thanks in advance.

If this is run in dev version is the issue corrected? Projections have been in experimental state in previous releases and this may be a bug. The dev branch will be pushed to master hopefully within a week or so.

This was fixed in dev branch on May 8th.

Best regards,

Kostyantyn Pyatkivskyy

Thank you for the quick response.