I have added a Lightning Action button on Contact. enter image description here

I'm trying to open a Lightning Component on click of this button. But it fails with the below error.

AddAttachmentComponent - Lightning Component

<aura:component implements="force:lightningQuickAction" >

JS Controller

   doInit : function(component, event, helper) {

Error on button click

Unfortunately, there was a problem. Please try again. If the problem continues, get in touch with your administrator with the error ID shown here and any other related details. Action failed: forceChatter:lightningComponent$controller$doInit [cannot use the given object as a weak map key] quickActionHandlerHelper.js failed to create component - forceChatter:lightningComponent

Kindly help me out.

  • Do you have any JS Controller or Helper ? Apr 7 '17 at 8:53
  • I have a JS Controller, but I have not used its method. Updated my question with JS controller.
    – Ram
    Apr 7 '17 at 9:34

This seems to be a browser related issue, I was facing this error on Firefox v31 on Mac. Tried the same on Google chrome and worked properly.

After updating to Firefox-v52.0.2 the problem was resolved.

Initial Error: [cannot use the given object as a weak map key]

  • I've seen similar issues with JS that runs on Salesforce specifically when run from Firefox on a Mac device - no issue on a windows device.
    – Ronnie
    Sep 14 '18 at 1:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.