An error occurred creating push for user scripts: azure.notificationHubService could not be created -


in azure mobile service javascript backend ,trying send notification calling notification hub through custom api. giving me notification , everytime giving time out error too. observed logs , showing "an error occurred creating push user scripts: azure.notificationhubservice not created" .

instead of using azure.createnotificationhubservice method , there way import created notification hub service ?how rid of time out error. pasting function below.

function sendnotification() {            var azure = require('azure');             var notificationhubservice = azure.createnotificationhubservice('disapphub','endpoint=sb://xxx.servicebus.windows.net/;sharedaccesskeyname=defaultfullsharedaccesssignature;sharedaccesskey=my_key_here=;');            var payload = {   data: {     "type":"newthread",    }   };  var mytags ='admin'; notificationhubservice.gcm.send(mytags, payload, function(error){   if(!error){     //notification sent   } });      } 


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -