Closed Bug 524757 Opened 12 years ago Closed 6 years ago

Add architecture and operating system to about:support


(Toolkit :: General, enhancement)

Not set



Tracking Status
firefox47 --- fixed


(Reporter: jruderman, Assigned: vtieu, Mentored)


(Blocks 1 open bug)


(Whiteboard: [good first bug][lang=js])


(2 files, 1 obsolete file)

Perhaps "Architecture: x86-32" and "Operating System: Mac OS X 10.5.8"
OS: Mac OS X → All
Hardware: x86 → All
Bug 591776 added the UA string to about:support which currently includes the OS and the architecture (or at least enough info to approximate it on a Mac using the OS X version, although we do allow 32-bit mode there)[1].

Product: Firefox → Toolkit
Mentor: adw
Whiteboard: [good first bug][lang=js]
hey, I would like to work on this bug....., Get me started ...
I'm not sure which section to put this in since this isn't about the application so it doesn't really fit in the first section of "Application Basics".

(In reply to Jesse Ruderman from comment #0)
> Perhaps "Architecture: x86-32" and "Operating System: Mac OS X 10.5.8"

Jesse, is the information in the UA string enough? I forget if we don't disclose some of this information on certain platforms:

Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:41.0) Gecko/20100101 Firefox/41.0

Since Drew (the mentor) is out this week, it's not clear to me what still needs to be done from this old bug report, and it's not clear where the information should go, I think it would be good to find another bug until we sort this out. Sorry about that.
Flags: needinfo?(jruderman)
From that Mac UA string, it looks like the UA string doesn't include the minor OS version or the architecture's pointer size.
Flags: needinfo?(jruderman)
(In reply to Jesse Ruderman from comment #4)
> From that Mac UA string, it looks like the UA string doesn't include the
> minor OS version

True but I'm not sure it's that useful.

> or the architecture's pointer size.

It's not necessary since 64-bit is the only option.

We seem to indicate "WOW64" or "Win64; x64;" on Windows and similar things on Linux. See
Jesse, given Matt's most recent comment do you still think we should do this?  From what I understand, about:support is most often used by community members and SUMO to diagnose other people's problems.  They'll know to look in the UA string for OS info if they need it.  I can see the minor OS version being potentially helpful, though.
Flags: needinfo?(jruderman)
Ask some support people how often they need the minor OS version?
Flags: needinfo?(jruderman)
Can you please provide me with the path file so i could do some work on it.
Flags: needinfo?(adw)
Hi Patrick, thanks for volunteering.  There are a couple of files.  The first one is:

That file generates the back-end data.  You'll want to add the OS info to the `application` data provider that I linked to.

The second file is:

That's the JS that builds the about:support XHTML page.  You can see there's an `application` part that uses the application object from Troubleshoot.jsm to build the "Application Basics" section of about:support.

If you need more help, let me know.
Flags: needinfo?(adw)
Hi Drew,

See patch for review
Attachment #8697970 - Flags: review?(adw)
Comment on attachment 8697970 [details] [diff] [review]

Review of attachment 8697970 [details] [diff] [review]:

Hi Patrick, thanks for the patch.  It's not quite right, though.  We don't want to hard-code specific values.  That would mean that people using Windows or Linux would see "Mac OS X" instead of their actual OSes.  So instead we should get these values at runtime.

First though I would ask you to look at this page, especially the parts up to and including Step 1:  That will tell you how to build Firefox and then run your build.  That way you can actually test the changes that you make before you ask for review.

Second, it looks like you might need some help with JS.  I recommend looking at this page:

I think your next steps should be: build and run Firefox on your computer so that you can test the patch you posted.  It should generate an error when you open about:support because your patch is not actually valid JS.  As practice, you might try spending a moment to make it valid (by turning those values into proper JS strings), even though we don't want to hard-code those values, as I said.

Once you've gotten that far, let me know here in the bug and I can walk you through getting the right values at runtime.
Attachment #8697970 - Flags: review?(adw) → review-
Attached patch Bug___524757.diff (obsolete) — Splinter Review
Hi Drew,

Here's my attempt at fixing this bug.
Attachment #8698343 - Flags: review?(adw)
Hi Vince, as I mentioned in my email, Patrick's already working on this, so let's let him try.
Assignee: nobody → nwokop
Attachment #8698343 - Flags: review?(adw)
Comment on attachment 8698343 [details] [diff] [review]

Review of attachment 8698343 [details] [diff] [review]:

OK Vince, let's go with your patch.  You've updated Troubleshoot.jsm properly, but if you open about:support, you'll notice that your changes don't show up.  Did you try that?  The reason is that you need to update the page too; Troubleshoot.jsm is just the raw data.

The page lives in these xhtml and JS files:

In the xhtml, you need to add a row to the application table for this new data.  I think we should combine osVersion and arch into one row, like "Darwin 14.5.0 x86-64", instead of showing them separately.  Let's add the new row after the "User Agent" row.

The first column in each row is a description, so you also need to modify the strings file that contains about:support's natural language strings:

Let's use "OS" as the description.

After you add the new row to the xhtml, you need to modify the JS so the row is filled in.  The JS has comments and examples, but let me know if you need help with that part.

Finally, you need to update Troubleshoot.jsm's unit test to account for the new data.  There's a SNAPSHOT_SCHEMA object that defines what the snapshot data should look like.  You need to add entries for your new data.
Attachment #8698343 - Flags: feedback+
Thank you for the feedback. Here are the changes you suggested.
Attachment #8698343 - Attachment is obsolete: true
Attachment #8717695 - Flags: review?(adw)
Comment on attachment 8717695 [details] [diff] [review]

Review of attachment 8717695 [details] [diff] [review]:

Thanks, looks good.
Attachment #8717695 - Flags: review?(adw) → review+
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla47
Depends on: 1260522
You need to log in before you can comment on or make changes to this bug.