TypeError: href is null, in async angularJS backend call #7948

Closed
mohitadwani opened this Issue Sep 29, 2015 · 41 comments

Projects

None yet
@mohitadwani

I am using AngularJS as my javascript library.
Whenever an error occurs inside the response function of $http.post or $http.get, firebug shows following error only:
TypeError: href is null
chrome://firebug/content/debugger/stack/stackFrame.js
Line 357

Which is pretty vague and I have no way of finding at exactly which line there is a problem.
Meanwhile the native console of the firefox browser pinpoints the exact error on exact line.

Please rectify this.
Will upload a plunkr soon.

@yscumc
yscumc commented Sep 30, 2015

I also have the same problem on FF 41.0 and Firebug 2.0.12.

For reference, here's the associated post from Stack Overflow.

@fflorent
Member

Thanks for the report. Do you have a reproducible test case online by chance?

Florent

@cha0s
cha0s commented Oct 1, 2015

Same here. My use case is complicated, I haven't isolated it yet.

@fflorent
Member
fflorent commented Oct 1, 2015

@kicktipp Thanks for the test case!

Florent

@fflorent fflorent added a commit that referenced this issue Oct 1, 2015
@fflorent fflorent #7948 Fix "href is null" appearing in the console
The backend may send a null source location in for a frame.
9531081
@fflorent
Member
fflorent commented Oct 1, 2015

Another test case:
https://jsfiddle.net/L2xacvq9/3/

Enable the "show chrome errors" and "show chrome messages" in the console options.

Florent

@fflorent fflorent self-assigned this Oct 1, 2015
@fflorent
Member
fflorent commented Oct 5, 2015

Can someone test this?
https://drive.google.com/file/d/0B5NqEPwxS4QwQ3FkWVRwaFkwYVU/view

Note that you need to download the file and open it with Firefox.

Florent

@gmircea
gmircea commented Oct 6, 2015

I've tested the above version, using the Jsfiddle test case: https://jsfiddle.net/L2xacvq9/3/ and also running that fiddle code directly in the Firebug console.
It seems OK.
Firefox: v 41.0.1
OS: Arch Linux

@fflorent
Member
fflorent commented Oct 6, 2015

Thanks for the feedback @gmircea!

@cristifilip

I can provide an example of what happened to me.
My page has partially loaded, but then I got this error (TypeError: href is null) and not all backend calls were done. I've opened the page in Chrome and there I found a common error (cannot get property of undefined) - it think this was the point where it stopped. After I have solved my "undefined obj" problem, things got back to normal. The error has disappeared in Firefox.

var routeParams = $state.current.params; //I had to replace with $state.params (ui.router) 
 $scope.filterBy = {
            searchText: routeParams.searchText
}
@gfviegas
gfviegas commented Oct 6, 2015

Im having the same issue as fflorent described. In my case I was having some issues with the app loading as well... i still dont got it what went wrong but i'll isolate the scope and post here if i cant resolve.

@gfviegas
gfviegas commented Oct 6, 2015

I disabled the script panel and the troubleshooting error just popped in the console.. I dont know really well how firebug works, im just a user, and it seems the script panel is breaking the script at some point and not properly printing the error in console. In my case I was trying to access a property in an undefined object.

@DonSanto
DonSanto commented Oct 6, 2015

I had the same error message yesterday (latest version of angular). Maybe not for the same reason you are seeing this error, but I solved it by adding a base-tag pointing to the app root like so:

<base href="/">

@gfviegas
gfviegas commented Oct 6, 2015

in my case there was really a problem in my app, the issue is that firebug printed this href is null instead my app problem... Its not a particular angular error

@drobledom

I have the same issue. When in a code problem there is an exception all the information I receive in firebug is: TypeError: href is null (If u expand it and try to understand the rest of information maybe you die).
Same error in others debugger give more information:

ReferenceError: k is not defined
at _checkMultiPckRemove (services.js?01.08.01:1900)
at _filtersPackageDepends (services.js?01.08.01:1923)
at _filtersMealDepends (services.js?01.08.01:1948)
at _filtersRoomDepends (services.js?01.08.01:1965)
at _filtersAvailDepends (services.js?01.08.01:1982)
at Object.svFilter.executeFilter (services.js?01.08.01:2097)
at Object.svList.updateAccommodationsFilter (services.js?01.08.01:1327)
at Object._notifierFunction as list
at Object.svFilter.notifyChanges (services.js?01.08.01:2298)
at m.$scope.filterChange (controllers.js?01.08.01:4270)

