What does error code E26 from TestCafe mean? - testing

We are running TestCafe with numerous tests on a node.js web application with Chrome. From time to time we see error messages like this:
Error: { code: 'E26',
isTestCafeError: true,
callsite:
CallsiteRecord {
filename:
'step_actions.js',
lineNum: 101,
callsiteFrameIdx: 6,
stackFrames:
[ [CallSite],
[CallSite],
[CallSite],
[CallSite],
[CallSite],
[CallSite],
[CallSite],
[CallSite] ],
isV8Frames: true } }
What does this error mean? I cannot find anything about it.
We're still trying to understand, what the reason for the error is. All I know is that it is only occurring when handling a popup window.

Related

Getting No Tests Found In your File error, but I do have a test written

I am trying to run the following test on Cypress, but I am getting this error:
No tests found in your file:
/Users/Name/Desktop/MyFolder/cypress-tutorial-build-todo-starter/cypress/integration/app-init.spec.js
We could not detect any tests in the above file. Write some tests and re-run.
I thought I did have a test written as you can see below, especially since I have the it function. Can someone tell me why I may be getting this error? This is the second file I have with a test in my integration folder. Not sure if that makes a difference.
const todos = [
{
"id": 1,
"name": "Buy Milk",
"isComplete": false
},
{
"id": 2,
"name": "Buy Eggs",
"isComplete": false
},
{
"id": 3,
"name": "Buy Bread",
"isComplete": false
},
{
"id": 4,
"name": "Make French Toast",
"isComplete": false
}
]
describe('App Initialization', () => {
it.only('Loads todos on page load', () => {
cy.server()
cy.route('GET', '/api/todos', todos)
cy.visit('/')
})
cy.get('.todo-list li')
.should('have.length', 4)
})
As far as the log concern, it shows that app-init.spec.js file doesn't exist in /Users/Name/Desktop/MyFolder/cypress-tutorial-build-todo-starter/cypress/integration/
Please check the path in the directory and also verify the "integrationFolder" path in cypress.json. If the path doesn't match to the path where your test resides, then Cypress cannot detect test file to run.

Running Aurelia new project failed

I've just created Aurelia new project and when I run au run --watch (I am following this instructions: http://aurelia.io/hub.html#/doc/article/aurelia/framework/latest/contact-manager-tutorial/1), I got this message from console. I'm quite new in JS and don't know anything about error code so can anybody tell me what's wrong?
{ uid: 11,
name: 'writeBundles',
branch: false,
error: [SyntaxError: Block-scoped declarations (let, const,function,class) not yet supported outside strict mode],
duration: [ 1, 536524679 ],
time: 1493576142781 }
You'll need node.js version 6 and above for es2015 features like let, const and class

How do I get the Aurelia-cli to provide a stack trace on a gulp plugin error?

To any Aurelia CLI pros out there:
I've successfully got karma code coverage setup and mapping the bundled output back to my typescript sources, but the karma plugin is throwing an error when generating the output. See here:
{ uid: 0,
name: 'unit',
branch: false,
error:
{ [TypeError: Cannot read property 'split' of null]
domain:
Domain {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
members: [] },
domainThrown: true },
duration: [ 1, 611956616 ],
time: 1474556751202 }
{ [TypeError: Cannot read property 'split' of null]
domain:
Domain {
domain: null,
_events: {},
_eventsCount: 0,
_maxListeners: undefined,
members: [] },
domainThrown: true }
How do I tell the CLI to give me the stack trace so that I can go and fix the issue in the plugin?
Here is a project that demonstrates the problem:
https://github.com/Roustalski/aurelia-typescript-coverage
Follow the instructions in the README.
You can actually step through CLI: How to debug Aurelia CLI
TL:DR Using vscode you can setup launch target for node and execute cli with debugger attached.

PushNotification -- no device found

I have a hybrid app and having some issue seeing notification..
I get the error
com.ibm.pushworks.server.exceptions.PushWorksException: FPWSE0009E: Internal server error. No devices found
I running on Local MFP (eclipse -- V7.1).. I see the device in the worklightconsole and the app is install on my phone (Xcode->phone via USB) and I see the opt-in notification message.. However, I get the error when I tried to send a push..
I am using postman and the restAPI
http://localhost:10080/worklightadmin/management-apis/1.0/runtimes/MyMobile/notifications/applications/myProj/messages
Here is the body of the post request
{
"message": {
"alert": "Test message"
},
"settings": {
"apns": {
"badge": 1,
"iosActionKey": "Ok",
"payload": {},
"sound": "song.mp3"
},
"gcm": {
"payload": {},
"sound": "song.mp3"
}
},
"target": {
"consumerIds": [],
"deviceIds": ["166CB698-45C2-4C61-9074-248EA4F8AA8F"],
"platforms": [
"A","G"
]
}
}
Can you give some hints to solve this issue ..
Thanks
As Vivin mentioned in the comments, your device ID may be wrong.
The same JSON works for me , in my local setup. Is it possible the device id you entered is wrong? With the current parameters within "target" you can get the error message only if the device id is wrong.

Taking screenshots with Selenium Builder

Using Selenium Builder, I've created the following json file:
{
"type": "script",
"seleniumVersion": "2",
"formatVersion": 2,
"steps": [
{
"type": "get",
"url": "http://stackoverflow.com/"
},
{
"type": "saveScreenshot",
"file": foo.png"
}
],
"data": {
"configs": {},
"source": "none"
},
"inputs": [],
"timeoutSeconds": 60
}
I tried running it on Windows 7 and two different Ubuntu machines. Instead of the filepath "foo.png" I had also inserted "E:\foo.png" / "/home/swege/foo.png". However, I always get the "exception":
Could not take screenshot of current page - [object Object]
At least I would like to be able to read the "error object", but every system just puts out that the error is a JavaScript object. Any idea how to fix the issue or read the full error message?
Try following :
http://www.ontestautomation.com/how-to-create-screenshots-in-your-selenium-webdriver-tests/
Above can help you to get exact code that how you can take screenshots using selenium.
So I pulled down and looked at the source for Selenium Builder 2 and found two files that I think show the origin of the error, command_processor.js and driver_component.js.
I can't make out why the error is occurring - maybe someone here can build on this?
Try using a full file path, not just foo.png. On Mac, these worked for me: ~/foo.png and ~/Downloads/screenshots/foo.png.
It's also important that the folder exists and is writable by the account running the web browser.