Error removing "delete" events

In need of help please. I need to un-delete five documents.
I can see the “delete” event…
{
ts: 1600974370490000,
action: "delete",
document: Ref(Collection("Mark"), "264945396321688075"),
data: null
}
But when I try to delete that event using:
Remove(Ref(Collection("Mark"), "264945396321688075"), 1600974370490000, "delete")
I get Error: null is not an object (evaluating ‘n.error’) in the shell.
Any suggestions appreciated. I really need these docs back!

Just tried removing an “update” event on a different document and got the same error. This is in the web shell.
Going to try executing the same FQL directly from my app.

Interesting—I was able to recover my documents via FQL executed directly from my app. I noticed though that my function returned null and not

An object containing the metadata of the remove operations.

as the docs suggest. I guess the error is something to do with the web shell specifically?

Hi @ohawkridge,

Was not able to reproduce the issue you reported:

Paginate(Events(Ref(Collection("Mark"), "264945396321688075")))
{ data:
   [ { ts: 1601037233230000,
       action: 'create',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val1: 1 } },
     { ts: 1601037257620000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val2: 2 } },
     { ts: 1601037264462000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val3: 3 } },
     { ts: 1601037267580000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val4: 3 } },
     { ts: 1601037273060000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val4: 4 } },
     { ts: 1601037314800000,
       action: 'delete',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: null } ] }
> 
> 
> Remove(Ref(Collection("Mark"), "264945396321688075"), 1601037314800000, "delete")
null
> Paginate(Events(Ref(Collection("Mark"), "264945396321688075")))
{ data:
   [ { ts: 1601037233230000,
       action: 'create',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val1: 1 } },
     { ts: 1601037257620000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val2: 2 } },
     { ts: 1601037264462000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val3: 3 } },
     { ts: 1601037267580000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val4: 3 } },
     { ts: 1601037273060000,
       action: 'update',
       document: Ref(Collection("Mark"), "264945396321688075"),
       data: { val4: 4 } } ] }

Do you have more details, I would try to get the same issue and investigate further.

Thanks,

Luigi

Hi @Luigi_Servini, thanks for taking a look.

I’m not sure what else I can tell you. I’ve now tried ‘Remove’ on other events and all of them throw

Error: null is not an object (evaluating 'n.error')

in the web shell. Since the same FQL ran fine outside the web shell the problem must be there? Anything you can suggest to debug further?

Hi @ohawkridge,

Was able to reproduce the issue, but in my case, the delete event is thrown away and document undeleted.
Is the same in your case? May you check?

Luigi

I tried creating a new document and rolling back an update and a delete event.

In both cases, the console gave the same error I mentioned above. However, the document was indeed rolled back and undeleted.

So the action was successful despite the console message.

Cheers for following up.

Console message is little confusing. We got a ticket to address this.

Cool. I got my documents back so I’m happy.

Glad you folks are on it.