0

When performing an action on a Lightning component, I am getting a warning in the console:

WARNING: Error in the server action response:An internal server error has occurred Error ID: 2139358423-25462 (119852647)

At the same time, I see a debug log appear in the developer's console stating

FATAL_ERROR System.StringException: Invalid id:

The problem is that the debug logs and warning message don't have an indication of what code is causing the problem. How would I go about finding out what is causing the errors? I realise there isn't a lot to go on here but there's no point posting code when I don't know what code to post.

1 Answer 1

3

Usually this happens when you assign a string to an ID variable which turns out to be an invalid id (string should be valid 15 or 18 digit id). In your case please check whether string variable assigned to ID variable is not a blank or invalid id.

5
  • 3
    Specifically, that error is a blank string; if it were some invalid Id, it'd say something like Invalid Id: John Doe (where "John Doe" is the invalid Id). It'd be nice if the platform quoted the string so one would realize it was empty.
    – sfdcfox
    Dec 13, 2016 at 6:10
  • I understand the error; I'm just struggling to find out where it's coming from, and the empty string/error messages give no real hint
    – nicstella
    Dec 13, 2016 at 20:05
  • @nicstella, not sure why are not able to see complete stack trace about exact line number causing this error. Is this coming from managed package code or did you restrict the debug log level? There must be some code where an empty string is being assigned to ID data type.
    – LakhanP
    Dec 14, 2016 at 5:12
  • I eventually tracked down the code causing the problem, but still at a loss to why I could see so little information
    – nicstella
    Dec 14, 2016 at 21:37
  • I've also received this error in Lightning Component when the Apex controller action made an Http Callout and the HttpRequest endpoint value was null.
    – Doug Ayers
    Aug 20, 2017 at 0:15

You must log in to answer this question.

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