Closed Bug 1079707 Opened 9 years ago Closed 9 years ago

Accessing IPv6 URLs without typing the protocol and the first bracket throws a JS error in the Browser Console

Categories

(Firefox :: Address Bar, defect)

35 Branch
defect
Not set
normal
Points:
1

Tracking

()

VERIFIED FIXED
Firefox 36
Iteration:
36.1
Tracking Status
firefox34 --- unaffected
firefox35 --- verified
firefox36 --- verified

People

(Reporter: avaida, Assigned: Gijs)

References

Details

Attachments

(1 file)

Note: this is a follow up bug for Bug 494092.

Reproducible on:
* Nightly 35.0a1 (2014-09-15), 
* Windows 7 64-bit, Ubuntu 14.04 LTS 32-bit, Mac OS X 10.9.5.

STR:
1. Launch Firefox with a clean profile.
2. Open the Browser Console.
3. Select the Location Bar and type in the following IPv6 address: '[FE80::0202:B3FF:FE1E:8329' (w/o apostrophe).
4. Press the <enter> key and look at the logs displayed in the Browser Console.

ER:
There are no errors or unexpected warnings displayed for that request. A search is performed for that invalid IPv6 URL.

AR:
A search is indeed performed for that invalid IPv6 URL, but the following JS error is displayed in the Browser Console: 
> NS_ERROR_UNKNOWN_HOST: Component returned failure code: 0x804b001e 
> (NS_ERROR_UNKNOWN_HOST) [nsIDNSService.asyncResolve] 
> in browser.js:10658

Additional notes:
- This issue *might be a regression*, but so far I was unable to find a reliable regression window.
- Per Bug 494092 Comment 36, a potential regressor might be Bug 1048618.
- This issue is reproducible across platforms (Windows 7 x64, Ubuntu 14 x86, OS X 10.9.5).
Flags: qe-verify+
We should try...catch the asyncResolve call.
Attachment #8504506 - Flags: review?(abardas)
Assignee: nobody → gijskruitbosch+bugs
Status: NEW → ASSIGNED
Points: --- → 1
Flags: in-testsuite-
Flags: firefox-backlog+
Comment on attachment 8504506 [details] [diff] [review]
asyncresolve can throw,

Review of attachment 8504506 [details] [diff] [review]:
-----------------------------------------------------------------

I guess the comment can be a bit improved, but it can be easily understood from the context.
Attachment #8504506 - Flags: review?(abardas) → review+
Iteration: --- → 36.1
(In reply to Alex Bardas :alexbardas from comment #3)
> Comment on attachment 8504506 [details] [diff] [review]
> asyncresolve can throw,
> 
> Review of attachment 8504506 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> I guess the comment can be a bit improved, but it can be easily understood
> from the context.

What would you prefer for the comment? :-)
Flags: needinfo?(abardas)
(In reply to :Gijs Kruitbosch from comment #4)
> What would you prefer for the comment? :-)

I'm not very opinionated here, but I was thinking of something like

"Do nothing if the URL is invalid (we don't want to show a notification in that case)."

to be more consistent with other comments.
Flags: needinfo?(abardas)
https://hg.mozilla.org/mozilla-central/rev/044923edbc61
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 36
Nightly 36.0a1 (2014-10-17), Windows 7 64-bit

I'm seeing a different JS error thrown in the Browser Console now, for the exact same steps from Comment 0:
> [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) 
> [nsIURIFixup.createFixupURI]"  nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)"  
> location: "JS frame :: resource:///modules/PlacesUIUtils.jsm :: PUIU_createFixedURI :: line 97"
> data: no]
in urlbarbindings.xml:332.

I assume this isn't intended. Gijs, what's your take on this?
Flags: needinfo?(gijskruitbosch+bugs)
(In reply to Andrei Vaida, QA [:avaida] from comment #7)
> Nightly 36.0a1 (2014-10-17), Windows 7 64-bit
> 
> I'm seeing a different JS error thrown in the Browser Console now, for the
> exact same steps from Comment 0:
> > [Exception... "Component returned failure code: 0x804b000a (NS_ERROR_MALFORMED_URI) 
> > [nsIURIFixup.createFixupURI]"  nsresult: "0x804b000a (NS_ERROR_MALFORMED_URI)"  
> > location: "JS frame :: resource:///modules/PlacesUIUtils.jsm :: PUIU_createFixedURI :: line 97"
> > data: no]
> in urlbarbindings.xml:332.
> 
> I assume this isn't intended. Gijs, what's your take on this?

That's a totally different part of the code to do with the urlbar autocomplete. It needs its own bug. :-)
Flags: needinfo?(gijskruitbosch+bugs)
Comment on attachment 8504506 [details] [diff] [review]
asyncresolve can throw,

Approval Request Comment
[Feature/regressing bug #]: maybe bug 494092? I wonder if this is older and needs beta uplift, really - but let's start with aurora
[User impact if declined]: spurious error messages in the console
[Describe test coverage new/current, TBPL]: nope
[Risks and why]: very very very very low
[String/UUID change made/needed]: nope
Attachment #8504506 - Flags: approval-mozilla-aurora?
(In reply to :Gijs Kruitbosch from comment #8)
> That's a totally different part of the code to do with the urlbar
> autocomplete. It needs its own bug. :-)

Thanks for the feedback, I'll file a separate bug for it. Updating flags accordingly.
Status: RESOLVED → VERIFIED
(In reply to Andrei Vaida, QA [:avaida] from comment #10)
> I'll file a separate bug for it.
There seems to be an older bug already logged on this matter, Bug 445606. I looked for a regression range but that error is thrown on way earlier builds as well (e.g. 2011-02-01 nightly build), so it's not a recent regression.
Attachment #8504506 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(In reply to :Gijs Kruitbosch from comment #9)
> Comment on attachment 8504506 [details] [diff] [review]
> asyncresolve can throw,
> 
> Approval Request Comment
> [Feature/regressing bug #]: maybe bug 494092? I wonder if this is older and
> needs beta uplift, really - but let's start with aurora

Can't reproduce in 34 beta, so I guess this is really 35+-specific. Andrei, can you confirm that?
Flags: needinfo?(andrei.vaida)
(In reply to :Gijs Kruitbosch from comment #13)
> Can't reproduce in 34 beta, so I guess this is really 35+-specific. Andrei,
> can you confirm that?

Indeed, I'm not seeing this particular error (Comment 0) on Firefox 34.0b2 (Build ID: 20141020184313). Confirmed on Ubuntu 12.04 LTS 32-bit, Windows 7 64-bit and Mac OS X 10.9.5.
Flags: needinfo?(andrei.vaida)
Verified fixed on Aurora 35.0a2 (2014-10-21) as well, using Ubuntu 12.04 LTS 32-bit, Windows 7 64-bit and Mac OS X 10.8.5.
You need to log in before you can comment on or make changes to this bug.