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

allReady does not work. #20

Closed
ElvishJerricco opened this issue Jun 7, 2016 · 19 comments
Closed

allReady does not work. #20

ElvishJerricco opened this issue Jun 7, 2016 · 19 comments

Comments

@ElvishJerricco
Copy link

With subs-cache 0.1.0 and meteor 1.2 or 1.3, it appears that the allReady reactive variable is not successfully set when subscriptions become ready.

screen shot 2016-06-07 at 12 25 45 am

ElvishJerricco added a commit to ElvishJerricco/meteor-subs-cache that referenced this issue Jun 23, 2016
@paranoico
Copy link
Collaborator

paranoico commented Dec 15, 2016

Hello @ElvishJerricco , I would like to know if this issue is related to setTimers problem.

I am retaking subs-cache maintenance and would like to know if it is still an issue.
Thanks in advance.

@ElvishJerricco
Copy link
Author

Sorry, this project has mostly left my brain. I don't think I can help much.

@paranoico
Copy link
Collaborator

@ElvishJerricco Thanks for your prompt answer, I am closing the issue for now.

Best Regards.

@nicooprat
Copy link

Has anyone found a solution? Looks like I'm having the same issue.

@paranoico
Copy link
Collaborator

Reopening until I confirm there is no issue with new JS version.

@nicooprat
Copy link

Any fix planned? Thanks!

@nicooprat
Copy link

When checking on #41 and tried with latest code, allReady.get() was working as expected.

@paranoico
Copy link
Collaborator

Thanks a lot @nicooprat

@nicooprat
Copy link

nicooprat commented Nov 4, 2017

To be more precise, it's now reactive, but sometimes allReady.get() still returns false although all subscriptions seem ready. I can't remember where I got this bit of code, but this workaround works (proving that allReady.get() is actually wrong):

_(Subs.cache).chain().values().map((x) => x.ready()).reduce((a,b) => a && b).value()

Subs being the var of my (only) SubsCache object of course.

Edit: allReady.get() and .ready() have the same issue btw.

@paranoico
Copy link
Collaborator

Hello,
So the issue still persist, right?

@nicooprat
Copy link

Yes, looks like... It happens sometimes, can't get a reproducible test case for now :/

@janat08
Copy link
Contributor

janat08 commented Apr 11, 2018

This happens reliably in [/currency/:slug] of blockrazor on Blockrazor/blockrazor#1052 (at that commit cache limit is 10, and that pages has over that amount of subscriptions in total, also routes.js subscriptions property for that route contains bad subscription for "summaries".

@paranoico
Copy link
Collaborator

We have seen different behavior than can be originated from this component and seems to be related to Meteor update, mainly the differences come when upgrading from Meteor 1.5.x to 1.6.x.

Here we have no more information on how to reproduce int this, we are currently still trying to find the specific code woth problem.

@janat08
Copy link
Contributor

janat08 commented Apr 11, 2018

Blockrazor/blockrazor#1052 reproduces this on route [/currency/:slug].

@thebarty
Copy link

Same problem over here.

Subscribing like

// using Blaze Components
onCreated() {
  super.onCreated()
  // TemplateLevel autorun
  this.autorun(() => {
    globalSubscriptionManager.subscribe('sub1')
    globalSubscriptionManager.subscribe('sub2')
  })
}

Problem: globalSubscriptionManager.ready() acts unreliable and after clicking a few links in the ui returns "false"

@paranoico
Copy link
Collaborator

Do you have more information on how to reproduce it? It would be helpful.

@thebarty
Copy link

thebarty commented Aug 27, 2018

Hi guys,

just letting you know: I switched to using the original https://github.com/kadirahq/subs-manager which works much more stable for me.

There seems to be something wrong in the codebase. For me it is globalSubscriptionManager .ready() that acts totally unreliable. Actually all references to the individual subscriptions (which I get via globalSubscriptionManager.subscribe() return (ready()===true). BUT still the global globalSubscriptionManager .ready() returns false.

The bug exists in this package and also in https://atmospherejs.com/blockrazor/subscache-c4.

@paranoico
Copy link
Collaborator

Hello @thebarty,

Sorry but what globalSubscriptionManager do you mean?

ulion added a commit to ulion/meteor-subs-cache that referenced this issue Feb 17, 2019
paranoico added a commit that referenced this issue Feb 20, 2019
Fix allReady not updated issue #20
@paranoico
Copy link
Collaborator

Closing again for now, after PR from @ulion

Thank you.

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

No branches or pull requests

5 participants