Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Object 'unavailable' in Firefox console

I have a few divs with class='class_name', and also have declared

var A = document.getElementsByClassName('class_name');
console.log(A[0]);

The Chrome console shows:

<div class="class_name"> div 1 </div>

The Firefox console shows:

<unavailable>

What's the issue or what otherwise is the possible cause?

like image 584
br00x Avatar asked Jul 28 '17 12:07

br00x


People also ask

How do I reset my Firefox console?

clear() The console. clear() method clears the console if the console allows it.

How do I run a console command in Firefox?

from the menu: select “Browser Console” from the Web Developer submenu in the Firefox Menu (or Tools menu if you display the menu bar or are on macOS). from the keyboard: press Ctrl + Shift + J (or Cmd + Shift + J on a Mac).

What is Web console in Firefox?

The Web Console:Enables you to interact with a web page by executing JavaScript expressions in the context of the page.


1 Answers

There are currently four solutions :

  1. Use console.log(JSON.stringify(variable, null, 4)) in place of console.info(variable). This has the additional advantage of catching errors caused by any type of memory management bugs, but it may cause a cyclic redundancy on actual elements when interpolating parent/child elements. Original solution by me.

  2. Use Firefox Web Console (control+shift+K, or Tools->Web Developer->Web Console) instead of the standard Firefox Browser Console (control+shift+J, or Tools->Web Developer->Browser Console). Thanks to Panos Astithas for providing this info!

  3. Disable e10s in FF config. Goto about:config as an address within Firefox, and set browser.tabs.remote.autostart or loop.remote.autostart to false. Thanks to Janekptacijarabaci for providing this info!

  4. Revert your FireFox Quantum version. I uninstalled Firefox 57 and 59 ("Firefox Quantum") and then installed Firefox version 56.0.2. This fixed the problem for me. Get it here: https://ftp.mozilla.org/pub/firefox/releases/56.0.2/ Original solution by me.

Firefox Development Ticket: https://bugzilla.mozilla.org/show_bug.cgi?id=1136995

UPDATE : Problem persists with Firefox v. 59.0.2, and v. 59.0.3.

like image 78
HoldOffHunger Avatar answered Sep 23 '22 13:09

HoldOffHunger