2

I am attempting to call a custom api with javascript created in Windows Azure Mobile Services and I am having an issue with getting the results in the callback/promise.

I have tested it with fiddler and the data object is being returned with the correct data however it is not passing that data to the callback.

Any help would be greatly appreciated! Below is the code segment I am using:

client.invokeApi('NameOfApi', {
            method: 'GET',
            parameters: { organizationId: organizationID }
        }).done(function (results) {
            var requests = JSON.parse(results.response);
            //Do some stuffz with requests collection
        }, function (error) {
            alert(error);
        });

And in doing so I am getting into the done or error callbacks through debugging methods. However I have verified that the results are coming back from the api call but they never reached the promise for some reason.

5
  • Please add some code of what you're doing. Also, do you have na error callback? That could show why the (success) callback isn't being called. Commented Nov 11, 2013 at 4:22
  • @carlosfigueira code has been attached Thanks Commented Nov 12, 2013 at 14:35
  • When you call client.invokeApi, are you saying that neither the success nor the error callbacks are being called? Also, is this a HTML/JavaScript project, or a Windows Store/JavaScript app? Commented Nov 13, 2013 at 14:47
  • @carlosfigueira It is a HTML/Javascript project and yes the success nor error callbacks are called on IE 9 Commented Nov 13, 2013 at 17:09
  • Found out the issue occurs in IE 9. It works in other browsers…….??? Commented Nov 21, 2013 at 4:12

1 Answer 1

4

The issue you described is a known bug with IE9 and MobileServices.Web-1.0.0.js. This bug has been addressed in version 1.0.3 and later. Details can be found here: https://github.com/WindowsAzure/azure-mobile-services/issues/152

Updating your project to use the latest version at: http://ajax.aspnetcdn.com/ajax/mobileservices/MobileServices.Web-1.1.0.min.js

Will resolve this for you.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.