Closed Bug 1448489 Opened 6 years ago Closed 6 years ago

Trunk: |Tools > Developer Tools > Error Console| opens blank window

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
Thunderbird 61.0

People

(Reporter: jorgk-bmo, Assigned: Paenglab)

Details

Attachments

(1 file, 1 obsolete file)

Apparently still working in Daily of 21st March, not working with M-C at rev 7771df14ea18.

M-C last good: e636edf00e6f
M-C first bad: 7771df14ea18
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=e636edf00e6f&tochange=7771df14ea18

Debug output shows:
Couldn't convert chrome URL: chrome://browser/content/browser-development-helpers.js
JavaScript error: , line 0: uncaught exception: Error opening input stream (invalid filename?): chrome://browser/content/browser-development-helpers.js

I'm wondering whether that's working in FF.

Alice, could you check those builds and narrow it down some more, please.
Flags: needinfo?(alice0775)
Works in FF Nightly.
(In reply to Jorg K (GMT+1) from comment #0)
> Apparently still working in Daily of 21st March, not working with M-C at rev
> 7771df14ea18.
> 
> M-C last good: e636edf00e6f
> M-C first bad: 7771df14ea18
> https://hg.mozilla.org/mozilla-central/
> pushloghtml?fromchange=e636edf00e6f&tochange=7771df14ea18
> 
> Debug output shows:
> Couldn't convert chrome URL:
> chrome://browser/content/browser-development-helpers.js
> JavaScript error: , line 0: uncaught exception: Error opening input stream
> (invalid filename?): chrome://browser/content/browser-development-helpers.js
> 
> I'm wondering whether that's working in FF.
> 
> Alice, could you check those builds and narrow it down some more, please.


There are no tinderbox build[1] after 20180321094440 due to build fail...
And local build also failed in my win10... I can not help, sorry.

[1]http://archive.mozilla.org/pub/thunderbird/tinderbox-builds/comm-central-win64/
Flags: needinfo?(alice0775)
Latest TaskCluster build:
Built from comm-central revision 2bfd3297e48df5b17d2314f6ec7ecd169189d: 2bfd3297e48df5b17d2314f6ec7ecd169189d502
Built from mozilla-central revision d7b0d0e7228da9d690df6f105b865db973: d7b0d0e7228da9d690df6f105b865db973789c34

Linux x64 opt: https://queue.taskcluster.net/v1/task/C_qOlQm-SdOZU-pCufKXqw/runs/0/artifacts/public/build/target.tar.bz2
Windows 2012 x64 opt: https://queue.taskcluster.net/v1/task/XVTwEMj7QnqrsgJE5YCWRQ/runs/0/artifacts/public/build/target.zip

The Error Console works fine.
Although, Open The Error Console from menu, but caption name of window indicates "Browser Console".
Thanks Alice, sorry for sending you on a wild goose chase ;-(
We had two developers report this on their local builds.

Confirmed working with
https://queue.taskcluster.net/v1/task/NzzR2rKoSe6AG68FK5gw_A/runs/0/artifacts/public/build/target.zip
which is the from the tc(B) link of the same build. I'll have to update my local build to see.
I local build at C-C rev 2bfd3297e48d and M-C rev 945baa8bc960 still fails. I tried a debug build from
https://queue.taskcluster.net/v1/task/RpA5ikVbQdSFroRWd4fT-g/runs/0/artifacts/public/build/target.zip
and that worked. I noticed that the error/browser console has changed, there is now a filter icon.

Maybe a local clobber build is necessary. Richard, does it work for you in a local build?
Flags: needinfo?(richard.marti)
I removed obj-x86_64-pc-mingw32\dist\bin\chrome\devtools* and toolkit and built again, but still no luck. I don't have time for a clobber build since I've just done a normal build.
Tested with the latest taskcluster build and the console works. With a local clobber build the console is empty again.

Maybe something is only correctly initialized when when the packaging process is done.
Flags: needinfo?(richard.marti)
:-(

Well, the initial errors is about chrome://browser/content/browser-development-helpers.js which I can't see in my object directory. However, that file is packaged.

Strangely it does work when opened via the "Developer Toolbox".

Julian, does the browser console work for you in a local build? Or can you shed some light onto this problem: Browser Console (which TB calls Error Console) opening blank when opened directly in a local build, but working in server generated builds.
Flags: needinfo?(jdescottes)
Tried a self packaged zip from my build and it fails too. :(
It seems linked to the new-console-frontend (React rewrite of the Console UI) which contains the following code:

      if (!AppConstants.MOZILLA_OFFICIAL) {
        // In local builds, inject the "quick restart" shortcut.
        // This script expects to have Services on the global and we haven't yet imported
        // it into the window, so assign it.
        this.window.Services = Services;
        Services.scriptloader.loadSubScript(
          "chrome://browser/content/browser-development-helpers.js", this.window);
        shortcuts.on("CmdOrCtrl+Alt+R", this.window.DevelopmentHelpers.quickRestart);
      }

https://searchfox.org/mozilla-central/rev/56274d0a016a6833e5da7770ce70580b6f5abb21/devtools/client/webconsole/new-webconsole.js#260-267

> opening blank when opened directly in a local build, but working in server generated builds.

This seems to match the (!AppConstants.MOZILLA_OFFICIAL) test in the code above.

This code was added in Bug 1445776 and landed on central the 16th of March.
The new console frontend was enabled for the Browser Console a bit later in Bug 1439616 on the 19th of March.

None of those bugs match your regression window, but I guess the window is not accurate if you tested with local builds on one side and server-made builds on the other. I suppose we have to make sure this file gets packaged for TB as well: anything here that would need to be ported over: https://searchfox.org/mozilla-central/search?q=browser-development-helpers.js&case=true&regexp=false&path= ?

Forwarding the ni? to Brian, who might know more.
Flags: needinfo?(jdescottes) → needinfo?(bgrinstead)
Thanks, Julian. The regression window is most certainly wrong since we mixed local and server builds in an attempt to work out what's going on. I'm glad we understand it now.

Richard, could you please look into a port for this.
Flags: needinfo?(richard.marti)
What about this? I copied the browser-development-helpers.js to messenger and install it only on local builds.
Flags: needinfo?(richard.marti)
Attachment #8962098 - Flags: review?(jorgk)
Hmm, there is no way to do this other than to copy the file? We should at least copy it to common/, no?
(In reply to Richard Marti (:Paenglab) from comment #13)
> Created attachment 8962098 [details] [diff] [review]
> browser-development-helpers.patch
> 
> What about this? I copied the browser-development-helpers.js to messenger
> and install it only on local builds.

Having it may be useful anyway - we use this in local builds to enable ctrl/cmd+alt+r to do a quick restart (in firefox it's also tied to session restore but I think the call to Services.startup.quit should work even without that).
adding them to .mozconfig work for me.
export MOZILLA_OFFICIAL=1
export BUILD_OFFICIAL=1
mk_add_options MOZILLA_OFFICIAL=1
mk_add_options BUILD_OFFICIAL=1
File moved to common.
Assignee: nobody → richard.marti
Attachment #8962098 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8962098 - Flags: review?(jorgk)
Attachment #8962130 - Flags: review?(jorgk)
Comment on attachment 8962130 [details] [diff] [review]
browser-development-helpers.patch

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

Will the console work in 'official' builds? We add this file only for the official case. But what was actually breaking the console?
The downloaded files from taskcluster works without this file, see my comment 8 and the explanation in comment 11.
(In reply to Alice0775 White from comment #16)
> adding them to .mozconfig work for me.
> export MOZILLA_OFFICIAL=1
Thanks for the research. I don't think we want to go this route and label each local build as official.
Comment on attachment 8962130 [details] [diff] [review]
browser-development-helpers.patch

I'm not totally happy with this, but let's do it.
Flags: needinfo?(bgrinstead)
Attachment #8962130 - Flags: review?(jorgk) → review+
I'm not happy too. Either the browser-development-helpers.js should move to toolkit because it's called from toolkit or we could with a path variable, like we have in the Python config files, point to the file in browser. Then we wouldn't need to copy this file.
Keywords: checkin-needed
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/6e1f0a0d00a8
Install browser-development-helpers.js on local builds. r=jorgk
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 61.0
Thanks, the console is working now, albeit with strange colors. m-c has definitely played with it :)
Status: RESOLVED → VERIFIED
OS: Unspecified → All
Hardware: Unspecified → All
Version: unspecified → Trunk
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: