Closed dzsodzso63 closed 3 years ago
when I tried to copy the report when the issue was experienced, the report was so big that this GH page failed to work
Could you please try attaching it as a file attachment or else email it to us: hello@wallabyjs.com? It sounds like it will have some information that will help us work out what's going on.
Could you also please try updating your runner params in your config file to include:
Assuming adding the additional chrome flags fixed the problem for you and closing the issue.
Unfortunately adding the chrome flags did not solve the issue. GPU is at 120% right now again. Now I attached the diag file. diagnostic.txt
@smcenlly pls reopen the issue
Is it possible for you to provide us with a sample and steps to reproduce the problem? The issue is most likely related to something that your tests are doing, and not Wallaby so I think that would be the fastest way to expedite a solution/identify the problem. If you are unable to share publicly, you may email us instead: hello@wallabyjs.com.
Ok, I will try to create a repo for it, the problem is that I have to rip off company data
@smcenlly Can you explain why the GPU is high when there's also the --disable-gpu
flag?
My Chrome Process with params started by wallaby:
MacOS/Google Chrome --disable-features=TranslateUI --disable-extensions --disable-component-extensions-with-background-pages --disable-background-networking --disable-sync --metrics-recording-only --disable-default-apps --mute-audio --no-default-browser-check --no-first-run --disable-backgrounding-occluded-windows --disable-renderer-backgrounding --disable-background-timer-throttling --force-fieldtrials=*BackgroundTracing/default/ --remote-debugging-port=52803 --user-data-dir=xxx --headless --disable-gpu --deterministic-fetch --window-size=900,1200 --disable-translate --disable-extensions --disable-background-networking --safebrowsing-disable-auto-update --disable-sync --metrics-recording-only --disable-default-apps --no-first-run about:blank
My GPU Helper process started by the headless chrome:
Helpers/Google Chrome Helper (GPU).app/Contents/MacOS/Google Chrome Helper (GPU) --type=gpu-process --field-trial-handle=1718379636,4196778797821824632,4102120611609483331,131072 --disable-features=PaintHolding,TranslateUI --headless --headless --gpu-preferences=UAAAAAAAAAAgAAAAAAAAAAAAAAAAAAAAAABgAAAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAJgEAAAAAAAAmAQAAAAAAACIAQAAMAAAAIABAAAAAAAAiAEAAAAAAACQAQAAAAAAAJgBAAAAAAAAoAEAAAAAAACoAQAAAAAAALABAAAAAAAAu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AAABAAAAAAAAAABwAAAA0AAAAQAAAAAAAAAAcAAAAOAAAAEAAAAAAAAAAIAAAAAAAAABAAAAAAAAAACAAAAAYAAAAQAAAAAAAAAAgAAAAHAAAAEAAAAAAAAAAIAAAACAAAABAAAAAAAAAACAAAAAoAAAAQAAAAAAAAAAgAAAALAAAAEAAAAAAAAAAIAAAADQAAABAAAAAAAAAACAAAAA4AAAAQAAAAAAAAAAoAAAAAAAAAEAAAAAAAAAAKAAAABgAAABAAAAAAAAAACgAAAAcAAAAQAAAAAAAAAAoAAAAIAAAAEAAAAAAAAAAKAAAACgAAABAAAAAAAAAACgAAAAsAAAAQAAAAAAAAAAoAAAANAAAAEAAAAAAAAAAKAAAADgAAAAgAAAAAAAAACAAAAAAAAAA= --use-gl=swiftshader-webgl --shared-files --seatbelt-client=20
Also inspecting the Chrome after a while more and more tabs are open and you can see the rendered results of tests there each tab is something like: localhost:[port]/wallaby_sandbox[num].html
Now the headless Chrome is at 200% again, and inspected it remotely. There are ~60 pages open, and many of it contains the tested rendered html. With css animations and everything. So it looks like that wallaby keeps opening new tabs w/o closing/reusing old tabs
Can you please try changing your Wallaby.js config to:
wallaby.js
const wallabyWebpack = require('wallaby-webpack');
process.env.BABEL_ENV = 'test';
process.env.NODE_ENV = 'test';
const webpackConfig = require('./config/webpack.config');
// removing babel-loader, we will use babel compiler instead, it's more performant
webpackConfig.module.rules = webpackConfig.module.rules.filter(
(rule) => rule.use !== 'babel-loader'
);
// removing unnecessary plugins
webpackConfig.plugins = webpackConfig.plugins.filter(
(plugin) =>
!(
plugin.constructor &&
['CleanWebpackPlugin', 'WebpackBarPlugin'].indexOf(
plugin.constructor.name
) > -1
)
);
delete webpackConfig.entry;
delete webpackConfig.output;
delete webpackConfig.devtool;
const wallabyPostprocessor = wallabyWebpack(webpackConfig);
module.exports = function (wallaby) {
return {
files: [
{
pattern: 'img/**/*.+(css|less|scss|sass|html|json|svg|png)',
load: false,
instrument: false,
},
{
pattern: 'packages/**/*.+(css|less|scss|sass|html|json|svg|png)',
load: false,
instrument: false,
},
{ pattern: 'packages/**/*.+(js|ts|tsx)', load: false },
{ pattern: 'config/**/*.+(js|ts)', load: false },
'!packages/**/*.test.+(js|ts|tsx)',
],
tests: [{ pattern: 'packages/**/*.test.+(js|ts|tsx)', load: false }],
postprocessor: wallabyPostprocessor,
env: {
type: 'browser',
kind: 'chrome',
params: {
runner:
'--disable-gpu --deterministic-fetch --window-size=900,1200 ' +
'--disable-translate --disable-extensions --disable-background-networking --safebrowsing-disable-auto-update --disable-sync ' +
'--metrics-recording-only --disable-default-apps --no-first-run',
},
},
bootstrap: function () {
window.__moduleBundler.loadTests();
},
testFramework: 'jasmine',
compilers: {
'**/*.+(js|ts|tsx)': wallaby.compilers.babel(),
},
screenshot: true,
// trace: true,
};
};
I've removed the --headless
flag so now you should see the browser window and you should see whether the tabs stay open (or not).
I'm using the same env
settings with https://github.com/wallabyjs/calculator-sample, and I can see that the tabs are being closed properly. If the tabs are not closing properly, I think it's related to your code and we'll need you to create a simple sample repo to help. You should be able to bisect your code and identify how to keep the tab not closing behavior until you have a simple / dummy test with none of your production/company data.
Working with a non-headless browser is painful, and keeps focusing to the browser window for every test run. Anyway, I can reproduce the problem modifying a fundamental dependency, so all tests running at once, making sometimes a tab open
Meanwhile, I have a workaround:
window.setTimeout(() => {
window.close();
}, 30 * 1000);
after rendering the react component being tested
Working with a non-headless browser is painful, and keeps focusing to the browser window for every test run.
Yes - ideally you only do this if you need to debug a problem.
Meanwhile, I have a workaround:
We're interested to know what was causing the window to remain open. Were you able to identify why? Do you get the same behavior if you run your tests outside of Wallaby?
I'm going to assume that the problem is solved for now and close this issue, if not, please respond and we can re-open.
I don't think we should close this. I am still trying to identify what causes the issue. The workaround is just an ugly hack, and shouldn't be the proper solution. (And the other thing is that when I run the same tests with karma, it is failing with this workaround when the timeout is shorter than the test run. so this is not safe at all. ) Will get back here, when I have more info about reproducing the bug
We'll keep the issue open for the next 7 days. If we haven't heard back from you by then, we'll close the issue.
Internally Wallaby uses a chrome remoting call to close the tab and reports any failures to your diagnostic log (which were empty). We'd appreciate if you're able to provide a reproducible sample.
Closing this issue as we haven't heard back. If/when you reply, we will re-open it.
Issue description or question
Google Chrome Helper (GPU) is on 100% when idle
It's not happening immediately, but after a while. When I restart wallaby, 's working properly again. It's unclear that which action causes the error, but after a while my computer heats up, and checking the processes reveals the error
The diagnostics report below is copied after the first test run, with no problem at all, when I tried to copy the report when the issue was experienced, the report was so big that this GH page failed to work
Wallaby diagnostics report