taboca / TelaSocial

Social Dashboard Browser Player for Television Panels - Linux based, Gecko-based
www.telasocial.com
10 stars 2 forks source link

Inline popup problem: Alert box is shown with Gecko message: operation timed out when attempting to contact www.site.com #20

Closed taboca closed 12 years ago

taboca commented 12 years ago

This is a Gecko alert box that comes in and here is an example, said way to simulate this problem[1]. The original problem was reported from Luciano @ Sti IFSC USP in Sao Carlos [2] and was out of the iframe -> component inpe weather.

[1] http://stackoverflow.com/questions/100841/artificially-create-a-connection-timeout-error

[2] https://github.com/taboca/telasocial-template-ifsc-usp-saocarlos/tree/master/ifsc-vertical/tempo-inpe

taboca commented 12 years ago

Network error time out in B2G is xhtml file, so inline?

http://mxr.mozilla.org/mozilla-central/source/b2g/chrome/content/netError.xhtml

taboca commented 12 years ago

Reference MXR code for the alerts : http://mxr.mozilla.org/mozilla-central/source/docshell/resources/content/netError.xhtml

taboca commented 12 years ago

Was able to simulate another alert case with this:

Net cat creates a local port and answers nothing:

nc -l localhost 53

map.js loads http://localhost:53

Popup says " Access to the port number given has been disabled for security reasons"

taboca commented 12 years ago

A discussion from Mozillazine that points to a case for needs in overlays for the netError page

http://forums.mozillazine.org/viewtopic.php?f=19&t=62721

Chrome registration and means to overlay or to add resources

https://developer.mozilla.org/en/Chrome_Registration

taboca commented 12 years ago

okay, so recent XULRunner apps is different of default Firefox behavior. In Firefox we have the pref http://kb.mozillazine.org/Browser.xul.error_pages.enabled to true so alerts are not shown and the inline web page, sometimes based in netError.xhtml is shown instead. The solution landed is the pref, for now, which exposes the error in inline mode.

taboca commented 12 years ago

And chrome.manifest to have an override is the solution to make more elegant our design:

So a new netError.xhtml can provide a dump of the error to the console. Based in thw following:

http://mxr.mozilla.org/mozilla-central/source/docshell/resources/content/netError.xhtml?raw=1