Obviusly is useful last one...We are using angular.js (maybe nothing to do with that) and some weeks ago that didn't happen

@leszekhanusz

It is not only with angular.js
The same problem is happening for me with knockout / socket.io

@fflorent
Member
fflorent commented Oct 7, 2015

The problem is related to Firebug. We will release a new version very soon to fix this.

Florent

@gattoo
gattoo commented Oct 7, 2015

Same for me. Thx for taking a look into it/

@chrisntyler

The problem is not a Firebug problem. Check your JSON encoding or your JSON file and correct it.

@cha0s
cha0s commented Oct 7, 2015

It is indeed a firebug problem, in fact @fflorent made a commit to firebug above that appears to handle the issue (skip null href), though I have not tested it yet, myself.

@foodmade
foodmade commented Oct 9, 2015

Who know how to solve this problem?

@gmircea
gmircea commented Oct 9, 2015

@foodmade Use this try-build and tell us if it works.

@pdzugas
pdzugas commented Oct 10, 2015

I confirm that tryout build fixed the issue for me as well. My error was coming from messed up bootstrap-datepicker initialization code which was executed in global script although my debugged angular functions were working well.

@jdegger
jdegger commented Oct 12, 2015

Issue resolved with new .xpi for me as well

@sichi-sonovate

That .xpi resolved the issue for me too.

@Philip-Schaffner

Same for me: new .xpi resolved the issue - Thanks a lot!

@fflorent
Member

Thanks for the feedback. Also thanks @gmircea for pointing to the try-build.

Florent

@moellerbj

Short description to fix before the new build released:
Close Firefox. Open the xpi (firebug@software.joehewitt.com.xpi) with zip/rar. In the archive go to 'content\firebug\debugger\stack' and in the file 'stackFrame.js' replace line 357 with "if (href && (href.startsWith("chrome:") || href.startsWith("resource:")))". Save and restart firefox...

@kinsho
kinsho commented Oct 14, 2015

Thank you @moellerbj for the fix. Hopefully this issue gets resolves quickly.

@loldrup
loldrup commented Oct 14, 2015

I can't make console.trace give any output. I'm using Firefox 41.0.1 and Firebug 2.0.12 in Ubuntu 14.04. It works fine in windows 7.

I've uploaded a test file to neocities so you can try it out:
http://definemyhouse.neocities.org/index.html

@fflorent
Member

@loldrup Please see #7948 (comment)

Or wait until version 2.0.13 is out.

Florent

@loldrup
loldrup commented Oct 15, 2015

@fflorent regarding the build referred to in comment #7948:
It works! :D

@fflorent
Member

Excellent ! thanks for the feedback.

Florent

2015-10-15 9:03 GMT+02:00 loldrup notifications@github.com:

@fflorent https://github.com/fflorent regarding the build referred to
in comment #7948 #7948:
It works! :D


Reply to this email directly or view it on GitHub
#7948 (comment).

@leobm
leobm commented Oct 19, 2015

console.assert(expression, obj) has the same bug in Firebug(2.012).
TypeError: href is null

is this fixed too in 2.013 ?

@TanaseButcaru

I can confirm that this error is resolved with version 2.0.13. Thanks!

@JeffreyArts

When will the realease of 2.0.13 be ?

@fflorent
Member

@JeffreyArts Sorry, we don't. We have submitted the new version for review to addons.mozilla.org 2 weeks ago, and we haven't had any news since. We are currently asking again to get more news.

Florent

@fflorent
Member

I am really pleased to announce that the new version has just been released :D. Please upgrade Firebug and give us feedback.
https://addons.mozilla.org/fr/firefox/addon/firebug/

Florent

@gmircea
gmircea commented Oct 26, 2015

Everything looks good from my side.

@leobm
leobm commented Oct 26, 2015

yes, looks good. works as expected.

@mohitadwani

Working fine now, in the new update. Should I close it @fflorent ?

@fflorent
Member
fflorent commented Nov 2, 2015

@mohitadwani I do it. Thanks for the feedback :)

@fflorent fflorent closed this Nov 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment