Re: [Firebase] Firebase & NodeJS

148 views
Skip to first unread message
Message has been deleted

Jacob Wenger

unread,
Feb 5, 2016, 12:51:26 PM2/5/16
to fireba...@googlegroups.com
Huh, that's not good. That is really all the code in your file and you get that error when running node file.js? Can you let us know what version of the Firebase SDK you are using as well as what version of Node.js you are using?

Cheers,
Jacob

On Fri, Feb 5, 2016 at 5:07 AM, Cedrik <cedr...@gmail.com> wrote:
Hello everyone, hope you are doing well this Friday.

I need some help with my firebase project, I've been doing all the frontend fine, and everything is working, but now I want to make some request to Firebase from the backend with NodeJS, and I'm unable to make it work.

I created a very simple node test that only has this code:
var Firebase = require('firebase');
var rootRef = new Firebase('https://firebase-id.firebaseio.com');


And I receive an error just by doing that, I don't even have the time to make any requests or complete my code:
\node_modules\firebase\lib\firebase-node.js:29
function yb(a){a.ue||(a.ue=!0,$a(a.wg,a))}nb.prototype.wg=function(){for(;this.Ba&&this.Ba.length;){var a=this.Ba;this.Ba=null;for(var b=0;b<a.length;b++)wb(this,a[b],this.N,this.Pf)}this.ue=!1};function wb(a,b,c,d){if(c==rb)b.Gf(d);else{if(b.o)for(;a&&a.vd;a=a.Ga)a.vd=!1;b.If(d)}}function Ab(a,b){a.vd=!0;$a(function(){a.vd&&Bb.call(null,b)})}var Bb=Xa;function sb(a){la.call(this,a)}ka(sb,la);sb.prototype.name="cancel";var Cb=Cb||"2.4.0";function y(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function z(a,b){if(Object.prototype.hasOwnProperty.call(a,b))return a[b]}function Db(a,b){for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&b(c,a[c])}function Eb(a){var b={};Db(a,function(a,d){b[a]=d});return b}function Fb(a){return"object"===typeof a&&null!==a};function Gb(a){var b=[];Db(a,function(a,d){da(d)?Na(d,function(d){b.push(encodeURIComponent(a)+"="+encodeURIComponent(d))}):b.push(encodeURIComponent(a)+"="+encodeURICompone


Error: Firebase (2.4.0) INTERNAL ASSERT FAILED: Missing index implementation for size
    at
Error (native)
    at
Jb (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:29:1173)
    at
Ib (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:29:1144)
    at d
:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:76:697
    at ma
(d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:8:548)
    at
Je (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:76:659)
    at de
.h.W (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:81:197)
    at de
.h.H (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:81:425)
    at de
.h.H (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:81:403)
    at
Ji (d:\Sync\QuipoQuiz\v2.0.0\node_modules\firebase\lib\firebase-node.js:219:69)

Hope someone can help me resolve this as I've searched for this particular problem in Google, and I can't find anything that is related to my problem.

Thank's!

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/efd71304-a6f2-4eba-a2c1-23ecf1d1fbd8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kato Richardson

unread,
Feb 5, 2016, 1:02:45 PM2/5/16
to Firebase Google Group
Also, please verify you're using the version installed by npm install, and not a bower or downloaded version of the SDK.

Cedrik

unread,
Feb 5, 2016, 3:29:33 PM2/5/16
to Firebase Google Group
My problem is related to another node package that is causing firebase to throw that error, I will start over my files one by one until I find what is causing this, thanks a lot for your help.

Cedrik

unread,
Feb 5, 2016, 3:29:44 PM2/5/16
to Firebase Google Group
After your reply I started all over again and I dont know why now it worked, I deleted everything and whote it again and it worked, the version of Firebase is 2.4.0 and my node version is 4.2.6, now I received another error after calling this function:
getList = function(callback) {
  rootRef
.child('list').orderByChild('order').on('value', function(snapshot) {
   
if (callback != null) {
     
return callback(snapshot.val());
   
}
 
});
};

The error say that can't read the property 'n' of undefined, and when I check in the file it's referring about the N of .on, strange. What could be wrong there?
TypeError: Cannot read property 'n' of undefined

Jacob Wenger

unread,
Feb 5, 2016, 6:16:39 PM2/5/16
to fireba...@googlegroups.com
Hey Cedrik,

Please provide a complete, minimal repro. The type error you mention is not Firebase specific and it's a bit hard to debug this without a full repro.

Cheers,
Jacob

Cedrik

unread,
Feb 6, 2016, 10:39:34 AM2/6/16
to Firebase Google Group
Sorry, I though I have closed this post, can someone do so? The bug wasn't because of the firebase node package.
Thank you everyone for your help.
Reply all
Reply to author
Forward
0 new messages