Closed Bug 1352699 Opened 7 years ago Closed 7 years ago

Run Netmonitor on devtools-launchpad

Categories

(DevTools :: Netmonitor, enhancement, P1)

enhancement

Tracking

(firefox55 verified)

VERIFIED FIXED
Firefox 55
Iteration:
55.3 - Apr 17
Tracking Status
firefox55 --- verified

People

(Reporter: rickychien, Assigned: rickychien)

References

Details

(Whiteboard: [netmonitor])

Attachments

(6 files, 1 obsolete file)

There are too many inconsistency between m-c/shared and devtools-core. And I noticed that devtools-core has some breaking changes which broke controller.

Due to test failures recently, we disable some useful tools for netmonitor [1] (Tabbar, TabPanel, LocalizationHelper...etc)

If you'd like to see Netmonitor runs on browser correctly, you have to remove all comments in [1].


[1] https://github.com/devtools-html/devtools-core/blob/master/packages/devtools-modules/index.js
Comment on attachment 8853673 [details]
Bug 1352699 - Access single Services.prefs instance

https://reviewboard.mozilla.org/r/125764/#review128288

::: commit-message-72cdc:1
(Diff revision 1)
> +Bug 1352699 - Access single Services.prefs instance r?honza

Fixed all prefs errors when running on devtools-launchpad.

I don't have idea why PrefsHelper always return pre-defined prefs in index.js when running on devtools-launchpad. But everything works after replacing Services.prefs instead of using PrefsHelper.
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review128290

::: commit-message-4e09a:1
(Diff revision 1)
> +Bug 1352699 - Fix gStore instance issue in NetMonitorController r?honza

Fixed gStore is undefined error when launching on devtools-launchpad.

It could be due to cyclic dependency issues since we need to support two different loaders (devtools loader and webpack loader).

I simply remove FIXME: NetmonitorController global variable and improve quality. (Note that we still have gStore global here, it should be removed as well)
Comment on attachment 8853675 [details]
Bug 1352699 - Make netmonitor run on devtools-launchpad

https://reviewboard.mozilla.org/r/125768/#review128292

::: commit-message-26ec3:1
(Diff revision 2)
> +Bug 1352699 - Make netmonitor run on devtools-launchpad r?honza

