-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CY:command is showing few "uncaught exceptions", how to filter them #118
Comments
Cypress and the plugin version? |
it worked fine with cypress 6.6 and "cypress-terminal-report": "^1.4.1"
cons:warn ❖ @ngrx/store: runtime checks are currently opt-in but will be the default in the next major version with the possibility to opt-out, see https://ngrx.io/guide/migration/v8 for more information. |
When you run the test in the ui browser and check the inspector console don't you have a full stack trace for that error? It would really help to know the source of the error. The logs on terminal I suppose don't show the trace. |
i see mostly it is showing that when it is hitting "/assets/newrelic/newrelic-qa.js:1 " it is causing the error in console /assets/newrelic/newrelic-qa.js:1 Uncaught TypeError: Cannot set property 'status' of undefined |
That seems to be an error not from this plugin. In any case if it's a console error it should show in cypress-terminal-report as Please send also a screenshot how it shows in terminal. And see if you disable the plugin in support install does it still shows this error in the browser. |
|
Not sure if related, but after upgrading to 3.3.1 we started seeing |
I have looked into the code of the plugin and there is no place where we try to set The really strange part that I don't yet understand is how that error message gets into the command log.
Cause as you can see this is how we compose the log for this: Cypress.on('log:added', (options) => {
if (
options.instrument === 'command' &&
options.consoleProps &&
!['xhr', 'log', 'request'].includes(options.name) &&
!(options.name === 'task' && options.message.match(/ctrLogMessages/))
) {
const log = options.name + '\t' + options.message;
const severity = options.state === 'failed' ? CONSTANTS.SEVERITY.ERROR : '';
this.collectorState.addLog([LOG_TYPE.CYPRESS_COMMAND, log, severity], options.id);
}
}); What seems to be happening is that I suspect this is either cypress internal or somehow an issue with your setup. Can you try to revert to cypress 6.6 or upgrade to newer cypress version and see if it reproduces? On the other hand you could also try keeping cypress 7.6 and reverting this plugin to like 2.x |
Actually I think I have found your issue. Seems to be some incompatibility between newrelic and cypress. Please see if this thread helps you https://discuss.newrelic.com/t/exception-in-nrwrapper/72759/21 |
I am closing this for now as most things point to external issue. If you decide to ignore the error and just filter it the following should work: {
filterLog: ([type, message]) => message.indexOf('TypeError: Cannot set property \'status\' of undefined') == -1,
} |
we are seeing bunch of "cy:command ✔ uncaught exception TypeError: Cannot set property 'status' of undefined", errors in the terminal report. is there a way to filter them out and not show these in the report?
i tried using this, but it didnot work. any help on how to filter them please?
filterLog: ([type]) => {
if (["cy:command"].includes(
uncaught exception TypeError: Cannot set property 'status' of undefined
)) {return false
}
}
The text was updated successfully, but these errors were encountered: