Export to GitHub

firephp - issue #190

TypeError: firephp.app is undefined


Posted on Jun 23, 2012 by Happy Dog

What versions and operating system are you using?

OS:win7 Firefox:13.0.1 Firebug:1.9.2 FirePHP Server Library: FirePHP Extension:0.7.1

What is the problem? I am receiving this error:TypeError: firephp.app is undefined

Line 491 I had received it before then I found firephp and that project was fixed. But I am receiving it again and I can't seem to figure it out. There isn't much info on this error on google.

What steps will reproduce the problem? 1.It happened after I added email verification with AJAX for an assignment 2. 3.

What is the expected output? What do you see instead? I want the for to reject an existing/registered email.

Please provide any additional information below. Located at: http://danielhughes77.aisites.com/IMD401/w5/a1/index.html

Attachments

Comment #1

Posted on Oct 11, 2012 by Massive Dog

I'm getting the same error, but under different circumstances. OS:win7 Firefox:15.0.1 Firebug:1.10.4 FirePHP Extension:0.7.1

Error can be reproduced on the following link: http://home.designscope.com.au/beta/allan_wolf_tasker/index.php

I get the following from the Firebug error list: Error: TypeError: firephp.app is undefined Source File: chrome://firephp/content/lib/firephp.js Line: 491 firephp.app.logger.debug("Adding FirePHP headers to request: " + httpChannel.URI.spec);