This patch involved so many different fixes. (sorry for that but it's hard to make it clear)

devtools-core has some breaking changes recently (kill devtools-sham-module, merge devtools-client-adapter to devtools-launchpad, bootstrap API changed...etc)

This patch also fixed some css issues to make launchpad render properly. Please see attachement, now we supported all images!

Moved redux-thunk into folder, because thunk lib in m-c and devtools-core are different...
Comment on attachment 8853708 [details]
fixup! Bug 1352699 - Make netmonitor run on devtools-launchpad

https://reviewboard.mozilla.org/r/125784/#review128294

::: commit-message-f4721:1
(Diff revision 1)
> +Bug 1352699 - Remove cyclic dependency in devtools loader r?honza

Fixed cyclic dependency when running on firefox-panel. It's also a issues when using two different module loaders. Introduced bindActionCreators to evaluate actions/*.js first before hitting cyclic dependency.
Flags: qe-verify?
Whiteboard: [netmonitor][triage] → [netmonitor]
Comment on attachment 8853673 [details]
Bug 1352699 - Access single Services.prefs instance

https://reviewboard.mozilla.org/r/125764/#review128312

::: devtools/client/netmonitor/src/utils/create-store.js:21
(Diff revision 1)
> -  Prefs.filters.forEach((filter) => {
> +  let filters = JSON.parse(Services.prefs.getCharPref("devtools.netmonitor.filters"));
> +  filters.forEach((filter) => {

I personally find PrefsHelper more elegant to use, I  wonder if we can't add it to devtools-modules as well.
Iteration: 55.2 - Apr 3 → 55.3 - Apr 17
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129210

::: devtools/client/netmonitor/src/utils/create-store.js
(Diff revision 1)
>  
>  "use strict";
>  
>  const Services = require("Services");
>  const { createStore, applyMiddleware } = require("devtools/client/shared/vendor/redux");
> -const { thunk } = require("devtools/client/shared/redux/middleware/thunk");

The sendCustomRequest action will not work if you removed the thunk middleware
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129210

> The sendCustomRequest action will not work if you removed the thunk middleware

redux-thunk middleware has put back in the commit afterward.
In which order I should apply the patches?
Or does this need to be rebased?

(I am seeing conflicts)

Honza
Flags: needinfo?(rchien)
This patch is based on bug 1350223, so you should apply patch of bug 1350223 first and then apply all patches here. And also upgrade devtools-core to check the result.
Flags: needinfo?(rchien)
Fixed the issue of LocalizationHelper is not a constructor. It was a cyclic dependency when requiring 

"devtools/shared/l10n": "devtools-modules" within a StackTrace component because StackTrace is required in devtools-module index.js as well. Using an explicit require path can solve this problem.

"devtools/shared/l10n": "devtools-modules/shared/l10n"

On the other hand, we don't need to change anything and uncomment the code in devtools-module/index.js. Using explicit require path doesn't need to export module.
Comment on attachment 8853673 [details]
Bug 1352699 - Access single Services.prefs instance

https://reviewboard.mozilla.org/r/125764/#review128312

> I personally find PrefsHelper more elegant to use, I  wonder if we can't add it to devtools-modules as well.

Agree. PrefsHelper is more elegant but prefs settings haven't migrated to PrefsHelper yet. Not sure the PrefsHelper in devtools-module can work as expected. I'll try to convert it into PrefsHelper in following patch.
Comment on attachment 8853673 [details]
Bug 1352699 - Access single Services.prefs instance

https://reviewboard.mozilla.org/r/125764/#review128312

> Agree. PrefsHelper is more elegant but prefs settings haven't migrated to PrefsHelper yet. Not sure the PrefsHelper in devtools-module can work as expected. I'll try to convert it into PrefsHelper in following patch.

I'd prefer to drop this PrefsHelper support in this bug but I'm going to file a separate bug this. There are so many places haven't used to PrefsHelper so it will introduce a lot of efforts to this bug and block our progress.
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129852

::: devtools/client/netmonitor/index.js:43
(Diff revision 4)
> -// FIXME: Inject NetMonitorController to global window
> -window.NetMonitorController = NetMonitorController;
> +window.addEventListener("DOMContentLoaded", () => {
> +  if (appinfo.OS === "Darwin") {
> +    document.documentElement.setAttribute("platform", "mac");
> +  } else if (appinfo.OS === "Linux") {
> +    document.documentElement.setAttribute("platform", "linux");
> +  } else {
> +    document.documentElement.setAttribute("platform", "win");
> +  }
> +});

I feel like this is something that needs to be fixed in the theme-switching script itself.
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129852

> I feel like this is something that needs to be fixed in the theme-switching script itself.

This is a workaround which does merely support for running netmonitor on browser tab. index.js is an entry point by webpack to make everyone runs `yarn start` and develop our codebase like debugger.html.

The workaround referred to https://searchfox.org/mozilla-central/source/devtools/client/inspector/local-toolbox.js#46-68 and I think it's not a good way to add this workaround into theme-switching script itself.
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129852

> This is a workaround which does merely support for running netmonitor on browser tab. index.js is an entry point by webpack to make everyone runs `yarn start` and develop our codebase like debugger.html.
> 
> The workaround referred to https://searchfox.org/mozilla-central/source/devtools/client/inspector/local-toolbox.js#46-68 and I think it's not a good way to add this workaround into theme-switching script itself.

Ah, https://searchfox.org/mozilla-central/source/devtools/client/inspector/local-toolbox.js#46-68 is a workaround for theme-switching.js not working with devtools-html.

theme-switching.js handles the platform attribute normally, so if we can make theme-switching.js work with launchpad, that shouldn't be needed.
(In reply to Tim Nguyen :ntim from comment #46)
> Ah,
> https://searchfox.org/mozilla-central/source/devtools/client/inspector/local-
> toolbox.js#46-68 is a workaround for theme-switching.js not working with
> devtools-html.
> 
> theme-switching.js handles the platform attribute normally, so if we can
> make theme-switching.js work with launchpad, that shouldn't be needed.

Good point. theme-switching should support in devtools-module. Issue has been reported in devtools-core, please see https://github.com/devtools-html/devtools-core/issues/313
Comment on attachment 8853673 [details]
Bug 1352699 - Access single Services.prefs instance

https://reviewboard.mozilla.org/r/125764/#review129932

I also vote for using PrefsHelper


Honza

::: devtools/client/netmonitor/package.json:21
(Diff revision 6)
>      "react": "=15.3.2",
>      "react-dom": "=15.3.2",
>      "react-redux": "=5.0.3",
>      "redux": "^3.6.0",
>      "reselect": "^2.5.4"
>    },

I am missing devtools-splitter dependency
Attachment #8853673 - Flags: review?(odvarko) → review+
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129934

Looks good, but please see my inline comments.

Honza

::: devtools/client/netmonitor/src/assets/styles/netmonitor.css:5
(Diff revision 6)
>  /* This Source Code Form is subject to the terms of the Mozilla Public
>   * License, v. 2.0. If a copy of the MPL was not distributed with this
>   * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
>  
> +@import "resource://devtools/client/themes/light-theme.css";

What about dark-theme.css?

::: devtools/client/netmonitor/src/utils/create-store.js
(Diff revision 6)
>  
>  "use strict";
>  
>  const Services = require("Services");
>  const { createStore, applyMiddleware } = require("devtools/client/shared/vendor/redux");
> -const { thunk } = require("devtools/client/shared/redux/middleware/thunk");

Why remove thunk middleware? It could be useful in the future..
Attachment #8853674 - Flags: review?(odvarko) → review+
Comment on attachment 8853675 [details]
Bug 1352699 - Make netmonitor run on devtools-launchpad

https://reviewboard.mozilla.org/r/125768/#review129938

Looks good!

I am only missing:

"hotReloading": true, in development.json 

Honza

::: devtools/client/netmonitor/src/utils/create-store.js:44
(Diff revision 8)
>      ui: new UI({
>        columns: new Columns(inactiveColumns)
>      }),
>    };
>  
> -  return createStore(rootReducer, initialState, applyMiddleware(prefs, batching));
> +  return createStore(rootReducer, initialState, applyMiddleware(thunk, prefs, batching));

Alright, thunk is back :)
Attachment #8853675 - Flags: review?(odvarko) → review+
Comment on attachment 8853708 [details]
fixup! Bug 1352699 - Make netmonitor run on devtools-launchpad

https://reviewboard.mozilla.org/r/125784/#review129940
Attachment #8853708 - Flags: review?(odvarko) → review+
Comment on attachment 8854892 [details]
Bug 1352699 - Remove cyclic dependency in devtools loader

https://reviewboard.mozilla.org/r/126840/#review129942
Attachment #8854892 - Flags: review?(odvarko) → review+
Great work Ricky!

A few more comments:

1) I am seeing an exception when opening the side panel
Console Service ERROR [JavaScript Error: "TypeError: request.cause is undefined" {file: "http://localhost:8000/assets/build/netmonitor.js" line: 89264}] [JavaScript Error: "TypeError: request.cause is undefined" {file: "http://localhost:8000/assets/build/netmonitor.js" line: 89264}]

There should be additional check in tabbox-panel.js

Something like:

request.cause && request.cause.stacktrace && request.cause.stacktrace.length > 0 &&

2) I am seeing an exception when opening a context menu:

Console Service ERROR [JavaScript Error: "TypeError: Menu is not a constructor" {file: "http://localhost:8000/assets/build/netmonitor.js" line: 96480}] [JavaScript Error: "TypeError: Menu is not a constructor" {file: "http://localhost:8000/assets/build/netmonitor.js" line: 96480}]

This should be fixed in bug 1350224, right?

3) And I am seeing an exception when switching into the Response side panel

Console Service ERROR [JavaScript Error: "TypeError: SourceEditor is not a constructor" {file: "http://localhost:8000/assets/build/netmonitor.js" line: 94576}] [JavaScript Error: "TypeError: SourceEditor is not a constructor" {file: "http://localhost:8000/assets/build/netmonitor.js" line: 94576}]

It should be fixed in bug 1350226, I guess.

Honza
Comment on attachment 8853674 [details]
Bug 1352699 - Fix gStore instance issue in NetMonitorController

https://reviewboard.mozilla.org/r/125766/#review129934

> What about dark-theme.css?

It's unnecessary. devtools-launchpad will help us convert to dark theme automatically. You can try to set "theme": "dark", in netmonitor/configs/development.json to see dark theme effect.

> Why remove thunk middleware? It could be useful in the future..

thunk has been put back in Part 3 patch - Make netmonitor run on devtools-launchpad.
(In reply to Jan Honza Odvarko [:Honza] from comment #58)
> Great work Ricky!
> 
> A few more comments:
> 
> 1) I am seeing an exception when opening the side panel
> Console Service ERROR [JavaScript Error: "TypeError: request.cause is
> undefined" {file: "http://localhost:8000/assets/build/netmonitor.js" line:
> 89264}] [JavaScript Error: "TypeError: request.cause is undefined" {file:
> "http://localhost:8000/assets/build/netmonitor.js" line: 89264}]
> 
> There should be additional check in tabbox-panel.js
> 
> Something like:
> 
> request.cause && request.cause.stacktrace && request.cause.stacktrace.length
> > 0 &&

I'd like to file an another bug for dealing with this.

> 2) I am seeing an exception when opening a context menu:
> 
> Console Service ERROR [JavaScript Error: "TypeError: Menu is not a
> constructor" {file: "http://localhost:8000/assets/build/netmonitor.js" line:
> 96480}] [JavaScript Error: "TypeError: Menu is not a constructor" {file:
> "http://localhost:8000/assets/build/netmonitor.js" line: 96480}]
> 
> This should be fixed in bug 1350224, right?

Yep.

> 3) And I am seeing an exception when switching into the Response side panel
> 
> Console Service ERROR [JavaScript Error: "TypeError: SourceEditor is not a
> constructor" {file: "http://localhost:8000/assets/build/netmonitor.js" line:
> 94576}] [JavaScript Error: "TypeError: SourceEditor is not a constructor"
> {file: "http://localhost:8000/assets/build/netmonitor.js" line: 94576}]
> 
> It should be fixed in bug 1350226, I guess.

Yes.
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ed9cefa8d2db
Access single Services.prefs instance r=Honza
https://hg.mozilla.org/integration/autoland/rev/259e15518d23
Fix gStore instance issue in NetMonitorController r=Honza
https://hg.mozilla.org/integration/autoland/rev/a3ef74b43978
Make netmonitor run on devtools-launchpad r=Honza
https://hg.mozilla.org/integration/autoland/rev/5ce4dbfe0248
Remove cyclic dependency in devtools loader r=Honza
https://hg.mozilla.org/integration/autoland/rev/b4ea2d6a8a14
Fix mochitest failures r=Honza
Backed out for failing talos damp test:

https://hg.mozilla.org/integration/autoland/rev/5714b61f807bc44f4839ffe4fec7b31e8344382b
https://hg.mozilla.org/integration/autoland/rev/0d61f7536d0475415fd186d193c9ad29fb0ed7cb
https://hg.mozilla.org/integration/autoland/rev/401f2f3ad84395fc925fa4f28b89c8e68121a3dc
https://hg.mozilla.org/integration/autoland/rev/9f36570749931453a300c3211204bc5a9f664b34
https://hg.mozilla.org/integration/autoland/rev/195923c288da736ef665f6e54ff901866927078c

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=b4ea2d6a8a14bc7ccac0ba7a7484d917578209f0&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=89235426&repo=autoland

09:37:20     INFO -  TEST-START | damp
09:37:20     INFO -  operating with platform_type : linux_
09:37:20     INFO -  Initialising browser for damp test...
09:37:20     INFO -  TEST-INFO | started process 8461 (/builds/slave/test/build/application/firefox/firefox -profile /tmp/tmpcMqJ4b/profile http://localhost:55473/getInfo.html)
09:37:25     INFO -  PID 8461 | __metrics	Screen width/height:1600/1200
09:37:25     INFO -  PID 8461 | 	colorDepth:24
09:37:25     INFO -  PID 8461 | 	Browser inner width/height: 1024/697
09:37:25     INFO -  PID 8461 | __metrics
09:37:26     INFO -  PID 8461 | JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 673: Error: Phase "quit-application-granted" is finished, it is too late to register completion condition "SessionStore: flushing all windows"
09:37:26     INFO -  PID 8461 | JavaScript error: resource:///modules/BrowserUsageTelemetry.jsm, line 304: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]
09:37:27     INFO -  TEST-INFO | 8461: exit 0
09:37:27     INFO -  Browser initialized.
09:37:27     INFO -  Running cycle 1/1 for damp test...
09:37:27     INFO -  TEST-INFO | started process 8556 (/builds/slave/test/build/application/firefox/firefox -profile /tmp/tmpcMqJ4b/profile -tp file:/builds/slave/test/build/tests/talos/talos/tests/devtools/damp.manifest.develop -tpchrome -tpnoisy -tploadnocache -tpcycles 1 -tppagecycles 25)
09:37:39     INFO -  PID 8556 | RSS: Main: 156372992
09:37:39     INFO -  PID 8556 |
09:37:43     INFO -  PID 8556 | console.error:
09:37:43    ERROR -  PID 8556 |   Message: TypeError: doc.documentElement is null
09:37:43     INFO -  PID 8556 |   Stack:
09:37:43     INFO -  PID 8556 |     supportsHighlighters@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/inspector.js:2916:9
09:37:43     INFO -  PID 8556 | handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/protocol.js:1082:19
09:37:43     INFO -  PID 8556 | onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/main.js:1759:15
09:37:43     INFO -  PID 8556 | receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:761:7
09:37:43     INFO -  PID 8556 |
09:37:43     INFO -  PID 8556 | supportsHighlighters@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/inspector.js:2916:9
09:37:43     INFO -  PID 8556 | handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/protocol.js:1082:19
09:37:43     INFO -  PID 8556 | onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/main.js:1759:15
09:37:43     INFO -  PID 8556 | receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:761:7
09:37:48     INFO -  PID 8556 | *************************
09:37:48     INFO -  PID 8556 | A coding exception was thrown and uncaught in a Task.
09:37:48     INFO -  PID 8556 |
09:37:48    ERROR -  PID 8556 | Full message: TypeError: NetMonitorController is undefined
09:37:48     INFO -  PID 8556 | Full stack: Damp.prototype.waitForNetworkRequests<@chrome://damp/content/damp.js:120:5
09:37:48     INFO -  PID 8556 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
09:37:48     INFO -  PID 8556 | TaskImpl@resource://gre/modules/Task.jsm:277:3
09:37:48     INFO -  PID 8556 | asyncFunction@resource://gre/modules/Task.jsm:252:14
09:37:48     INFO -  PID 8556 | _getToolLoadingTests/subtests.netmonitorOpen<@chrome://damp/content/damp.js:325:30
09:37:48     INFO -  PID 8556 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
09:37:48     INFO -  PID 8556 | process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
09:37:48     INFO -  PID 8556 | walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
09:37:48     INFO -  PID 8556 | Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11
09:37:48     INFO -  PID 8556 | schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:770:7
09:37:48     INFO -  PID 8556 | completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:707:7
09:37:48     INFO -  PID 8556 | promise callback*completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:698:7
09:37:48     INFO -  PID 8556 | Promise.resolve/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:36
09:37:48     INFO -  PID 8556 | Promise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:390:5
09:37:48     INFO -  PID 8556 | Promise.resolve@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:10
09:37:48     INFO -  PID 8556 | onLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/toolbox.js:1477:7
09:37:48     INFO -  PID 8556 |
09:37:48     INFO -  PID 8556 | *************************
09:37:48     INFO -  PID 8556 | *************************
09:37:48     INFO -  PID 8556 | A coding exception was thrown and uncaught in a Task.
09:37:48     INFO -  PID 8556 |
09:37:48    ERROR -  PID 8556 | Full message: TypeError: NetMonitorController is undefined
09:37:48     INFO -  PID 8556 | Full stack: Damp.prototype.waitForNetworkRequests<@chrome://damp/content/damp.js:120:5
09:37:48     INFO -  PID 8556 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
09:37:48     INFO -  PID 8556 | TaskImpl@resource://gre/modules/Task.jsm:277:3
09:37:48     INFO -  PID 8556 | asyncFunction@resource://gre/modules/Task.jsm:252:14
09:37:48     INFO -  PID 8556 | _getToolLoadingTests/subtests.netmonitorOpen<@chrome://damp/content/damp.js:325:30
09:37:48     INFO -  PID 8556 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
09:37:48     INFO -  PID 8556 | process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
09:37:48     INFO -  PID 8556 | walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
09:37:48     INFO -  PID 8556 | Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11
09:37:48     INFO -  PID 8556 | schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:770:7
09:37:48     INFO -  PID 8556 | completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:707:7
09:37:48     INFO -  PID 8556 | promise callback*completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:698:7
09:37:48     INFO -  PID 8556 | Promise.resolve/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:36
09:37:48     INFO -  PID 8556 | Promise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:390:5
09:37:48     INFO -  PID 8556 | Promise.resolve@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:10
09:37:48     INFO -  PID 8556 | onLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/toolbox.js:1477:7
09:37:48     INFO -  PID 8556 |
09:37:48     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | A coding exception was thrown and uncaught in a Task.
09:42:28     INFO -  PID 8556 |
09:42:28    ERROR -  PID 8556 | Full message: TypeError: NetworkError when attempting to fetch resource.
09:42:28     INFO -  PID 8556 | Full stack:
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | A coding exception was thrown and uncaught in a Task.
09:42:28     INFO -  PID 8556 |
09:42:28    ERROR -  PID 8556 | Full message: TypeError: NetworkError when attempting to fetch resource.
09:42:28     INFO -  PID 8556 | Full stack:
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | A coding exception was thrown and uncaught in a Task.
09:42:28     INFO -  PID 8556 |
09:42:28    ERROR -  PID 8556 | Full message: TypeError: NetworkError when attempting to fetch resource.
09:42:28     INFO -  PID 8556 | Full stack:
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | *************************
09:42:28     INFO -  PID 8556 | A coding exception was thrown and uncaught in a Task.
09:42:28     INFO -  PID 8556 |
09:42:28    ERROR -  PID 8556 | Full message: TypeError: NetworkError when attempting to fetch resource.
09:42:28     INFO -  PID 8556 | Full stack:
09:42:28     INFO -  PID 8556 | *************************
10:37:27     INFO -  Timeout waiting for test completion; killing browser...
10:37:27     INFO -  Terminating psutil.Process(pid=8556, name='firefox')
10:37:27     INFO -  PID 8556 | ExceptionHandler::GenerateDump cloned child 8719
10:37:27     INFO -  PID 8556 | ExceptionHandler::SendContinueSignalToChild sent continue signal to child
10:37:27     INFO -  PID 8556 | ExceptionHandler::WaitForContinueSignal waiting for continue signal...
10:37:27     INFO -  TEST-UNEXPECTED-ERROR | damp | timeout
10:37:27    ERROR -  Traceback (most recent call last):
10:37:27     INFO -    File "/builds/slave/test/build/tests/talos/talos/run_tests.py", line 202, in run_tests
10:37:27     INFO -      talos_results.add(mytest.runTest(browser_config, test))
10:37:27     INFO -    File "/builds/slave/test/build/tests/talos/talos/ttest.py", line 70, in runTest
10:37:27     INFO -      return self._runTest(browser_config, test_config, setup)
10:37:27     INFO -    File "/builds/slave/test/build/tests/talos/talos/ttest.py", line 174, in _runTest
10:37:27     INFO -      if counter_management else None),
10:37:27     INFO -    File "/builds/slave/test/build/tests/talos/talos/talos_process.py", line 127, in run_browser
10:37:27     INFO -      raise TalosError("timeout")
10:37:27     INFO -  TalosError: timeout
Flags: needinfo?(rchien)
Comment on attachment 8853673 [details]
Bug 1352699 - Access single Services.prefs instance

https://reviewboard.mozilla.org/r/125764/#review129996

::: devtools/client/netmonitor/yarn.lock:16
(Diff revision 7)
>    resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.3.tgz#c3ca7434938648c3e0d9c1e328dd68b622c284ca"
>    dependencies:
>      mime-types "~2.1.11"
>      negotiator "0.6.1"
>  
> +<<<<<<< HEAD

nit: remove the diff

::: devtools/client/netmonitor/yarn.lock:187
(Diff revision 7)
>  
>  async@^1.3.0, async@^1.5.0:
>    version "1.5.2"
>    resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
>  
> +<<<<<<< HEAD

same here
Flags: needinfo?(rchien)
Ricky I'll rebase and land bug 1343774, so no NetmonitorController dependency on damp.js anymore after it land
I missed a NetMonitorController global in damp.js. Push a talo g2 test on try.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=f241aa9149cb99de50e7603ff952db5d74325528
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e22c18d39a92
Access single Services.prefs instance r=Honza
https://hg.mozilla.org/integration/autoland/rev/a822f74d410e
Fix gStore instance issue in NetMonitorController r=Honza
https://hg.mozilla.org/integration/autoland/rev/afbfe3a5cdb6
Make netmonitor run on devtools-launchpad r=Honza
https://hg.mozilla.org/integration/autoland/rev/48d3321e3474
Remove cyclic dependency in devtools loader r=Honza
https://hg.mozilla.org/integration/autoland/rev/2b6c014551e0
Fix mochitest failures r=Honza
Backout by cbook@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0ef40ed99074
Backed out changeset 2b6c014551e0 
https://hg.mozilla.org/integration/autoland/rev/18076352fdb1
Backed out changeset 48d3321e3474 
https://hg.mozilla.org/integration/autoland/rev/9e611e21339d
Backed out changeset afbfe3a5cdb6 
https://hg.mozilla.org/integration/autoland/rev/794b7cd76029
Backed out changeset a822f74d410e 
https://hg.mozilla.org/integration/autoland/rev/6471400d8fbe
Backed out changeset e22c18d39a92 for talos failures
Hmm... talos g2 failed again. This patch has rebased on top of bug 1343774.

Here is talos g2 test on try:

https://treeherder.mozilla.org/#/jobs?repo=try&revision=a69d6edbbbe1e1ce61debff73a85feaaededd61f

As soon as try is green, we can land it again.
We're sorry - something has gone wrong while rewriting or rebasing your commits. The commits being pushed no longer match what was requested. Please file a bug.
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/bfbe4eb625ef
Access single Services.prefs instance r=Honza
https://hg.mozilla.org/integration/autoland/rev/c5af4cbaeaef
Fix gStore instance issue in NetMonitorController r=Honza
https://hg.mozilla.org/integration/autoland/rev/41b035e87e4c
Make netmonitor run on devtools-launchpad r=Honza
https://hg.mozilla.org/integration/autoland/rev/ebf51fe3e266
Remove cyclic dependency in devtools loader r=Honza
https://hg.mozilla.org/integration/autoland/rev/018647263e4a
Fix mochitest failures r=Honza
Backed out because it failed talos damp again:

https://hg.mozilla.org/integration/autoland/rev/75227d08f0fa65044d8b2931105363a65ca11d54
https://hg.mozilla.org/integration/autoland/rev/79f43ffa30e2ba89804425bd657f458c18bb8ed6
https://hg.mozilla.org/integration/autoland/rev/69f2aef9c4530adaaff2c8b6a58e646b9ce16989
https://hg.mozilla.org/integration/autoland/rev/67565a13d1a3abea5b4bed4405e647b6a4cbe7f7
https://hg.mozilla.org/integration/autoland/rev/22a0a8aff69d7e9d8faa24cea5b9761f27816d81

Push with failures: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=018647263e4a3d8c8158ce5a191be274b35877f1&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable
Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=89554558&repo=autoland

08:23:53     INFO -  TEST-START | damp
08:23:53     INFO -  operating with platform_type : linux_
08:23:53     INFO -  Initialising browser for damp test...
08:23:53     INFO -  TEST-INFO | started process 29525 (/builds/slave/test/build/application/firefox/firefox -profile /tmp/tmpSjZ7ct/profile http://localhost:45030/getInfo.html)
08:23:57     INFO -  PID 29525 | __metrics	Screen width/height:1600/1200
08:23:57     INFO -  PID 29525 | 	colorDepth:24
08:23:57     INFO -  PID 29525 | 	Browser inner width/height: 1024/697
08:23:57     INFO -  PID 29525 | __metrics
08:23:58     INFO -  PID 29525 | JavaScript error: resource://gre/modules/AsyncShutdown.jsm, line 673: Error: Phase "quit-application-granted" is finished, it is too late to register completion condition "SessionStore: flushing all windows"
08:23:58     INFO -  PID 29525 | JavaScript error: resource:///modules/BrowserUsageTelemetry.jsm, line 304: NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIObserverService.removeObserver]
08:23:59     INFO -  TEST-INFO | 29525: exit 0
08:23:59     INFO -  Browser initialized.
08:23:59     INFO -  Running cycle 1/1 for damp test...
08:23:59     INFO -  TEST-INFO | started process 29621 (/builds/slave/test/build/application/firefox/firefox -profile /tmp/tmpSjZ7ct/profile -tp file:/builds/slave/test/build/tests/talos/talos/tests/devtools/damp.manifest.develop -tpchrome -tpnoisy -tploadnocache -tpcycles 1 -tppagecycles 25)
08:24:12     INFO -  PID 29621 | RSS: Main: 156651520
08:24:12     INFO -  PID 29621 |
08:24:15     INFO -  PID 29621 | console.error:
08:24:15    ERROR -  PID 29621 |   Message: TypeError: doc.documentElement is null
08:24:15     INFO -  PID 29621 |   Stack:
08:24:15     INFO -  PID 29621 |     supportsHighlighters@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/inspector.js:2916:9
08:24:15     INFO -  PID 29621 | handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/protocol.js:1082:19
08:24:15     INFO -  PID 29621 | onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/main.js:1759:15
08:24:15     INFO -  PID 29621 | receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:761:7
08:24:15     INFO -  PID 29621 |
08:24:15     INFO -  PID 29621 | supportsHighlighters@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/actors/inspector.js:2916:9
08:24:15     INFO -  PID 29621 | handler@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/protocol.js:1082:19
08:24:15     INFO -  PID 29621 | onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/server/main.js:1759:15
08:24:15     INFO -  PID 29621 | receiveMessage@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/shared/transport/transport.js:761:7
08:24:19     INFO -  PID 29621 | *************************
08:24:19     INFO -  PID 29621 | A coding exception was thrown and uncaught in a Task.
08:24:19     INFO -  PID 29621 |
08:24:19    ERROR -  PID 29621 | Full message: TypeError: NetMonitorController is undefined
08:24:19     INFO -  PID 29621 | Full stack: Damp.prototype.waitForNetworkRequests<@chrome://damp/content/damp.js:120:5
08:24:19     INFO -  PID 29621 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
08:24:19     INFO -  PID 29621 | TaskImpl@resource://gre/modules/Task.jsm:277:3
08:24:19     INFO -  PID 29621 | asyncFunction@resource://gre/modules/Task.jsm:252:14
08:24:19     INFO -  PID 29621 | _getToolLoadingTests/subtests.netmonitorOpen<@chrome://damp/content/damp.js:325:30
08:24:19     INFO -  PID 29621 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
08:24:19     INFO -  PID 29621 | process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
08:24:19     INFO -  PID 29621 | walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
08:24:19     INFO -  PID 29621 | Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11
08:24:19     INFO -  PID 29621 | schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:770:7
08:24:19     INFO -  PID 29621 | completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:707:7
08:24:19     INFO -  PID 29621 | promise callback*completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:698:7
08:24:19     INFO -  PID 29621 | Promise.resolve/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:36
08:24:19     INFO -  PID 29621 | Promise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:390:5
08:24:19     INFO -  PID 29621 | Promise.resolve@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:10
08:24:19     INFO -  PID 29621 | onLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/toolbox.js:1477:7
08:24:19     INFO -  PID 29621 |
08:24:19     INFO -  PID 29621 | *************************
08:24:19     INFO -  PID 29621 | *************************
08:24:19     INFO -  PID 29621 | A coding exception was thrown and uncaught in a Task.
08:24:19     INFO -  PID 29621 |
08:24:19    ERROR -  PID 29621 | Full message: TypeError: NetMonitorController is undefined
08:24:19     INFO -  PID 29621 | Full stack: Damp.prototype.waitForNetworkRequests<@chrome://damp/content/damp.js:120:5
08:24:19     INFO -  PID 29621 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
08:24:19     INFO -  PID 29621 | TaskImpl@resource://gre/modules/Task.jsm:277:3
08:24:19     INFO -  PID 29621 | asyncFunction@resource://gre/modules/Task.jsm:252:14
08:24:19     INFO -  PID 29621 | _getToolLoadingTests/subtests.netmonitorOpen<@chrome://damp/content/damp.js:325:30
08:24:19     INFO -  PID 29621 | TaskImpl_run@resource://gre/modules/Task.jsm:319:42
08:24:19     INFO -  PID 29621 | process@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:922:23
08:24:19     INFO -  PID 29621 | walkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:806:7
08:24:19     INFO -  PID 29621 | Promise*scheduleWalkerLoop@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:739:11
08:24:19     INFO -  PID 29621 | schedulePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:770:7
08:24:19     INFO -  PID 29621 | completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:707:7
08:24:19     INFO -  PID 29621 | promise callback*completePromise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:698:7
08:24:19     INFO -  PID 29621 | Promise.resolve/<@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:36
08:24:19     INFO -  PID 29621 | Promise@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:390:5
08:24:19     INFO -  PID 29621 | Promise.resolve@resource://gre/modules/Promise.jsm -> resource://gre/modules/Promise-backend.js:512:10
08:24:19     INFO -  PID 29621 | onLoad@resource://gre/modules/commonjs/toolkit/loader.js -> resource://devtools/client/framework/toolbox.js:1477:7
08:24:19     INFO -  PID 29621 |
08:24:19     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | A coding exception was thrown and uncaught in a Task.
08:29:00     INFO -  PID 29621 |
08:29:00    ERROR -  PID 29621 | Full message: TypeError: NetworkError when attempting to fetch resource.
08:29:00     INFO -  PID 29621 | Full stack:
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | A coding exception was thrown and uncaught in a Task.
08:29:00     INFO -  PID 29621 |
08:29:00    ERROR -  PID 29621 | Full message: TypeError: NetworkError when attempting to fetch resource.
08:29:00     INFO -  PID 29621 | Full stack:
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | A coding exception was thrown and uncaught in a Task.
08:29:00     INFO -  PID 29621 |
08:29:00    ERROR -  PID 29621 | Full message: TypeError: NetworkError when attempting to fetch resource.
08:29:00     INFO -  PID 29621 | Full stack:
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | *************************
08:29:00     INFO -  PID 29621 | A coding exception was thrown and uncaught in a Task.
08:29:00     INFO -  PID 29621 |
08:29:00    ERROR -  PID 29621 | Full message: TypeError: NetworkError when attempting to fetch resource.
08:29:00     INFO -  PID 29621 | Full stack:
08:29:00     INFO -  PID 29621 | *************************
09:23:59     INFO -  Timeout waiting for test completion; killing browser...
09:23:59     INFO -  Terminating psutil.Process(pid=29621, name='firefox')
09:23:59     INFO -  PID 29621 | ExceptionHandler::GenerateDump cloned child 29777
09:23:59     INFO -  PID 29621 | ExceptionHandler::SendContinueSignalToChild sent continue signal to child
09:23:59     INFO -  PID 29621 | ExceptionHandler::WaitForContinueSignal waiting for continue signal...
09:23:59     INFO -  TEST-UNEXPECTED-ERROR | damp | timeout
09:23:59    ERROR -  Traceback (most recent call last):
09:23:59     INFO -    File "/builds/slave/test/build/tests/talos/talos/run_tests.py", line 202, in run_tests
09:23:59     INFO -      talos_results.add(mytest.runTest(browser_config, test))
09:23:59     INFO -    File "/builds/slave/test/build/tests/talos/talos/ttest.py", line 70, in runTest
09:23:59     INFO -      return self._runTest(browser_config, test_config, setup)
09:23:59     INFO -    File "/builds/slave/test/build/tests/talos/talos/ttest.py", line 174, in _runTest
09:23:59     INFO -      if counter_management else None),
09:23:59     INFO -    File "/builds/slave/test/build/tests/talos/talos/talos_process.py", line 127, in run_browser
09:23:59     INFO -      raise TalosError("timeout")
09:23:59     INFO -  TalosError: timeout
Flags: needinfo?(rchien)
Flags: needinfo?(rchien)
Attachment #8853708 - Attachment is obsolete: true
(In reply to Ricky Chien [:rickychien] from comment #107)
> Created attachment 8856212 [details]
> Bug 1352699 - Fix mochitest failures
> 
> Review commit: https://reviewboard.mozilla.org/r/128158/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/128158/

Honza, I'm sorry for doing something wrong when rebasing my patches. I removed a patch accidentally, but now I've moved it back and then ask review again.
Comment on attachment 8856212 [details]
Bug 1352699 - Fix mochitest failures

https://reviewboard.mozilla.org/r/128158/#review130790

looks good, thanks
Attachment #8856212 - Flags: review?(gasolin) → review+
Pushed by rchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/26ee2969c5c8
Access single Services.prefs instance r=Honza
https://hg.mozilla.org/integration/autoland/rev/82b7f3560e2c
Fix gStore instance issue in NetMonitorController r=Honza
https://hg.mozilla.org/integration/autoland/rev/00873b2102fe
Make netmonitor run on devtools-launchpad r=Honza
https://hg.mozilla.org/integration/autoland/rev/4b10c4f5f91b
Remove cyclic dependency in devtools loader r=Honza
https://hg.mozilla.org/integration/autoland/rev/d3a67f59e7ee
Fix mochitest failures r=gasolin
Flags: qe-verify? → qe-verify+
QA Contact: ciprian.georgiu
Why was xpcom/base/ErrorList.h added back to VCS?

I thought it should be generated by xpcom/base/ErrorList.py in bug 1320179.
Flags: needinfo?(rchien)
Thanks! I've filed bug 1355370 folow-up for removing this.
Flags: needinfo?(rchien)
Link to a doc with instructions about how to run Netmonitor in Launchpad/browser tab.
http://searchfox.org/mozilla-central/source/devtools/client/netmonitor/README.md

Honza
I can confirm that netmonitor is working as expected on devtools-launchpad using latest Nightly 55.0a1 (2017-04-20) under Windows 10 x64. I managed to very this by following the doc instructions from Honza's comment 123. 

Marking this issue as verified fixed.
Status: RESOLVED → VERIFIED
Flags: qe-verify+
(In reply to Ciprian Georgiu, QA [:ciprian_georgiu] from comment #124)
> I can confirm that netmonitor is working as expected on devtools-launchpad
> using latest Nightly 55.0a1 (2017-04-20) under Windows 10 x64. I managed to
> very this by following the doc instructions from Honza's comment 123. 
> 
> Marking this issue as verified fixed.
Thanks Ciprian!

Is there anything we could improve (in the doc), so it's easier to follow
the instructions and load Net monitor in Launchpad?

Honza
Flags: needinfo?(ciprian.georgiu)
I think it will be useful to have some extra information in the "Quick Setup" section. The following step "Navigate to the netmonitor folder with your...", doesn't seem to include details where the netmonitor folder actually is. A note, saying that netmonitor is in the mozilla-central/devtools/client/netmonitor folder (after mozilla-central was cloned in order to get a local copy of the repository) will be helpful, to understand better where the "yarn install" and "yarn start" commands should be ran. 

Thanks!
Flags: needinfo?(ciprian.georgiu)
Thanks for the feedback, bug Bug 1361708 reported to cover that.

Honza
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: