Exception thrown and not caught

Sep 12, 2013 at 6:56 PM
I'm receiving the following error when calling UpdateListItems using SPServices.

Message: Exception thrown and not caught
Line: 16
Char: 11590
Code: 0
URI: http://<site.domain.local>/Site%20Assets/jquery-1.6.2.min.js (this line was modified to hide our site name).

I am using SPServices 0.7.1a (min). The code is as follows (slightly redacted):
    operation: "UpdateListItems",
    async: false,
    listName: "My List",
    batchCmd: "New",
    valuepairs: [["some_x0020_field",someVariable]],
    completefunc: function(xData, Status) {
        console.log( $( xData.responseXML ) );
    debug: true
Using Fiddler I can see the SOAP request being sent. I can confirm the list is being updated with the new record. And I see a successful response in Fiddler as well. However the completefunc code never runs and I receive the previously mentioned error.

Also, a bit of info - we just migrated our farm to new servers by:
  • Installing a clean SharePoint farm
  • Performing a content database restore
This code hasn't changed in a long time and still runs on our QA site as well as our old farm. Any thoughts?
Sep 12, 2013 at 10:51 PM
Quick update, I was able to get the underlying error: "Syntax error, unrecognized expression: [nodeName=z:row]"... any thoughts?
Sep 12, 2013 at 11:01 PM
You're using older versions of both jQuery and SPServices. It's worth upgrading. In jQuery 1.7+, the [nodeName=z:row] syntax no longer work, but it looks like you should be OK there.

The error message above doesn't really tell me anything. I'd suggest switching to the non-minified version and doing some debugging.

Sep 12, 2013 at 11:09 PM
I did some additional testing between our test site that works and the production site that breaks. They're both using the same version of SPServices (0.7.0 min). But what is interesting to note is the difference in the jQuery library that is being loaded:
  • On the test site it's using a vendor supplied (a Bamboo webpart) jQuery module - 1.4.2 non-minified
  • On the production site it's using the jQuery module 1.6.2 minified
Guess I'll have to do some research on why this is the case. Or for a short term fix figure out how to make the page load the 1.4.2 version for now.
Sep 12, 2013 at 11:12 PM
Quick question, if I upgrade jQuery to 1.7+, is there a replacement for [nodeName=z:row]? We do use that in a lot of places for our SPServices completefunc functions.
Sep 13, 2013 at 12:51 AM
Yes, there's been a function called SPFilterNode for a few versions of SPServices now. It's in the documentation.

My guess is that you have more than one version of jQuery loading in the page. That can cause problems.