Closed Bug 662867 Opened 13 years ago Closed 5 years ago

redirect about:<nonsensical words> does not go to a "The URL is not valid and cannot be loaded." dialog

Categories

(Firefox for Android Graveyard :: General, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: nhirata, Assigned: mfinkle)

Details

Attachments

(2 files)

Attached image screenshot
Mozilla/5.0 (Android; Linux armv71; rv7.0a1) Gecko/20110608 Firefox/7.0a1 Fennec/7.0a1
Device: HTC Flyer
OS: Android 2.3

1. go to about:blasdfhgaf

Expected: dialog appears "The URL is not valid and cannot be loaded."
Actual: 
Black blank page

Note:
1.
Desktop Firefox behaves the same.  In the implementation, any about:xxx page that is not found is just returned a NS_ERROR_MALFORMED_URI: "The URL is not valid and cannot be loaded.", I doubt this would change.

http://mxr.mozilla.org/mozilla-central/source/netwerk/protocol/about/nsAboutProtocolHandler.cpp#191
Sorry.  Typed title too fast.  It doesn't go to the dialog.  It goes to a black blank page.
Summary: redirect about:<nonsensical words> goes to go to a "The URL is not valid and cannot be loaded." dialog → redirect about:<nonsensical words> does not go to a "The URL is not valid and cannot be loaded." dialog
OS: Mac OS X → All
Priority: -- → P3
Hardware: x86 → All
Tested/verified with bug 662785
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Reopening because this issue still exists (0613 Nightly w/ Gingerbread theme), albeit it's a little strange, and could use a verification if it's a Gingerbread theming issue.

To reproduce, open a new tab or on any existing tab with a URL that's non 'about:' go to about:123 - you should see a black page. For example, sitting on CNN.com, open 'about:123'.

If you are *already* on an about: page such as about:firefox, or about:home, heading to about:123 - you will see the dialog as expected. For example, sitting on about:firefox, open 'about:123'.

This bug should investigate the first case as to why a black page appears.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
(In reply to comment #4)

> This bug should investigate the first case as to why a black page appears.

about: pages are loaded into a local tab (non-e10s). An existing about: page is already in a local so all works well. An http:* page is loaded in a remote tab, so if we start loading an about:* page, we need to create a new local tab.

It seems that we are not closing the new tab when the about:* page fails to load. It also seems like we are not getting the dialog to display.
Attached patch patchSplinter Review
This sisue only seemed to happen when we were launching from a remote page, creating a local page for the about: URI. I found that when trying to load the about:<silly> page, the system was acting like the remote context was still being used. I do not know why.

On a hunch, I added a simple setTimeout(..., 0) before loading the URI and this seemed to be enough to get the context handled correctly. With the patch we always get the error dialog. However, the orphaned tab remains. I don't have a great solution for cleaning it up, since the error happens fairly far from the beginning of the action.
Assignee: nobody → mark.finkle
Attachment #539113 - Flags: review?(mbrubeck)
Ideas for cleaning up that orphaned tab:
* Let the exception escape Tab.create and catch it in Browser.addTab (this might not work as the setTimeout would surely mean Browser.addTab has finished)
* Add pseudo events for the Tab object, one of which would be "Error". Others could be "Create", "Destroy","Resurrect"

I am leaning toward the event for now
Attachment #539113 - Flags: review?(mbrubeck) → review+
Whiteboard: [inbound]
Backed out in http://hg.mozilla.org/integration/mozilla-inbound/rev/7c0f44b85272 as it's suspected to cause several perma oranges.
Whiteboard: [inbound]
Closing all opened bug in a graveyard component
Status: REOPENED → RESOLVED
Closed: 13 years ago5 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: