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

PgSubscription failed in reactive code #18

Open
IcyEagle opened this issue Oct 11, 2017 · 0 comments
Open

PgSubscription failed in reactive code #18

IcyEagle opened this issue Oct 11, 2017 · 0 comments

Comments

@IcyEagle
Copy link

There is a problem with subscription within a reactive container (React framework used).

const MyComponentContainer = createContainer(() => { const sub = new PgSubscription('my_sub'); return {ready: sub.ready()}; }, MyComponent);

Stacktrace:
Error: Subscription failed! at new PgSubscription (numtel_pg.js?hash=fd09c3fa16444bc31c10791b57c23cdf3a72123d:80) at TradingScreen.js:30 at Object.getMeteorData (createContainer.jsx:33) at ReactMeteorData.jsx:89 at Tracker.Computation._compute (tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:339) at new Tracker.Computation (tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:229) at Object.Tracker.autorun (tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:604) at ReactMeteorData.jsx:76 at Object.Tracker.nonreactive (tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:631) at MeteorDataManager.calculateData (ReactMeteorData.jsx:75)

I investigated the issue. Implementation raises an exception when subscription with the same name/parameters already exist (since a new sub hasn't been created). Probably it's necessary to check active subscriptions to obtain ID.

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

1 participant