DDP Error Meteor v3

I am migrating and testing my app to Meteor v3

I have sometimes this error :

if (this === DDPServer._getCurrentFence()) throw Error("Can't arm the current fence");

Do you know what is causing this ?

1 Like

Hey @dokithonon do you have a scenario when this happens? A reproduction would help us a lot there!

Also, thanks a lot for testing Meteor v3-beta!

Thanks for your reply.
This happens randomly when I update my code in development. I cannot reproduce it in a fresh new todo-app.
I will let you know if I can find a pattern that lead to the error.

I have the same problem in my application. I am trying to systematically reproduce the problem but it is not easy. Can anyone explain what the error is referring to and what it may depend on, so you can help us simulate it. Thank you

And a post about the fence: Meteor Explained and methods mechanisms - #2 by coagmano

It appears quite a lot and this makes impossible to test meteor 3.
I am happy to do a screen sharing with anyone willing to help

I am wondering if this line is not causing the fail :


I have a constant warning in Meteor v2.15 so I suppose when I update to Meteor v3. It fails.

1 Like

Even if it isn’t directly related to this line, it needs to be fixed. I’ll add this to our backlog.

Regarding the error, we need to find a way to reproduce it. I’ll also have a look at this.

Just checked this code in our current branch, and it’s already fixed there.

Are you having this issue on beta 6?

@denyhs if you run the tests in this branch of montiapm:agent, this error appears many times in the server logs. It seems like it is a bug with Meteor EnvironmentVariables.

1 Like

Yes beta 6. I have added Monti app on localhost and they also are logged into the apm

I still have this problem which prevents me from testing the meteor 3 beta version.
I have removed the package montiapm:agent but the error is still there

It seems that this is solved with meteor 3 beta 7

Maybe it was related to this fix : Subscribe stop crash by perbergland · Pull Request #13034 · meteor/meteor · GitHub

That’s good news!

Is it working even with montiapm:agent?

I have just added montiapm:agent

which leads to the following packages :

And this seems to work !
Thanks for your work