However if I set break on error in Firebug, it stops on line 16 of jquery-1.5.1.min.js (one of the js script libraries i've loaded) : (function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bUa})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;gi,typeof l==="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bN(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bN(a,c,d,e,"*",g));return l}function bM(a){return function(b,c){typeof b!=="string"&&(c=b,b="*");if(d.isFunction(c)){var e=b.toLowerCase().split(bB),f=0,g=e.length,h,i,j;for(;fj?"unshift":"push"}}}function bo(a,b,c){var e=b==="width"?bi:bj,f=b==="width"?a.offsetWidth:a.offsetHeight;if(c==="border")return f;d.each(e,function(){c||(f-=parseFloat(d.css(a,"padding"+this))||0),c==="margin"?f+=parseFloat(d.css(a,"margin"+this))||0:f-=parseFloat(d.css(a,"border"+this+"Width"))||0});return f}function ba(a,b){b.src?d.ajax({url:b.src,async:!1,dataType:"script"}):d.globalEval(b.text||b.textContent||b.innerHTML||""),b.parentNode&&b.parentNode.removeChild(b)}function _(a){return"getElementsByTagName"in a?a.getElementsByTagName("*"):"querySelectorAll"in a?a.querySelectorAll("*"):[]}function $(a,b){if(b.nodeType===1){var c=b.nodeName.toLowerCase();b.clearAttributes(),b.mergeAttributes(a);if(c==="object")b.outerHTML=a.outerHTML;else if(c!=="input"||a.type!=="checkbox"&&a.type!=="radio"){if(c==="option")b.selected=a.defaultSelected;else if(c==="input"||c==="textarea")b.defaultValue=a.defaultValue}else a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value);b.removeAttribute(d.expando)}}function Z(a,b){if(b.nodeType===1&&d.hasData(a)){var c=d.expando,e=d.data(a),f=d.data(b,e);if(e=e[c]){var g=e.events;f=f[c]=d.extend({},e);if(g){delete f.handle,f.events={};for(var h in g)for(var i=0,j=g[h].length;i=0===c})}function N(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function F(a,b){return(a&&a!==""?a+".":"")+b.replace(r,"`").replace(s,"&")}function E(a){var b,c,e,f,g,h,i,j,k,l,m,n,o,q=[],r=[],s=d._data(this,"events");if(a.liveFired!==this&&s&&s.live&&!a.target.disabled&&(!a.button||a.type!=="click")){a.namespace&&(n=new RegExp("(^|\.)"+a.namespace.split(".").join("\.(?:.\.)?")+"(\.|$)")),a.liveFired=this;var t=s.live.slice(0);for(i=0;i";d.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"}),b.innerHTML=j,a.insertBefore(b,a.firstChild),e=b.firstChild,f=e.firstChild,h=e.nextSibling.firstChild.firstChild,this.doesNotAddBorder=f.offsetTop!==5,this.doesAddBorderForTableAndCells=h.offsetTop===5,f.style.position="fixed",f.style.top="20px",this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15,f.style.position=f.style.top="",e.style.overflow="hidden",e.style.position="relative",this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5,this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i,a.removeChild(b),a=b=e=f=g=h=null,d.offset.initialize=d.noop},bodyOffset:function(a){var b=a.offsetTop,c=a.offsetLeft;d.offset.initialize(),d.offset.doesNotIncludeMarginInBodyOffset&&(b+=parseFloat(d.css(a,"marginTop"))||0,c+=parseFloat(d.css(a,"marginLeft"))||0);return{top:b,left:c}},setOffset:function(a,b,c){var e=d.css(a,"position");e==="static"&&(a.style.position="relative");var f=d(a),g=f.offset(),h=d.css(a,"top"),i=d.css(a,"left"),j=e==="absolute"&&d.inArray("auto",[h,i])>-1,k={},l={},m,n;j&&(l=f.position()),m=j?l.top:parseInt(h,10)||0,n=j?l.left:parseInt(i,10)||0,d.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):f.css(k)}},d.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),e=cf.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(d.css(a,"marginTop"))||0,c.left-=parseFloat(d.css(a,"marginLeft"))||0,e.top+=parseFloat(d.css(b[0],"borderTopWidth"))||0,e.left+=parseFloat(d.css(b[0],"borderLeftWidth"))||0;return{top:c.top-e.top,left:c.left-e.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&(!cf.test(a.nodeName)&&d.css(a,"position")==="static"))a=a.offsetParent;return a})}}),d.each(["Left","Top"],function(a,c){var e="scroll"+c;d.fn[e]=function(c){var f=this[0],g;if(!f)return null;if(c!==b)return this.each(function(){g=cg(this),g?g.scrollTo(a?d(g).scrollLeft():c,a?c:d(g).scrollTop()):this[e]=c});g=cg(f);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:d.support.boxModel&&g.document.documentElement[e]||g.document.body[e]:f[e]}}),d.each(["Height","Width"],function(a,c){var e=c.toLowerCase();d.fn["inner"+c]=function(){return this[0]?parseFloat(d.css(this[0],e,"padding")):null},d.fn["outer"+c]=function(a){return this[0]?parseFloat(d.css(this[0],e,a?"margin":"border")):null},d.fn[e]=function(a){var f=this[0];if(!f)return a==null?null:this;if(d.isFunction(a))return this.each(function(b){var c=d(this);ce)});if(d.isWindow(f)){var g=f.document.documentElement["client"+c];return f.document.compatMode==="CSS1Compat"&&g||f.document.body["client"+c]||g}if(f.nodeType===9)return Math.max(f.documentElement["client"+c],f.body["scroll"+c],f.documentElement["scroll"+c],f.body["offset"+c],f.documentElement["offset"+c]);if(a===b){var h=d.css(f,e),i=parseFloat(h);return d.isNaN(i)?h:i}return this.css(e,typeof a==="string"?a:a+"px")}}),a.jQuery=a.$=d})(window);

Comment #2

Posted on Oct 15, 2012 by Happy Camel

Hmm. I cannot reproduce this error.

Comment #3

Posted on Nov 20, 2014 by Quick Dog

Hmm. ^^ that's not an answer!

In fact you could have simply asked Daniel to tell everybody to click on the line in the console and say what file and what code was guilty for that

firephp.app notice.

As it were, I have been able to reproduce it, at home, at work, on different computers, and with all kinds of Firefox versions. Currently 33, on FireBug

2.0.6.

Let me suggest here a resolution process that worked for me, for that error, and a similar one (Error: TypeError: document.getElementById(...) is null Source File: chrome://web-developer/content/overlay/javascript/overlay.js Line: 7333)

  1. Click on that error line in the console to let FF open the source code that it doesn’t like.

  2. Notice the full path to that file in the title bar of that window?

  3. Open that file.

  4. If it’s an xpi jar file, no worries, just rename it “.zip”, extract it, and continue until you see that file, and eventually open it. An exclamation

mark (!) in the path would indicate that what follows sits inside of the jar.

  1. Locate the faulty line. In the example of “firephp.app is undefined”, I had a simple logger line, such as firephp.app.logger.debug("showNotification

('" + name + "')");

  1. I didn’t have too much time to investigate why the firephp.app property was undefined, so instead, since it was just a logger, I decided to simply

comment it out: // firephp.app.logger.debug("showNotification('" + name + "')");

And I did the same for the two other logger lines I found down the same file.

  1. Close Firefox at this stage.

  2. Then save that file, and compressed the all archive again. There’s an option to only extract that one file, and squeeze it back into the archive once

finished, but it’s a lot quicker to unpack/pack the whole thing at once.

  1. Restore its original extension to .xpi

  2. Start Firefox

In my case, the error that once filled up the entire console with hundreds of the same line, was gonna for good. It also fixed the overall FireBug system so that it displayed again the tags. It used to tell me “no tag found in your page”, whereas I

obviousl had dozens of them.

I also did the same operation for the TypeError line 7333 in overlay.js described above, and since I’ve been able to be productive again. Hope this helps!

Attachments

Comment #4

Posted on Nov 20, 2014 by Happy Camel

Thanks a lot for the detailed info. I'll take a look at this over the next few months as I revamp firephp.

Status: New

Labels:
Type-Defect Priority-Medium