I have a template helper that access a collection in my app., but I have turned off reactivity:
Template.homeBoxGroupsTpl.helpers({
boxes: function () {
return Boxes.find({},
{
sort: {
order: 1
},
reactive: (Session.get("homeCanvasTplReactive") || false)
}
);
}
});
After I insert a new element on my page, that in turn updates the collection, Meteor will throw an error in the browser console:
Error: Exception from Tracker recompute function: reporters.js?1429904535194:67
Error: Error: Bad index in range.getMember: 16
at DOMRange.getMember (http://tidee-vm/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:586:11)
at http://tidee-vm/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2727:45
at Object.Tracker.nonreactive (http://tidee-vm/packages/tracker.js?6d0890939291d9780f7e2607ee3af3e7f98a3d9c:593:12)
at Object.Blaze.Each.eachView.onViewCreated.eachView.stopHandle.ObserveSequence.observe.changedAt (http://tidee-vm/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2721:17)
at http://tidee-vm/packages/observe-sequence.js?0532a9dd76dd78f543eb4d79a1e429df186d8bde:313:21
at Function._.each._.forEach (http://tidee-vm/packages/underscore.js?0a80a8623e1b40b5df5a05582f288ddd586eaa18:164:22)
at diffArray (http://tidee-vm/packages/observe-sequence.js?0532a9dd76dd78f543eb4d79a1e429df186d8bde:299:5)
at http://tidee-vm/packages/observe-sequence.js?0532a9dd76dd78f543eb4d79a1e429df186d8bde:147:9
at Object.Tracker.nonreactive (http://tidee-vm/packages/tracker.js?6d0890939291d9780f7e2607ee3af3e7f98a3d9c:593:12)
at http://tidee-vm/packages/observe-sequence.js?0532a9dd76dd78f543eb4d79a1e429df186d8bde:121:15
Any ideas how to debug this, or is it a Meteor issue?
Meteor's error messages are horrible in all browsers but Chrome, because Meteor expects stack traces to include the error messages, but this is only done by Chrome. I hate to say this, but you'll probably have to use Chrome when debugging a Meteor app. :(
I do not have the solution, but I too encountered the same error, and was able to solve for my case, so posting it, hoping it helps you debug the issue (although this hardly seems to be of any help). The cause was use of .length. I had a large array (name of array: data), and to make it short (decrease length of arrray), I was assigning data.length = 5, which was somehow causing the error, and meteor helper did not work as expected. Removing that line worked for me, and I accomplished shortening of array by a for loop, and storing first five elements in a different variable.
I have faced similar problem too :(
I was able to resolve it by giving unique names to Tempaltes, its corresponding Helpersobject's methods in .js file and Mongo DataBase object(s) names.
Hope it might work for you too :)
For me, I was getting this error from it saying ReactionProduct.selectedVariant() is null on one of Meteor's cycles.
I just handled the null case with:
if (ReactionProduct.selectedVariant() === null) {
return;
}
and it's working out for me.
Related
I’ve got an angular/node.js application that uses firebase functions and blockchain in the back end.
I’m getting an error when it tries to add an object to the blockchain:
Error: 5 NOT_FOUND: Resource not found (resource=blockchain-transactions)
This is coming from this line here:
const pubsub = new PubSub();
pubsub.topic(‘blockchain-transactions').publisher().publish(signedBlockTransaction);
The call to publish(signedBlockTransaction) is throwing the error.
All I can understand about this error is that it’s looking for a resource called ‘blockchain-transaction’ and it can’t find it. But beyond this, I’m not sure why it can’t find it or how to fix it (I didn’t write the code).
One thing that may be affecting it is the following:
I was dealing with a different error which I managed to get by but I don’t know if I did it the right way. The error was:
Cannot read property ‘privatekey’ of undefined
…when trying to execute this line:
functions.config().blockchain.privatekey
It turns out .runtimeconfig.json was empty, literally only containing {}
So in an attempt to give it a private key, I went to my file id_rsa which contain a private key for something or other (I think github) and added it like so:
{
"blockchain": {
“privatekey": *** my private key ***
}
}
That got me past the first error, but I understood the private key I gave it probably isn’t the one it’s looking for.
So my question is: is the error I’m encountering now a consequence of the wrong private key? If not, what is the cause of the error, and how do I fix it?
Thanks.
I am getting below mentioned error in Browser Console. I have used Contact form 7 and Google Captcha in wordpress site.
(1) Uncaught Error: ReCAPTCHA placeholder element must be empty
(2) Uncaught error: invalid recaptcha client id: undefined
Can please assist me to fix these issues.
Remove this from the <head></head>. It’s redundant.
<script src='https://www.google.com/recaptcha/api.js'></script>
This is old, and might be a duplicate, but this is the page I found trying to solve my problem, so I figured I'd add something towards an answer here.
I was getting the "ReCAPTCHA placeholder element must be empty" error, and it was because the recaptcha script was being called multiple times. I was able to resolve this with a custom callback on the recaptcha's onload event:
var recaptchacalls = 0;
var onloadCallback = function(e) {
grecaptcha.render('cap-' + recaptchacalls, {
'sitekey' : '<SITE_KEY_HERE>'
});
recaptchacalls++;
};
Note the count of how many times the script is called, using that as a unique identifier for the specific container that we need to be empty.
I would venture a guess that the other error is related, non-specific identifiers in multiple calls resulting in actions being attempted on the wrong object.
My code was working fine until last night and suddenly I am getting this error and routes are not working at all.
middleware_stack.js:31Uncaught Error: Handler with name 'route' already exists.
for simple routes like this:
Router.route('/admin/dashboard', {
template:"adminDashboard"
});
Router.route('/admin/create/table', {
template:"create_table"
});
I cannot figure out the error, I have checked all the routes. Have anyone else faced this error?
This is a known issue. The problem occurs with recent versions of Google Chrome and Microsoft Edge (edit: also Firefox now).
It has been fixed by a recent iron router update, it should be fixed by meteor update iron:middleware-stack.
Edit: If the middleware-stack package rolls back when you restart the server, check #bigsan's comment
Edit: this issue was fixed in iron:middleware-stack 1.1.0 .
I have the same problem. Weirdly, I have this problem on Chrome 51 but not on Chrome 46. I guess this has to do with updates in the javascript engine, and I'll post here if I figure out what exactly.
In the meantime, the workaround I used was to explicitly add names to the routes. It doesn't matter what they are, they just have to be declared, otherwise iron-router think the name of the route is "route." So your code would become:
Router.route('/admin/dashboard', {
name: "Boaty_McBoatface",
template:"adminDashboard"
});
Router.route('/admin/create/table', {
name: "Guacamole",
template:"create_table"
});
First, have a look here and see when this error is thrown. So, actually I have not faced that error but I've read about it. Further have a look at the official guide and post. I see that you are trying to create a subdirectory to your route /admin. Usually, I do this by using this.render() function. Concerning the layout I use this.layout() so I think that if you use these functions and remove template:"adminDashboard". It will work.
I get these Deps errors from time to time and I can never figure out what they mean or what they're pointing to:
Exception from Deps afterFlush function function: SyntaxError: Unexpected identifier
at eval (native)
at http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:372:22
at Function.jQuery.extend.globalEval (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:373:7)
at jQuery.ajaxSetup.converters.text script (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9806:11)
at ajaxConvert (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:8873:18)
at done (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9293:15)
at callback (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9753:8)
at Object.send (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9759:7)
at Function.jQuery.extend.ajax (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9244:15)
at Function.jQuery._evalUrl (http://localhost:4000/packages/jquery.js?265926494aaa3929cd2e30da265211c5929f37a4:9409:16) debug.js:41
It thinks that there is a syntax error, but the only files it points to are jquery.js, which I HIGHLY doubt contain errors...
This error is caused by code in a Template helper somewhere that uses JQuery/a jquery plugin and is running code using eval which contains a syntax error in it, which is why it appears to come from JQuery itself.
There isn't much more than this to go off im afraid. It might be from ajax. Have a look at your chrome's network tab to see what is being downloaded just before this happens and see if it contains any javascript.
If it contains HTML when it should contain javascript check your Meteor paths, Meteor does not throw 404 errors, instead it serves out the main page's html, which may be why the error displays this way instead of a 404
I just came across the similar "afterFlush" error, and while my error was also rooted in a jQuery/plugin with Meteor, it had nothing to do with eval.
The issue circled back around to updating the DOM at the same time I was updating a reactive method, where Meteor was also updating the DOM reactively. I found this out, and removed the manual DOM manipulation, which made this error go away. Hope someone else finds this helpful...
i have a template with list of input-elements. their value is the title-element of an document. The input-elemnts have an keyup-event, so that when i wrote in the input-element, the title will updated. when i focus the input-elemnt, the Session-variable selectedDoc is set with the id of the document. until then it works. In another template i have a following function:
Template.content.isSelected = function () {
return !Session.equals("selectedDoc",null) ? 'small' : '';
}
When i used the function above in my code, the following error occurs.
when i focus an input-element and write something, after the first letter the the focus disappeared. the error occurs only by the first time, i focus an input-element.
what am I doing wrong? with Version 0.3.9 everything worked well.
thanks
What am I doing wrong?
You're not following Meteor or reading the changelog, so you haven't noticed the API changes.
If you read them, especially Spark, and adapt your code accordingly; your code will work on 0.4.