Skip to content
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

Investigate Salesforce API logins being broken #24290

Closed
nagash77 opened this issue Oct 18, 2022 · 22 comments · Fixed by #25307
Closed

Investigate Salesforce API logins being broken #24290

nagash77 opened this issue Oct 18, 2022 · 22 comments · Fixed by #25307
Assignees
Labels

Comments

@nagash77
Copy link
Contributor

nagash77 commented Oct 18, 2022

We want to look into several tickets involving Salesforce API authentication being broken by the latest Winter 22 release.

#23958, #24303

An older ticket that is still open - #2367

Also appears to impact Salesforce applications prior to login: #24418

@AtofStryker
Copy link
Contributor

AtofStryker commented Oct 18, 2022

I created a reprod which is heavily based on some of the users provided reproductions here. I can provide the credentials if needed. I investigated for a bit and it looks like the markup://search_lightning:store is missing from the config options, but is present when functioning normally as top
Screen Shot 2022-10-18 at 3 25 34 PM

@alexanderg1982
Copy link

Hi
Any news regarding these issues?

@aliaksei-liauchuk-incountry

Are there any news this issue?

@AtofStryker
Copy link
Contributor

@alexanderg1982 @aliaksei-liauchuk-incountry no updates on this currently, but we hope to look into this soon and will provide updates once we have something more to report.

@tzioprodly
Copy link

Hey guys, I am also experiencing this issue...

@rzorzos
Copy link

rzorzos commented Nov 7, 2022

Is there a workaround on this at least? Or should we just wait for the resolve?

@tit
Copy link

tit commented Nov 7, 2022

Found Workaround. Use Firefox (not Chrome).
In Firefox Salesforce login is worked.

@TamirZano
Copy link

We want to look into several tickets involving Salesforce API authentication being broken by the latest Winter 22 release.

#23958, #24303

An older ticket that is still open - #2367

Also appears to impact Salesforce applications prior to login: #24418

@TamirZano
Copy link

Are there any news this issue?

@jeanabanto
Copy link

Any updates on this issue?

@AtofStryker
Copy link
Contributor

no updates currently, but we will comment on the issue when we have news.

@AtofStryker AtofStryker self-assigned this Dec 6, 2022
@AtofStryker
Copy link
Contributor

Hey all. I will be beginning to look into this issue in the next few days and hopefully we can derive a solution. We appreciate your patience!

@jpatil14
Copy link

Hi @AtofStryker , Thanks for looking into it. Would you be able to provide any ETA?

@AtofStryker
Copy link
Contributor

Hi @jpatil14 . No ETA for a fix yet, but investing right now is my sole focus. I explored a few things the past few days and was able to rule out some things, but haven't been able to determine root cause. Trying a different approach today and hoping I have better luck!

@jpatil14
Copy link

Hi @jpatil14 . No ETA for a fix yet, but investing right now is my sole focus. I explored a few things the past few days and was able to rule out some things, but haven't been able to determine root cause. Trying a different approach today and hoping I have better luck!

Thank you. Lets hope it gets resolved. Well its not only blocking actual SF application but our other application too which is based on SF. That other application used to work before 23 release but since 23 release its not working at all. At least we can run actual SF application in firefox browser but our other application is neither working in chrome nor in firefox.

@AtofStryker
Copy link
Contributor

I did want to provide an update from some of the findings from the current investigation. The reason the site will not load in chrome with Cypress is that, for some reason, Proxy objects are missing in the salesforce sandbox. A lot of these commands are executed in an isolated sandbox, which might be different from iframe vs. running as top vs. firefox. Continuing to look into this to figure out why Proxy objects as a whole are missing.

Just a heads up it does take some time to get feedback, as we are debugging 6-10MB of minified JavaScript 😅 . A lot of these functions are also dynamically executed in eval statements making this even more challenging.

Salesforce Winter in Firefox or Chromium as top

Salesforce Winter in Chromium in iframe

@emilyrohrbough emilyrohrbough added stage: investigating Someone from Cypress is looking into this topic: auth labels Dec 20, 2022
@AtofStryker
Copy link
Contributor

UPDATE: We were able to figure out the root cause. When Cypress injects it's test runner, document.domain is set to allow the application to perform sub domain navigations to allow continued interactivity with the application iframe. This causes issues for some reason with salesforce's near membrane. Not setting document.domain fixes the issue.
Screenshot 2022-12-21 at 2 44 14 PM

Currently, we don't have a workaround for this ,as cy.intercept is unable to remove injection code. But the team is working on a solution that should unblock these issues. My guess ETA for a fix for this is 1-2 weeks.

@emilyrohrbough emilyrohrbough added stage: ready for work The issue is reproducible and in scope and removed stage: investigating Someone from Cypress is looking into this labels Dec 21, 2022
@jpatil14
Copy link

UPDATE: We were able to figure out the root cause. When Cypress injects it's test runner, document.domain is set to allow the application to perform sub domain navigations to allow continued interactivity with the application iframe. This causes issues for some reason with salesforce's near membrane. Not setting document.domain fixes the issue. Screenshot 2022-12-21 at 2 44 14 PM

Currently, we don't have a workaround for this ,as cy.intercept is unable to remove injection code. But the team is working on a solution that should unblock these issues. My guess ETA for a fix for this is 1-2 weeks.

Thanks for this update.

@AtofStryker AtofStryker added the Reproducible Can be reproduced label Dec 27, 2022
@cypress-bot cypress-bot bot added stage: needs review The PR code is done & tested, needs review and removed stage: ready for work The issue is reproducible and in scope labels Dec 29, 2022
@cypress-bot cypress-bot bot added stage: icebox and removed stage: needs review The PR code is done & tested, needs review stage: icebox labels Dec 29, 2022
@nagash77 nagash77 changed the title [SPIKE] Investigate Salesforce API logins being broken Investigate Salesforce API logins being broken Jan 3, 2023
@AtofStryker
Copy link
Contributor

AtofStryker commented Jan 9, 2023

Just wanted to give an update. We have added a new option, called experimentalSkipDomainInjection that will be available in Cypress 12.4.0 which will be released a week from Tuesday. You will be able to configure this option for salesforce like such:

const { defineConfig } = require("cypress");

module.exports = defineConfig({
  e2e: {
    baseUrl: "https://YOUR_SALES_FORCE_PREFIX.develop.lightning.force.com",
    experimentalModifyObstructiveThirdPartyCode: true,
    experimentalSkipDomainInjection: ['*.salesforce.com', '*.force.com']
  },
});

This works with SOAP/API based login as seen below

soap-salesforce.mp4

This can also work with cy.origin()

visit-salesforce.mp4

@AtofStryker
Copy link
Contributor

Hey all. Wanted to give an update that the 12.4.0 has been delayed slightly. Our estimated time for release is going to be Tuesday, January 24th, 2023. We appreciate your patience in advance and look forward to shipping this out!

@cypress-bot
Copy link
Contributor

cypress-bot bot commented Jan 24, 2023

Released in 12.4.0.

This comment thread has been locked. If you are still experiencing this issue after upgrading to
Cypress v12.4.0, please open a new issue.

@cypress-bot cypress-bot bot removed the stage: new label Jan 24, 2023
@cypress-bot cypress-bot bot locked as resolved and limited conversation to collaborators Jan 24, 2023
@AtofStryker
Copy link
Contributor

So the experimentalSkipDomainInjection flag has now been released for about a week. If anyone has any feedback , positive or negative, please let us know!

The goal for this experimental flag has two outcomes. Likely moving forward, this will be a config option with the experimental prefix removed once we have seen ample feedback and addressed issues moving forward. So the flag would be called skipDomainInjection.

The other option would be to remove this flag if adoption isn't used, though this outcome is not likely.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
Status: Generally Available
Development

Successfully merging a pull request may close this issue.