Closed Bug 1162690 Opened 5 years ago Closed 5 years ago

Treeherder causes lots of "WARNING: malformed uri: file netwerk/base/nsURLParsers.cpp, line 122"

Categories

(Core :: Networking, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox40 --- affected
firefox41 --- fixed

People

(Reporter: dholbert, Assigned: valentin)

Details

Attachments

(1 file)

STR:
 1. Load https://treeherder.mozilla.org/ui/#/jobs?repo=mozilla-inbound in a debug build. Watch your terminal.

 2. Scroll to bottom of page & hit "Get next... [50]" button. Watch your terminal.

ACTUAL RESULTS:
After initial load, there are ~20 copies of this warning (intermixed with others):
> WARNING: malformed uri: file netwerk/base/nsURLParsers.cpp, line 122

After step 2, 100 more copies are spammed to your terminal.
The "malformed URI" in question is:
 {{::revisionResultsetFilterUrl}}
which TreeHerder seems to use as placeholder text in <a href="..."> attributes, e.g. in this pruned chunk of its script:

====
  $templateCache.put('partials/main/jobs.html',
    "<div class=\"progress progress-striped active\" [...SNIP...] <a href={{::revisionResultsetFilterUrl}} title=\"View only this resultset\" ignore-job-clear-on-click>{{::resultsetDateStr}} <span class=\"fa fa-external-link icon-superscript\"></span></a>[...SNIP...]
====
https://treeherder.mozilla.org/js/index.min-8bb23e557dd93092c02429d3b66f2ba1.js
That seems like an invalid URL to me :)
From what I understand, the complaint here is that too many warnings are being printed in the console, right?
Do you have any suggestions of mitigating this inconvenience?
Flags: needinfo?(dholbert)
(In reply to Valentin Gosu [:valentin] from comment #2)
> That seems like an invalid URL to me :)
> From what I understand, the complaint here is that too many warnings are
> being printed in the console, right?

Yes.

> Do you have any suggestions of mitigating this inconvenience?

How about just removing the warning?  I'm not sure who its target audience is, or what bugs it hopes to catch.  (Web Developers [e.g. the folks working on TreeHerder] don't seem to be its target audience, since it's a debug-build-only warning.)

So -- unless this is an important failure case that needs to alerted, I'd say we should just remove it.
Flags: needinfo?(dholbert)
(Alternately, we could fix TreeHerder to not put non-URL placeholder text into src="..." attributes. It seems to be using some strategy/framework that kinda depends on doing that sort of thing for all element attributes across the board, though.)
Removing the warning since it doesn't really provide much info towards what went wrong - in this case having a wrong scheme, or missing a : after the scheme.w
Attachment #8609383 - Flags: review?(mcmanus)
Assignee: nobody → valentin.gosu
Status: NEW → ASSIGNED
Comment on attachment 8609383 [details] [diff] [review]
Remove malformed uri warning in nsURLParser::ParseURL

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

There is also a "malformed hostname" NS_WARNING.. you can remove that one too
Attachment #8609383 - Flags: review?(mcmanus) → review+
https://hg.mozilla.org/mozilla-central/rev/cfc6bf342903
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in before you can comment on or make changes to this bug.