My favorites | Sign in
Project Home Wiki Issues
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 6778: Cross-domain log messages aren't displayed within the console
3 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by sebastia...@gmail.com, Sep 13, 2013
This issue was first reported in the discussion group.[1]

What steps will reproduce the problem?
1. Add the following entry to your hosts:
   50.56.237.127 another-domain.com
2. Open Firebug at http://shlomi.info/firebug/
3. Enable and switch to the Console panel
4. Reload the page

What is the expected output? What do you see instead?
You should see three log messages:

Test on web-page (non-xdm)
Test into iFrame (non-xdm)
Test into iFrame (xdm)

Though the last one isn't displayed.

Tested with FF 23.0.1/26.0a1 + FB 1.12.1/1.13a2 on Win8.1.
It works fine with FF 16.0 + FB 1.10.5 and also with the built-in dev tools console.

Sebastian

[1] https://groups.google.com/d/topic/firebug/TYQtOEbX7to/discussion
Sep 13, 2013
Project Member #1 simon.lindholm10
Oh wow. We need an FBTest for this, like, yesterday.

When I hard-refresh the site I don't get a log for the non-dxm iframe either, which could signal timing effects.
Sep 14, 2013
Project Member #2 florent....@gmail.com
I post here the experiment I made with the code here to find out what causes that (obviously, this is not a patch): 
https://github.com/fflorent/firebug/commit/d4089a795ce4230047d30874686c58f0d15d6aef

This experiments has to be run with: http://jsfiddle.net/ekMtZ/embedded/result/

It appears that win[EXPOSED_CONSOLE_KEY] is deleted few time after the execution of Firebug.Console.injector.attachConsoleInjector() (actually it even disappears before the first time setTimeout() is executed in the experiment).

Florent
Sep 14, 2013
Project Member #3 simon.lindholm10
> (actually it even disappears before the first time setTimeout() is executed in the experiment)
Does that mean it always executes on the next event loop tick, or can you get a few setTimeouts in in between? (You can try with shorter timeouts than 4ms, BTW - the clamping only starts a few setTimeout levels in.)
Sep 14, 2013
Project Member #4 florent....@gmail.com
> Does that mean it always executes on the next event loop tick, or can you get a few setTimeouts in in between?

No the next in the event loops.

> (You can try with shorter timeouts than 4ms, BTW - the clamping only starts a few setTimeout levels in.)

Ah, okay! So I put to 1ms.

Florent
Sep 15, 2013
Project Member #5 florent....@gmail.com
Started. See: https://github.com/fflorent/firebug/commit/d4089a795ce4230047d30874686c58f0d15d6aef#commitcomment-4095576

Florent
Status: Started
Owner: florent....@gmail.com
Cc: -florent....@gmail.com
Sep 15, 2013
Project Member #6 florent....@gmail.com
Commit in the  issue6778  branch: https://github.com/firebug/firebug/commit/8a0be1c75ee72f46d45ded163a2beed7a34118a4

It looks like it is OK with FBTests (at least, I have as many errors with this commit as in master). Should I merge it with master?

Florent
Sep 15, 2013
Project Member #7 florent....@gmail.com
BTW, I'd like to add an FBTest for this issue.

To do so, every machines that runs tests should update their /etc/hosts file to add a new alias for localhost (like http://firebug-xdm ).

I can create a script (shell + batch) to update it automatically.

What do you think?

Florent
Sep 15, 2013
Project Member #8 simon.lindholm10
Can we reproduce the same problem with <iframe sandbox>, or something else that meddles with timing?

Assuming all tests are run against localhost isn't valid, and creating aliases just for this feels like an annoying thing to impose on people. I wonder if the test bot can access external web sites though?
Sep 15, 2013
Project Member #9 florent....@gmail.com
> Can we reproduce the same problem with <iframe sandbox>
Maybe. I'll check that.

> I wonder if the test bot can access external web sites though?
Even if it could, it would be annoying when running the tests locally. (In my case, I don't always have an internet connection when I work on Firebug).

Florent
Sep 15, 2013
Project Member #10 florent....@gmail.com
Some modifications after Simon's remarks:
https://github.com/firebug/firebug/commit/9728cc2053f8a8dbf7e21e4f26276aa6ada92ed0

FBTest (delaying the iframe load also reproduces the issue):
https://github.com/firebug/firebug/commit/25825a64832605fe1ee66fdb320ce6a56888895e

Florent
Labels: FBTest-available
Sep 16, 2013
Project Member #11 sebastia...@gmail.com
I also think it's bad to require people having to change their hosts settings to run the test suite. Is there any other way to test this?

Sebastian
Sep 16, 2013
Project Member #12 florent....@gmail.com
> Is there any other way to test this?
Yes, in comment 10, I finally published an FBTest with delayed load as suggested Simon. 
Hopefully the issue is not related to the cross-domain nature, but to the timing for the console object attachment.

Florent
Sep 16, 2013
Project Member #14 simon.lindholm10
> Commit in jsd2:
Shouldn't we do that by merging from master? I suspect we could get fun merge conflicts/subtle errors otherwise.

And of course, remember to port to 1.12.
Sep 16, 2013
Project Member #15 florent....@gmail.com
> Shouldn't we do that by merging from master? I suspect we could get fun merge conflicts/subtle errors otherwise.

Hmm, don't know. Then each time a commit is done in master, we should merge from master to jsd2?

> And of course, remember to port to 1.12.
The label is put. Though I don't remember if the developer should backport themselves or just let Honza do it. (Sorry if that was discussed before)

Florent
Sep 16, 2013
Project Member #16 sebastia...@gmail.com
>> Shouldn't we do that by merging from master? I suspect we could get fun merge 
>> conflicts/subtle errors otherwise.
> Hmm, don't know. Then each time a commit is done in master, we should merge from 
> master to jsd2?
Yes. At least that's how I do it.

>> And of course, remember to port to 1.12.
> The label is put. Though I don't remember if the developer should backport 
> themselves or just let Honza do it.
You should do it.

Sebastian
Sep 17, 2013
Project Member #17 florent....@gmail.com
Backport done as discussed:
https://github.com/firebug/firebug/commit/1824a98b8002c565d3eab3534ed5a1b3fc823d94

> Yes. At least that's how I do it.
Right. I'll try to do the merge.

Florent
Sep 21, 2013
Project Member #18 florent....@gmail.com
(No comment was entered for this change.)
Labels: -blocks-1.12.3 -port-1.12 ported-1.12
Sep 25, 2013
Project Member #19 odva...@gmail.com
This issue has been fixed in Firebug 1.12.2
https://getfirebug.com/releases/firebug/1.12/firebug-1.12.2.xpi

Please let us know if it works for you.

Thanks for the help!

Honza
Status: Fixed
Labels: fixed-1.12.2
Sep 26, 2013
#20 shl...@sasson.me
Hey, i've reported this bug to Sebastian, looks now it's working fine!
I'll continue check it within the next few days and let you know if i'll have issues.

Thank you very (very) much for your quick fix!!!

Shlomi.
Sep 26, 2013
Project Member #21 florent....@gmail.com
> Thank you very (very) much for your quick fix!!!

Thanks to you for having reported the issue and also for the feedback! :)

Florent
Sep 26, 2013
Project Member #22 sebastia...@gmail.com
(No comment was entered for this change.)
Status: Verified
Sign in to add a comment

Powered by Google Project Hosting