Giter Site home page Giter Site logo

Comments (15)

arunoda avatar arunoda commented on July 30, 2024

Okay. I'll look at this.

from fast-render.

abernix avatar abernix commented on July 30, 2024

Ok. The change comparison here for livedata shows what's up (among a couple other small, unrelated things): meteor/meteor@release-1.3.2...release-1.3.2.1

from fast-render.

arunoda avatar arunoda commented on July 30, 2024

BTW: This seems to be coming from FlowRouter. Could you try the flow-router-ssr version and see this is there too?

from fast-render.

abernix avatar abernix commented on July 30, 2024

Unfortunately, I'm using Blaze so I couldn't try flow-router-ssr.

Anyhow, yes, forgot to say that the error itself is from FlowRouter, but if I simply remove fast-render, everything works fine (with no other changes at all).

I concluded that since the changes were to livedata and that fast-render seemed to be what was working with livedata (by wrapping the _livedata_data method, which was changed in Meteor) that the error likely lay in FRender somewhere.

from fast-render.

abecks avatar abecks commented on July 30, 2024

Confirmed, routes are broken using Meteor 1.3.2.2 with FastRender + FlowRouter. Also using Blaze.

from fast-render.

abernix avatar abernix commented on July 30, 2024

@arunoda It appears that Meteor released this livedata change mistakenly in 1.3.2.1 (never marked recommended release) and 1.3.2.2 (which was recommended release for about 24 hours, but is no longer). They will be rolling it back in 1.3.2.3 and shelving it until 1.3.3 (which is where it was supposed to go).

As to whether this works in flow-router-ssr: I found your https://github.com/kadira-samples/meteor-data-and-react sample (Meteor 1.3 + flow-router-ssr + ReactMounter) and it worked fine when upgraded to 1.3.2.1. So it appears this problem will affect Meteor 1.3, fast-render, Blaze users.

from fast-render.

arunoda avatar arunoda commented on July 30, 2024

@abernix But, flow-router-ssr has the built in support for Fast Render.

from fast-render.

abernix avatar abernix commented on July 30, 2024

Right, I'm just saying that it appears flow-router-ssr works fine while flow-router + fast-render does not. Unfortunately, because of Blaze, flow-router-ssr is not a solution in my situation.

from fast-render.

abernix avatar abernix commented on July 30, 2024

The problem goes away if you get rid of any subscriptions that are specified in in your route definition. It's possible that FlowRouter is just incorrectly detecting reactive components now & throwing an error, thus breaking things.

But still, fast-render unit tests start failing under Meteor 1.3.2.1.

from fast-render.

TomFreudenberg avatar TomFreudenberg commented on July 30, 2024

Hi, not sure if this will bring some new info in addition but Roger marks some issues on local collection observer as well: see forum entry

from fast-render.

tmeasday avatar tmeasday commented on July 30, 2024

@mitar and @nathan-muir can probably provide some insight that may help solving this one. I suspect the issue is that with DDP batching, callbacks from various DDP messages may not run in the same tick that the message arrived.

from fast-render.

nathan-muir avatar nathan-muir commented on July 30, 2024

Hmm, I'm not a fast-render render user, so I've never looked into the details of how it works.

It looks like fast-render converts added's to changed if the document exists somewhere - It might just need to check self._bufferedWrites on these lines

from fast-render.

mitar avatar mitar commented on July 30, 2024

I had some comments on how this is implemented here. I think we could move to having complete client session established from the server. I didn't have time to do it in the past. Maybe it is time. ;-)

from fast-render.

abernix avatar abernix commented on July 30, 2024

@nathan-muir and @mitar, thanks for your input, and also your buffering addition to livedata – super awesome πŸŽ† and much appreciated. Hopefully the PR I just submitted will fix this, but I'd appreciate it if you could review my reasoning on it.

It appears to be two relatively harmless things throwing false positive errors.

  1. The package tests were failing because of a timing issue (since they're expecting the collection changes in the same tick as the livedata injection) and were fixed by changing them to be async with a delay of bufferedWritesInterval (5).
  2. For a similar tick reason (and as @tmeasday had thought), flow-router Tracker invalidation was throwing an exception.

... more details in pull request #167.

Discussion wise...

Contrary to what @nathan-muir had suggested, checking _bufferedWrites didn't seem to have an effect pro or con. However, should I change this to merge anything that is buffered in the same way as the _updatesForUnknownStores?

And @mitar, I didn't quite see where that stuff came into play, but honestly, this was my first trip down livedata lane. 😁 Perhaps we should discuss further?

And lastly, @arunoda of course, whatever you think - it's your package. There might be some double (unnecessary but harmless) flattening of collection data going on with the new DDP buffering.

from fast-render.

mitar avatar mitar commented on July 30, 2024

I didn't quite see where that stuff came into play, but honestly, this was my first trip down livedata lane. 😁 Perhaps we should discuss further?

So my is just hypothetical, I am not completely sure about it either. But the whole point would be that we would use DDP client code on the server to establish a real connection to the server, but from inside server. Then all the code for merging fields, keep state and so on would work without any changes, hopefully.

from fast-render.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.