Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't set timers inside simulations #3

Closed
dw72 opened this issue Jan 28, 2016 · 2 comments
Closed

Can't set timers inside simulations #3

dw72 opened this issue Jan 28, 2016 · 2 comments

Comments

@dw72
Copy link

dw72 commented Jan 28, 2016

When I do Collection.remove(id) in meteor method and Collection is used in Pagination then document is deleted ok but i have this exception in console:

Exception in queued task: Error: Can't set timers inside simulations at withoutInvocation (http://localhost:3000/packages/meteor.js?9730f4ff059088b3f7f14c0672d155218a1802d4:427:13) at bindAndCatch (http://localhost:3000/packages/meteor.js?9730f4ff059088b3f7f14c0672d155218a1802d4:435:33) at Object._.extend.setTimeout (http://localhost:3000/packages/meteor.js?9730f4ff059088b3f7f14c0672d155218a1802d4:451:23) at Object.cachedSub.delayedStop (http://localhost:3000/packages/ccorcos_subs-cache.js?e7ce9a57920f4ba6ca11739375ab4895358435aa:211:44) at http://localhost:3000/packages/ccorcos_subs-cache.js?e7ce9a57920f4ba6ca11739375ab4895358435aa:202:30 at http://localhost:3000/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:310:31 at Object.Tracker.nonreactive (http://localhost:3000/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:615:12) at Tracker.Computation.invalidate (http://localhost:3000/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:309:15) at Tracker.Dependency.changed (http://localhost:3000/packages/tracker.js?7776276660c988c38fed448d8262b925dffb5bc3:443:30) at http://localhost:3000/packages/minimongo.js?cdf1a26cf7719fa9471a8017c3defd5aea812727:407:13

This may be related to #4 in ccorcos:subs-cache nad this #10 in ccorcos:subs-cache

@Kurounin
Copy link
Owner

The problem is the fact that in ccorcos:subs-cache package on delayedStop function the Meteor.setTimeout is used, which leads to an error when trying to do a simulation of a document removal from a collection on client side.
For now I'd suggest leaving the remove call only on server side, so the error isn't triggered. When I have time I'll setup a meteorpad demo and post the bug on https://github.com/ccorcos/meteor-subs-cache or, if you can, please post it yourself.

@Kurounin
Copy link
Owner

I've removed the ccorcos:subs-cache package since it is no longer maintained.

Update to latest version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants