2

I'm using javascript remoting in a SKUID page. Everything has been working fine, but without any code changes all of a sudden I started getting this error:

function handleRemoteCall(result, event) {
  if (event.type == 'exception') {
    alert(event.message);
    return;
  }
  //do stuff with result
}

"java.lang.String cannot be cast to java.lang.Boolean"

Normally SF catches the underlying java errors and re throws them as a apex error. Any ideas what could be going on?

Also, my remoting call takes a string as a parameter and I can confirm that I am correctly passing one in.

  • Maybe you can verify the RemoteAction method is working properly by checking the debug logs for the RemoteAction. It seems like the error is in your RemoteAction-method (or something internal which would be uber-bizarre) – Scott Pelak Feb 26 '14 at 22:44
  • 1
    Agreed - with that code snippet it is hard to say what is going on, we'd probably need to see the RemoteAction method. – joshbirk Feb 26 '14 at 22:53
2

I saw a major break in spring14 on remoting. Upgrading any controllers (apex controllers, not js) to API v30 solved it.

It's not a solution, but it's a fix.

I think remoting isn't covered by the apex unit testing so it's hard for salesforce to find the breaks during release prep. Simply "running all our customers' unit tests" is less and less relevant as more of us use client-side stuff than back in the purer visualforce days.

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.