Trying to test any addon for jira cloud.
A lot of errors visible in console, check screenshots below.
Errors may be connected to @jennifer-shehane issue: https://github.com/cypress-io/cypress/issues/1436, I found the same fn of undefined
visible in logs.
Jira Cloud is using iframes to display addons, so there may be the source of errors. I had to disable web security and use ignore x headers plugin for log in.
In sources I found potential fixes https://github.com/cypress-io/cypress/blob/6960f7cd78c9d730ed2d595faf5dc0a06d524270/packages/proxy/lib/http/util/regex-rewriter.ts#L8.
Jira cloud renders addons.
Ready to use example in https://github.com/galczo5/cypress-jira-cloud
Cypress: 4.11.0
Chromium: 83
Tested on Pop OS and MacOS, same result
I can recreate this from the provided repo https://github.com/galczo5/cypress-jira-cloud Basically after logging in, the page gets stuck on a loading spinner and has a lot of errors displayed in the console.
I have an issue that appears similar, trying to test a jira cloud addon.
Disabled web security to try to bypass cross origin redirect and ended up with errors.
I'm not using an ignore headers plugin
Watching :)
Highly interested in having it fixed!
I'm looking forward for fix that
@jennifer-shehane do you need more details from me?
Any news? I really need this to be fixed
We have the same issue and would like a resolution promptly.
This defect renders Cypress inoperable for the Jira stack.
I am able to get the example provided in the original comment working, with a few extra steps.
--browser chrome
during cypress run
- as the ignore-xframe-headers plugin workaround will not apply in Electron.uncaught:exception
handler to avoid failing tests - since there are some errors being thrown from the application under test. "chromeWebSecurity": false
to your cypress.json
The previous example had a userAgent
defined in its cypress.json
. This would cause an error in Jira saying third party cookies need to be accepted. Removing the userAgent
configuration fixed this. May be related to this.
cypress open
- where it will go to a dead link. Notice: At the end of the day, their website is doing a lot of things that prevent it from running well within the Cypress Test Runner. This is big reason that we advise you to not test websites that are not under your direct control. Atlassian could change their site tomorrow and none of our workarounds above will work anymore, so there's no guarantee.
Working example
spec.js
Cypress.on('uncaught:exception', (err, runnable) => {
return false // this is required!
})
it('Jira cloud', () => {
cy.visit('https://cypress-testing.atlassian.net/')
cy.get('#username').type('[email protected]')
cy.get('#login-submit').click()
cy.get('#password').type('sdAA3@sd!@;')
cy.get('#login-submit').click()
// the code below here is outdated,
// so I'm not sure what was meant to be tested after login
})
cypress/plugins/index.js
const path = require('path');
// this should point to a local version of the ignore-x-frame-headers plugin
// https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe
const extensionUnZipped = path.join(__dirname, '../../IgnoreXFramesPlugin');
module.exports = (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
// this only works in Chrome, not Electron.
// pass '--browser chrome' during 'cypress run'
launchOptions.extensions.push(extensionUnZipped);
return launchOptions;
});
}
cypress.json
{
"chromeWebSecurity": false,
"defaultCommandTimeout": 30000
}
Hi Jennifer:
Thank you for responding.
We cannot ignore xframe headers – It is a security requirement and part of the Jira authentication that we must have them.
No xframe headers = no app. They shut down the app for non-compliance within 24 hours.
Atlassian makes the rules and they do not compromise on this.
Milan – please will you provide some examples of the snippets of code for Jennifer ASAP.
Regards,
Becci
Becci Watson
m: 0412 029 903
Int: +61-412 029 903
email: [email protected]becci@becciwatson.com.au
blog: BecciWatson.com.au
linkedIn: www.linkedin.com/in/becciwatsonhttp://www.linkedin.com/in/becciwatson
From: Jennifer Shehane notifications@github.com
Sent: Thursday, 22 October 2020 4:20 PM
To: cypress-io/cypress cypress@noreply.github.com
Cc: Becci Watson becci@telewebica.com.au; Manual manual@noreply.github.com
Subject: Re: [cypress-io/cypress] Testing on jira cloud website hangs trying to load page (#8146)
I am able to get the example provided in the original comment working, with a few extra steps.
The previous example had a userAgent defined in its cypress.json. This would cause an error in Jira saying third party cookies need to be accepted. Removing the userAgent configuration fixed this. May be related to thishttps://community.atlassian.com/t5/Jira-questions/how-to-resolve-Please-make-sure-your-browser-has-third-party/qaq-p/591612.
[Screen Shot 2020-10-22 at 11 27 32 AM]https://user-images.githubusercontent.com/1271364/96826568-9b97e500-1459-11eb-8317-68da4514c5a7.png
Notice: At the end of the day, their website is doing a lot of things that prevent it from running well within the Cypress Test Runner. This is big reason that we advise you to not test websites that are not under your direct control. Atlassian could change their site tomorrow and none of our workarounds above will work anymore, so there's no guarantee.
Working example
spec.js
Cypress.on('uncaught:exception', (err, runnable) => {
return false // this is required!
})
it('Jira cloud', () => {
cy.visit('https://cypress-testing.atlassian.net/')
cy.get('#username').type('[email protected]')
cy.get('#login-submit').click()
cy.get('#password').type('sdAA3@sd!@;')
cy.get('#login-submit').click()
// the code below here is outdated,
// so I'm not sure what was meant to be tested after login
})
cypress/plugins/index.js
const path = require('path');
// this should point to a local version of the ignore-x-frame-headers plugin
// https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe
const extensionUnZipped = path.join(__dirname, '../../IgnoreXFramesPlugin');
module.exports = (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
// this only works in Chrome, not Electron.
// pass '--browser chrome' during 'cypress run'
launchOptions.extensions.push(extensionUnZipped);
return launchOptions;
});
}
cypress.json
{
"chromeWebSecurity": false,
"defaultCommandTimeout": 30000
}
[https://camo.githubusercontent.com/ed011e82c8c502c8803f84b1eb5fbd9b0d4b2095/687474703a2f2f672e7265636f726469742e636f2f4c456547775459514d392e676966]https://camo.githubusercontent.com/ed011e82c8c502c8803f84b1eb5fbd9b0d4b2095/687474703a2f2f672e7265636f726469742e636f2f4c456547775459514d392e676966
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/cypress-io/cypress/issues/8146#issuecomment-714234881, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMWRHXZH6NMYGYPUSVDBDUTSL66IPANCNFSM4PQOUCLA.
Milan:
Please provide details of this bug to Jennifer directly.
Do not put any details of our code on public websites.
Cypress should know better than this to make all bugs public.
Regards,
Becci
Becci Watson
m: 0412 029 903
Int: +61-412 029 903
email: [email protected]becci@becciwatson.com.au
blog: BecciWatson.com.au
linkedIn: www.linkedin.com/in/becciwatsonhttp://www.linkedin.com/in/becciwatson
From: Jennifer Shehane notifications@github.com
Sent: Thursday, 22 October 2020 4:20 PM
To: cypress-io/cypress cypress@noreply.github.com
Cc: Becci Watson becci@telewebica.com.au; Manual manual@noreply.github.com
Subject: Re: [cypress-io/cypress] Testing on jira cloud website hangs trying to load page (#8146)
I am able to get the example provided in the original comment working, with a few extra steps.
The previous example had a userAgent defined in its cypress.json. This would cause an error in Jira saying third party cookies need to be accepted. Removing the userAgent configuration fixed this. May be related to thishttps://community.atlassian.com/t5/Jira-questions/how-to-resolve-Please-make-sure-your-browser-has-third-party/qaq-p/591612.
[Screen Shot 2020-10-22 at 11 27 32 AM]https://user-images.githubusercontent.com/1271364/96826568-9b97e500-1459-11eb-8317-68da4514c5a7.png
Notice: At the end of the day, their website is doing a lot of things that prevent it from running well within the Cypress Test Runner. This is big reason that we advise you to not test websites that are not under your direct control. Atlassian could change their site tomorrow and none of our workarounds above will work anymore, so there's no guarantee.
Working example
spec.js
Cypress.on('uncaught:exception', (err, runnable) => {
return false // this is required!
})
it('Jira cloud', () => {
cy.visit('https://cypress-testing.atlassian.net/')
cy.get('#username').type('[email protected]')
cy.get('#login-submit').click()
cy.get('#password').type('sdAA3@sd!@;')
cy.get('#login-submit').click()
// the code below here is outdated,
// so I'm not sure what was meant to be tested after login
})
cypress/plugins/index.js
const path = require('path');
// this should point to a local version of the ignore-x-frame-headers plugin
// https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe
const extensionUnZipped = path.join(__dirname, '../../IgnoreXFramesPlugin');
module.exports = (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
// this only works in Chrome, not Electron.
// pass '--browser chrome' during 'cypress run'
launchOptions.extensions.push(extensionUnZipped);
return launchOptions;
});
}
cypress.json
{
"chromeWebSecurity": false,
"defaultCommandTimeout": 30000
}
[https://camo.githubusercontent.com/ed011e82c8c502c8803f84b1eb5fbd9b0d4b2095/687474703a2f2f672e7265636f726469742e636f2f4c456547775459514d392e676966]https://camo.githubusercontent.com/ed011e82c8c502c8803f84b1eb5fbd9b0d4b2095/687474703a2f2f672e7265636f726469742e636f2f4c456547775459514d392e676966
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/cypress-io/cypress/issues/8146#issuecomment-714234881, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMWRHXZH6NMYGYPUSVDBDUTSL66IPANCNFSM4PQOUCLA.
@becciwatson try to set window.name
to @atlassian/spa-iframe
before you load Jira page. Somehow it works, but there is no information what is it and how long it will be supported.
Hi Jenifer,
As we agreed, here is the bug for Jira add-on loading:
https://github.com/cypress-io/cypress/issues/8958
I hope it will be fixed soon.
Kind Regards,
Milan Suka
From: Becci Watson notifications@github.com
Sent: Thursday, October 22, 2020 7:58 AM
To: cypress-io/cypress cypress@noreply.github.com
Cc: Milan Å uka milan@becciwatson.com.au; Manual manual@noreply.github.com
Subject: Re: [cypress-io/cypress] Testing on jira cloud website hangs trying to load page (#8146)
Hi Jennifer:
Thank you for responding.
We cannot ignore xframe headers – It is a security requirement and part of the Jira authentication that we must have them.
No xframe headers = no app. They shut down the app for non-compliance within 24 hours.
Atlassian makes the rules and they do not compromise on this.
Milan – please will you provide some examples of the snippets of code for Jennifer ASAP.
Regards,
Becci
Becci Watson
m: 0412 029 903
Int: +61-412 029 903
email: [email protected]
blog: BecciWatson.com.au
linkedIn: www.linkedin.com/in/becciwatson http://www.linkedin.com/in/becciwatson%3chttp:/www.linkedin.com/in/becciwatson http://www.linkedin.com/in/becciwatson
From: Jennifer Shehane <[email protected] notifications@github.com >
Sent: Thursday, 22 October 2020 4:20 PM
To: cypress-io/cypress <[email protected] cypress@noreply.github.com >
Cc: Becci Watson <[email protected] becci@telewebica.com.au >; Manual <[email protected] manual@noreply.github.com >
Subject: Re: [cypress-io/cypress] Testing on jira cloud website hangs trying to load page (#8146)
I am able to get the example provided in the original comment working, with a few extra steps.
The previous example had a userAgent defined in its cypress.json. This would cause an error in Jira saying third party cookies need to be accepted. Removing the userAgent configuration fixed this. May be related to thishttps://community.atlassian.com/t5/Jira-questions/how-to-resolve-Please-make-sure-your-browser-has-third-party/qaq-p/591612.
[Screen Shot 2020-10-22 at 11 27 32 AM]https://user-images.githubusercontent.com/1271364/96826568-9b97e500-1459-11eb-8317-68da4514c5a7.png
Notice: At the end of the day, their website is doing a lot of things that prevent it from running well within the Cypress Test Runner. This is big reason that we advise you to not test websites that are not under your direct control. Atlassian could change their site tomorrow and none of our workarounds above will work anymore, so there's no guarantee.
Working example
spec.js
Cypress.on('uncaught:exception', (err, runnable) => {
return false // this is required!
})
it('Jira cloud', () => {
cy.visit('https://cypress-testing.atlassian.net/')
cy.get('#username').type('[email protected]')
cy.get('#login-submit').click()
cy.get('#password').type('sdAA3@sd!@;')
cy.get('#login-submit').click()
// the code below here is outdated,
// so I'm not sure what was meant to be tested after login
})
cypress/plugins/index.js
const path = require('path');
// this should point to a local version of the ignore-x-frame-headers plugin
// https://chrome.google.com/webstore/detail/ignore-x-frame-headers/gleekbfjekiniecknbkamfmkohkpodhe
const extensionUnZipped = path.join(__dirname, '../../IgnoreXFramesPlugin');
module.exports = (on, config) => {
on('before:browser:launch', (browser = {}, launchOptions) => {
// this only works in Chrome, not Electron.
// pass '--browser chrome' during 'cypress run'
launchOptions.extensions.push(extensionUnZipped);
return launchOptions;
});
}
cypress.json
{
"chromeWebSecurity": false,
"defaultCommandTimeout": 30000
}
[https://camo.githubusercontent.com/ed011e82c8c502c8803f84b1eb5fbd9b0d4b2095/687474703a2f2f672e7265636f726469742e636f2f4c456547775459514d392e676966]https://camo.githubusercontent.com/ed011e82c8c502c8803f84b1eb5fbd9b0d4b2095/687474703a2f2f672e7265636f726469742e636f2f4c456547775459514d392e676966
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHubhttps://github.com/cypress-io/cypress/issues/8146#issuecomment-714234881, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AMWRHXZH6NMYGYPUSVDBDUTSL66IPANCNFSM4PQOUCLA.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub https://github.com/cypress-io/cypress/issues/8146#issuecomment-714249249 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AQLXZ3AEXDOD6744NJOUJ33SL7CW7ANCNFSM4PQOUCLA . https://github.com/notifications/beacon/AQLXZ3G6C43COEHAWXRQLVDSL7CW7A5CNFSM4PQOUCLKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFKJJIII.gif
Hi @jennifer-shehane Jennifer: this workaround has not resolved the problem. Please can we have an update on this.
Most helpful comment
I have an issue that appears similar, trying to test a jira cloud addon.
Disabled web security to try to bypass cross origin redirect and ended up with errors.
I'm not using an ignore headers plugin
Watching :)