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

[2.2.1] Problem after update of document and Tracker recomputation for tags update #228

Closed
tcastelli opened this issue Jan 6, 2017 · 12 comments
Labels
bug

Comments

@tcastelli
Copy link

@tcastelli tcastelli commented Jan 6, 2017

Have found this error on the browser console with 2.2.1(not happening with 2.2.0 or previous) where after updating a document (through autoform) multiple errors are printed:

Error: Exception from Tracker recompute function:


> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: TypeError: value is null


> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: ElementAttributesUpdater.prototype.update@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1425:7
materializeTag/updateAttributes@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1590:7
viewAutorun/</<@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1934:18
Template._withTemplateInstanceFunc@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:3746:12
viewAutorun/<@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1932:14
Blaze._withCurrentView@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:2273:12
viewAutorun@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1931:12
Tracker.Computation.prototype._compute@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:339:5
Tracker.Computation.prototype._recompute@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:358:9
Tracker._runFlush@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:523:9
onGlobalMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:401:11
run@http://localhost:3000/packages/meteorhacks_zones/assets/zone.js?1483663312731:151:14
zoneBoundFn@http://localhost:3000/packages/meteorhacks_zones/assets/tracer.js?1483663312731:163:14



> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: Exception from Tracker recompute function:


> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: TypeError: value is null


> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: ElementAttributesUpdater.prototype.update@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1425:7
materializeTag/updateAttributes@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1590:7
viewAutorun/</<@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1934:18
Template._withTemplateInstanceFunc@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:3746:12
viewAutorun/<@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1932:14
Blaze._withCurrentView@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:2273:12
viewAutorun@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1931:12
Tracker.Computation.prototype._compute@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:339:5
Tracker.Computation.prototype._recompute@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:358:9
Tracker._runFlush@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:523:9
onGlobalMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:401:11
run@http://localhost:3000/packages/meteorhacks_zones/assets/zone.js?1483663312731:151:14
zoneBoundFn@http://localhost:3000/packages/meteorhacks_zones/assets/tracer.js?1483663312731:163:14



> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: Exception from Tracker recompute function:


> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: TypeError: value is null


> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2
  reporters.js:67:7
Error: ElementAttributesUpdater.prototype.update@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1425:7
materializeTag/updateAttributes@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1590:7
viewAutorun/</<@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1934:18
Template._withTemplateInstanceFunc@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:3746:12
viewAutorun/<@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1932:14
Blaze._withCurrentView@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:2273:12
viewAutorun@http://localhost:3000/packages/blaze.js?hash=9d08dd7dde99958947679827a947134cdf2e4f12:1931:12
Tracker.Computation.prototype._compute@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:339:5
Tracker.Computation.prototype._recompute@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:358:9
Tracker._runFlush@http://localhost:3000/packages/tracker.js?hash=9f8a0cec09c662aad5a5e224447b2d4e88d011ef:523:9
onGlobalMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:401:11
run@http://localhost:3000/packages/meteorhacks_zones/assets/zone.js?1483663312731:151:14
zoneBoundFn@http://localhost:3000/packages/meteorhacks_zones/assets/tracer.js?1483663312731:163:14



> Before: 29727ms (diff: 29727ms)
usePostMessage@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:410:5
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:439:3
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:292:2
@http://localhost:3000/packages/meteor.js?hash=e3f53db3be730057fed1a5f709ecd5fc7cae1229:11:2

The page gets updated with the new values from the document updated and everything seems to be working, but it sure seems annoying to have all these TypeError: value is null over there.

My autoform is quite simple so I'm guessing the error will also happen with normal forms. It looks quite like this:

 {{#autoForm schema=Post singleMethodArgument=true id="updatePost" doc=p type="method-update" meteormethod="updatePost"}}
            {{> afQuickField name='_id' value=p._id label=false}}
            <h2>{{_ 'title' }}</h2>           
            {{> afQuickField name='title' label=false value=p.title class="full-width"}}             
            
            <label>{{_ 'category'}}</label>
            {{> afQuickField name="type" id="categoryselect" value=p.type 
                            options=categoryOptions label=false class="full-width" }}
           <label>{{_ 'text'}}</label>
            {{> afQuickField name='text' value=p.text rows=6 label=false class="full-width"}}

           <button type="submit" class="full-width btn-large">{{_ 'update' }}</button>
 
{{/autoForm}}
@mitar
Copy link
Collaborator

@mitar mitar commented Jan 6, 2017

Can you please create a small reproduction which could be used as a test case? So something self-contained?

@mitar mitar added the bug label Jan 6, 2017
@tcastelli
Copy link
Author

@tcastelli tcastelli commented Jan 6, 2017

Sure, I have created a simple reproduction repo, Have tested updates of both firefox 50 and latest chrome in Windows 10 x64 and the error appears consistently.

@mitar
Copy link
Collaborator

@mitar mitar commented Jan 6, 2017

That's great progress. Can you make a reproduction without external dependencies? It is hard to make a unit test case with those.

@tcastelli
Copy link
Author

@tcastelli tcastelli commented Jan 6, 2017

What kind of dependencies are valid in this case? (I know I have to take out autoForm for example), but are the other packages like validated-method and simple-schema also considered "external dependencies",? (they are pretty common and handy for methods validation at least)

@tcastelli tcastelli closed this Jan 6, 2017
@tcastelli tcastelli reopened this Jan 6, 2017
@mitar
Copy link
Collaborator

@mitar mitar commented Jan 6, 2017

I mean, yes. Ideally it would be just a snippet of Blaze template which fails.

@mitar
Copy link
Collaborator

@mitar mitar commented Jan 6, 2017

(I mean, because I suspect that validated-method and simple-schema are not a reason for this bug. If there is a bug which depends on them, then probably dependency is OK.)

@mitar
Copy link
Collaborator

@mitar mitar commented Jan 6, 2017

OK, it seems the issue is label=false. What does this do? With new version this is converted to label=null. Is this then rendered as an attribute? Is the intent to suppress label attribute?

@tcastelli
Copy link
Author

@tcastelli tcastelli commented Jan 6, 2017

Yes, in theory label must not appear with label=false. I have updated the repo after removing quite a lot of dependencies (I can continue but probably is something related to autoForm in this case).

@mitar mitar closed this in f579165 Jan 6, 2017
@mitar
Copy link
Collaborator

@mitar mitar commented Jan 6, 2017

I think I fixed it. Can you try master version?

@tcastelli
Copy link
Author

@tcastelli tcastelli commented Jan 6, 2017

Sure give me some minutes and I'll test it against master

@tcastelli
Copy link
Author

@tcastelli tcastelli commented Jan 6, 2017

Perfect, just tried it and seems to be fixed! Thanks :)

@mitar
Copy link
Collaborator

@mitar mitar commented Jan 12, 2017

Released as 2.3.0.

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

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.