1

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" >
<div>Priview</div></aura:component>

JS Controller

({
   doInit : function(component, event, helper) {
           console.log("Test");
   }
})

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.

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

1 Answer 1

1

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]

1
  • 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, 2018 at 1:48

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .