目前我正与Azure的通知的问题 - 我已经配置好了一切生产,并证实了这一点,通过发送测试通知工作。然而,在应用程序中的第一个“registerForPushNotifications”之后,下一次我打开它,我得到记录以下错误:Azure的通知中心400注册推送
PID[11096] Information Sending response: 400.0 <Error><Code>400</Code><Detail>Installation validation failed with following error(s):
 An invalid tag(s) '_UserId:facebook|10211219930003961,NewVenue' was supplied. Valid tag characters are alphanumeric, _, @, -, ., : and #..TrackingId:9315e728-8777-4cad-a475-956c38dcde36_G6,TimeStamp:4/23/2017 9:09:06 AM</Detail></Error>
我使用的样板代码(离子)申请注册为推动从科尔多瓦提供。我不明白我出错的地方。我想解决这个问题,因为这是生产中的一个问题。
订阅代码:
function registerForPushNotifications() {
pushRegistration = PushNotification.init({
android: {
senderID: '<id>'
},
ios: {
alert: 'true',
badge: 'true',
sound: 'true'
},
wns: {}
});
// Handle the registration event.
pushRegistration.on('registration', function(data) {
// Get the native platform of the device.
if (device) {
debugger
var platform = device.platform;
// Get the handle returned during registration.
var handle = data.registrationId;
// Set the device-specific message template.
if (platform == 'android' || platform == 'Android') {
// Register for GCM notifications.
window.azureClient.push.register('gcm', handle.replace("|",""), {
mytemplate: {
body: {
data: {
message: "{$(messageParam)}"
}
}
}
});
} else if (device.platform === 'iOS') {
// Register for notifications.
window.azureClient.push.register('apns', handle.replace("|",""), {
mytemplate: {
body: {
aps: {
alert: "{$(messageParam)}"
}
}
}
});
} else if (device.platform === 'windows') {
// Register for WNS notifications.
window.azureClient.push.register('wns', handle.replace("|",""), {
myTemplate: {
body: '<toast><visual><binding template="ToastText01"><text id="1">$(messageParam)</text></binding></visual></toast>',
headers: {
'X-WNS-Type': 'wns/toast'
}
}
});
}
}
});
pushRegistration.on('notification', function(data, d2) {
alert('Push Received: ' + data.message);
});
pushRegistration.on('error', function(err) {
console.warn("error", err)
});
}
将是很好的告诉我们你是如何注册?它是通过Azure应用服务还是直接通知到通知中心?你的安装对象是什么样的?你已经明显改变了锅炉板,因为你添加了“NewVenue”,这在锅炉板中不是标准的。 –
我已经启用了Azure移动应用程序下的刀片服务器。我使用我在编辑中添加的代码从应用程序注册。我不知道'newVenue'来自哪里 - 我确实将它创建为推刀片中的一个标签,并选择了“自动添加”。 –