0

I was calling a Notification Hub to push a message on insert script of a table just fine, but all of a sudden when I call:

var azure = require('azure');
var hub = azure.createNotificationHubService('<hub name>', '<connection string>');

I get an error saying:

Error in script '/table/moves.insert.js'. TypeError: Object [object Object] has no method 'createNotificationHubService' at insert (</table/moves.insert.js>:4:21) at </table/moves.insert.js>:1:8 [external code]

Is this an Azure bug or has the method changed?

Joel
  • 15,654
  • 5
  • 37
  • 60
  • I'm unable to reproduce this. Is this happening every time your script is called? – Chris Oct 07 '13 at 16:21
  • Yes, every time. I just checked again and it is still occurring when I call createNotificationHubService. I even moved those 2 lines to be the first 2 lines of the script and it errors right away. – Joel Oct 08 '13 at 00:06
  • Can you try putting this in-between those two lines and see what you get: console.log(azure); It almost seems like your azure module isn't getting set up correctly. – Chris Oct 08 '13 at 16:04
  • I haven't run this script since I tested it yesterday. I inserted the console.log statement and called the script and it did not error out at createNotificationHubService and it pushed the message just fine (like before). I removed the console.log and everything is working fine again. So this is definitely an internal bug at Azure. Do you still want to see the log output now that it is working again? – Joel Oct 08 '13 at 17:12

1 Answers1

1

It was a bug with Azure. I got this response from MSDN forums:

We did recently have some issues with require call of the Azure SDK in Mobile Services. We are in the process of deploying a fix.

Joel
  • 15,654
  • 5
  • 37
  • 60