There shouldn't be any XHR requests occurring at that point in the new page,
just the callbacks from the old page. XHR requests do occur later and run
fine (though FB is dead), but those new requests seem unrelated (except that
their callbacks can keep FB working in the next page.)

The errors occur in place of console.debug messages that occur in the new
page, but all evidence is that it's that stuff that happens in the callbacks
in the previous page that keeps FB from getting init'd correctly in the new
page.

Re: John's comment, I think it's actually the FB code from the old page
getting run against the "new" window object. I don't really know how scope
access occurs across page loads, i.e., I'm not quite sure why the callback
resolves to the "new" window object rather that the "old" window object. Of
course, I don't actually know if the browser even creates new window objects
for each page load or reuses the old one, etc.

In any case, the net of it is that XHR callbacks can lose access to the
global scope. Converting that code to use a closure  for any objects I need
instead worked fine. Not that I do much useful in these callbacks, I just
can't live without FB. Interestingly, the callbacks sometimes log messages
with console.* and this actually works (so far) even though it's resolved
via the global scope.

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] On Behalf
> Of Steven Roussey
> Sent: Friday, August 28, 2009 10:39 AM
> To: Firebug
> Subject: Re: Firebug cannot find _firebugConsole element and
document.domain
> 
> 
> I see this sometimes too, and I don't do domain changes. But I think
> that case has to do with calling console.log very early in the page
> load, before domready, etc. I'm curious if the poster has XHR requests
> as the page loads.
> 
> On Aug 27, 4:51 pm, johnjbarton <[email protected]> wrote:
> > Here's a guess. Window.r is from our attempt to complete the console
> > setup. It runs code injected on load. You changed the domain so now
> > our code is cross domain.
> >
> > jjb
> >
> > On Aug 27, 1:08 pm, Steven Parkes <[email protected]> wrote:
> >
> > > I'm seeing various numbers of "Firebug cannot find _firebugConsole
> > > element" messages and wondering about thoughts on it.  I see them
> > > under FF 3.0.13 and 3.5.2 and FB 1.3.3, 1.4.*, and 1.5X.0a21. The more
> > > recent the version, the more frequently I see the issue.
> >
> > > When the issue occurs, generally I get  "Firebug cannot find
> > > _firebugConsole" for cases where the code is trying to do a
> > > console.debug(...). When it works, I get the debugging in the console.
> > > When it doesn't work, I get the error message. It works on some (re)
> > > loads, not on others. The frequency of failure seems to be higher for
> > > newer combinations of FF/FB.
> >
> > > The thing that I think it triggering it is having multiple windows
> > > with their document domains set (possibly in combination with active
> > > XHR requests) when doing a (re)load. The main page sets its
> > > document.domain and contains an iframe, the contents of which sets its
> > > document.domain to the same value.
> >
> > > Here's the console output when doing a reload that fails (this is
> > > under3.0.13/1.3.3since it gives more output in the console (not sure
> > > which to turn tracing on on in newer versions:
> >
> > > Firebug cannot find _firebugConsole element
> > > commandLine.evaluate FAILED: Error: Permission denied to set property
> > > Window.r
> > > [Break on this error] (200 out of range 2)
> > > FirebugC...uate,with (line 200) Window localhost:3000
> > > Firebug cannot find _firebugConsole element
> > > commandLine.evaluate FAILED: Error: Permission denied to set property
> > > Window.r
> > > [Break on this error] (200 out of range 2)
> > > FirebugC...uate,with (line 200) Window localhost:3000
> > > Firebug cannot find _firebugConsole element
> > > commandLine.evaluate FAILED: Error: Permission denied to set property
> > > Window.r
> > > [Break on this error] (200 out of range 2)
> > > FirebugC...uate,with (line 200) Window localhost:3000
> > > Strophe is not defined
> > > [Break on this error] Strophe.debug("request id " + req.id +
> > > strophe....251401953 (line 2150)
> > > listeninglocalhost:3000 (line 55)
> > > creatingxmpp.js?...251402053 (line 44)
> > > 1 _connect_cb was called
> > > 1 SASL authentication succeeded.
> > > 1 no requests during idle cycle, sending blank request
> >
> > > Sorry it's ugly, but I think the key issue is the permissions denied
> > > part of the message. I think there's some kind of race going on
> > > relative to the document domains, but beyond that ...
> >
> > > The timing ... well I'm not sure I understand it exactly. The line
> > > "Strophe is not defined" is actually an error being generated because
> > > there's a callback on an outstanding XHR request that is trying to
> > > access an object that appears to have already been destroyed. I don't
> > > think this is related, but ...
> 


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Firebug" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/firebug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to