-
-
Notifications
You must be signed in to change notification settings - Fork 76
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
Error: stubFence cannot lock #133
Comments
Hello, I am having the exact issue. Is there a resolution for this? Thanks! |
Possibly a corrupted local storage. Remove everything with the GrounDB key. |
The same error in Safari is: In both Safari and Chrome it seems to be called by not initializing at exactly the right time with Ground.methodResume at startup, then later correctly calling Ground.methodResume on the method in question, then invoking that method while disconnected (such that it ought to be cached), then quitting the browser with cached method invocations still pending. Upon startup, the error is thrown. The error goes away if you clear just the method storage key/value pair: (meaning you don't need to remove not everything) But unfortunately this also discards any pending method If you haven't found another work-around, try changing how you use Ground.methodResume. Especially, make sure you call it with an array -- NOT with an iterator (e.g., _.each) or similar |
In particular, this code block causes the error in our app for "method18" invocations: But replacing this block with any one of the following avoids the error The best I can come up with so far is that it's a very subtle ordering/timing bug which the four methods at the end disturb positively, perhaps in different ways. |
I've released |
As for the exceptions mentioned above. For me this errors disappeared when I put the |
I'm developing an application which uses ground:db to ensure no data is lost when the app is offline. When testing, I noticed that when leaving the app open all methods resume fine, but when I close the tab in Chrome when offline and open it again when online, the methods aren't resumed and I get the following error:
Exception in setTimeout callback: Error: stubFence cannot lock since another stubFence is running at _DDP.stubFence (http://localhost:5000/packages/raix_stubfence.js?c21ef205f1a9abdb7017f81e3d264d153d4ec916:70:11) at eachWaitingMethods (http://localhost:5000/packages/ground_db.js?04a81d36d3ec255367d52a6cc18983233c5992d4:803:34) at Array.forEach (native) at Object._.each._.forEach [as each] (http://localhost:5000/packages/underscore.js?fa590de5090ceb4a42555b48562fd8f8e7035758:157:11) at resumeWaitingMethods (http://localhost:5000/packages/ground_db.js?04a81d36d3ec255367d52a6cc18983233c5992d4:788:15) at loadMissingMethods (http://localhost:5000/packages/ground_db.js?04a81d36d3ec255367d52a6cc18983233c5992d4:860:7) at storageLoadMissingMethods (http://localhost:5000/packages/ground_db.js?04a81d36d3ec255367d52a6cc18983233c5992d4:847:5) at Store.localStorage.getItem (http://localhost:5000/packages/ground_localstorage.js?89b38571d614dd46fea10ebc05d0ad97d4ae3c2e:233:7) at loadMissingMethods (http://localhost:5000/packages/ground_db.js?04a81d36d3ec255367d52a6cc18983233c5992d4:835:19) at _loadMethods (http://localhost:5000/packages/ground_db.js?04a81d36d3ec255367d52a6cc18983233c5992d4:854:3)
I'm not sure if this error is in my setup or related to the package.
The text was updated successfully, but these errors were encountered: