testcafe icon indicating copy to clipboard operation
testcafe copied to clipboard

Error in Hammerhead.js - New Contacts in Salesforce Lighting Experience '22

Open AndrewYoungQA opened this issue 2 years ago • 10 comments

What is your Scenario?

Issue: When User logs into Salesforce, selects new Contact button, they are met with the following hammerhead.js error.

Uncaught Error in $A.getCallback() [Maximum call stack size exceeded] throws at http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:90:31. Caused by: Error in $A.getCallback() [Maximum call stack size exceeded] {anonymous}()@http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:25015 eval()@http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:29308 lt.passthruSetTrap [as set]()@http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:29308 PropertyAccessorsInstrumentation._propertySetter()@hammerhead.js:20915:33

What is the Current behavior?

After selecting Contacts tab, or New Contact Button, the following error message is being returned.

Uncaught Error in $A.getCallback() [Maximum call stack size exceeded] throws at http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:90:31. Caused by: Error in $A.getCallback() [Maximum call stack size exceeded] {anonymous}()@http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:25015 eval()@http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:29308 lt.passthruSetTrap [as set]()@http://localhost:1401/MQtFtre6I!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:29308 PropertyAccessorsInstrumentation._propertySetter()@hammerhead.js:20915:33

What is the Expected behavior?

After Selecting the Contact tab, or new Contact button, the user should be presented with a contact modal that allows users to input contact data.

What is your public website URL? (or attach your complete example)

For our website there is no public URL, however you will be able to reproduce the error using the Trailhead Lightning Demo Site. https://trailblazer.me/trailblazerlogin https://resilient-shark-wlmrgy-dev-ed.lightning.force.com/lightning/o/Contact/list?filterName=Recent

What is your TestCafe test code?

This is being recreated using the testcafe-hammerhead project and is reproducible through selections in the Trailhead site.

Your complete configuration file

No response

Your complete test report

No response

Screenshots

No response

Steps to Reproduce

  1. Setup free Trailhead User at: https://trailblazer.me/trailblazerlogin , using email.
  2. Installed the 'testcafe-hammerhead' project
  3. Run Command Line : node node_modules/gulp/bin/gulp http-playground
  4. In the field on the localhost:1400 page, we enter: https://trailhead.salesforce.com/en/content/learn/modules/accounts_contacts_lightning_experience/accounts-and-contacts-lightning
  5. Select 'Proxy!' button
  6. Select 'Log In' on salesforce / trailhead site.
  7. Select 'Email' icon
  8. Enter Email for account set up in 'Step 1'
  9. Select 'Log in' Button.
  10. Retrieve your Single use code from email sent to email address used in 'Step 1 / Step 8'
  11. Select 'Continue' Button
  12. Select 'Skip for Now' link
  13. Confirm Page: https://trailhead.salesforce.com/en/content/learn/modules/accounts_contacts_lightning_experience/accounts-and-contacts-lightning loads successfully
  14. Scroll to the bottom of the page and select the 'Launch' Button (note. On the initial run this step took a while for the launch button to become active, it eventually did however and was able to proceed)
  15. Wait for Salesforce Lightning Env to load: https://resilient-shark-wlmrgy-dev-ed.lightning.force.com/lightning/page/home
  16. *At this point you may hit the error. If not { Select the dot grid in the top left, then select 'Sales' from the ddl. If Sales is not visible search 'Sales' in the 'Search apps and items...' field. image
  17. Once Sales Dashboard is loaded Select the 'Contacts' tab.
  18. *At this point you will see the error message, if not select 'New' Contact button. image Uncaught Error in $A.getCallback() [Maximum call stack size exceeded] throws at http://localhost:1401/fQA1lRrUK!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:90:31. Caused by: Error in $A.getCallback() [Maximum call stack size exceeded] {anonymous}()@http://localhost:1401/fQA1lRrUK!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:25015 eval()@http://localhost:1401/fQA1lRrUK!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:29308 lt.passthruSetTrap [as set]()@http://localhost:1401/fQA1lRrUK!s!utf-8/https://static.lightning.force.com/usa59.sfdc-lywfpd/auraFW/javascript/m-U-Tf8BNfJufA5XwOVDIQ/aura_prod.js:62:29308 PropertyAccessorsInstrumentation._propertySetter()@hammerhead.js:20915:33

TestCafe version

1.19.0

Node.js version

v16.15.1

Command-line arguments

node node_modules/gulp/bin/gulp http-playground

Browser name(s) and version(s)

Version 102.0.5005.115 (Official Build) (64-bit)

Platform(s) and version(s)

No response

Other

No response

AndrewYoungQA avatar Jun 17 '22 18:06 AndrewYoungQA

+1 I have been experiencing the same issue since last weekend (the sfdc release) .. We've done everything to resolve it and are talking about moving to testim if this cannot be resolved quickly

aozomaro avatar Jun 18 '22 05:06 aozomaro

Thank you for the example. I reproduced the issue. We will update this thread once we have any news. Let us know if you have additional information about the issue.

Aleksey28 avatar Jun 21 '22 07:06 Aleksey28

I have experienced the same issue when simply attempting to click on a SalesForce Lightning component using Testcafe. Sometimes the error I will see during debugging refers to SalesForce Lightning's aura_prod.js file and I will see a stack trace like this... Screen Shot 2022-06-22 at 3 52 47 AM

Screen Shot 2022-06-22 at 4 03 49 AM Screen Shot 2022-06-22 at 4 04 54 AM

I noticed from other threads, that SF Lightning aura js references are noted to have used the js "with" statement which is attributed to creating confusing bugs (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/with). I hope this additional information is helpful, and also directly related to solving this Hammerhead issue.

jamesmoseley avatar Jun 22 '22 11:06 jamesmoseley

image

We are seeing continued failure with this issue, is there any soft ETA or update available that we can relay to the team? I apologize @Aleksey28 , I am not trying to put any pressure on the situation but we have been down for a while as a result of this issue and need to communicate an expectation back to those in charge.

AndrewYoungQA avatar Jul 18 '22 16:07 AndrewYoungQA

Using locally installed version of TestCafe. 1.20.0

AndrewYoungQA avatar Jul 27 '22 20:07 AndrewYoungQA

Hi @AndrewYoungQA,

We have not yet found the cause of this issue. We will update this thread once we have any news.

miherlosev avatar Aug 01 '22 09:08 miherlosev

Hey, Just wondering if there was any update on this issue, as this is a blocker for us.

jpatel01-tc avatar Aug 04 '22 15:08 jpatel01-tc

No updates yet. Once we get any results, we will post them in this thread.

github-actions[bot] avatar Aug 09 '22 06:08 github-actions[bot]

Is there a plan to resolve this issue anytime soon?

aozomaro avatar Aug 31 '22 13:08 aozomaro

Hi @aozomaro ,

Unfortunately, we don't have any news yet and we cannot give you a precise date. Any estimate may be misleading.

Aleksey28 avatar Sep 02 '22 09:09 Aleksey28

Would it be reasonable for any of us to learn how to understand the issue and patch Hammerhead, or do you feel that this issue would be far too complex for a Hammerhead novice?

Asuza avatar Oct 05 '22 14:10 Asuza

Hi @Asuza,

If the issue is connected to the with statement, it's too complex for the outer contributor. You can try debugging the tested application to determine the cause of the issue.

miherlosev avatar Oct 10 '22 07:10 miherlosev

Hello, we just run into the similar issue with Maximum call stack size exceeded error thrown from hammerhead.js.

Let me share our experience as it may very likely help someone else.

In our case this was caused by the transitive dependency [email protected] which used # private class fields syntax.

We configured babel to transpile this particular module and syntax and the error is gone.

kandl avatar Apr 03 '23 19:04 kandl

Hi @kandl,

Thank you for the workaround.

Aleksey28 avatar Apr 04 '23 06:04 Aleksey28

Hi

Starting from the 3.0.0 version, TestCafe introduced the new test run mode - NativeAutomation. All described issues should be fixed in it. Try running the tests with the latest TestCafe version (3.0.1) and let us know your results.

miherlosev avatar Jul 03 '23 07:07 miherlosev

This issue was automatically closed because there was no response to our request for more information from the original author. Currently, we don't have enough information to take action. Please reach out to us if you find the necessary information and are able to share it. We are also eager to know if you resolved the issue on your own and can share your findings with everyone.

github-actions[bot] avatar Jul 13 '23 07:07 github-actions[bot]