从registerTemplateWithDeviceToken仅Testflight测试版本发行收益SBNotificationHub崩溃 [英] SBNotificationHub crash on return from registerTemplateWithDeviceToken in Testflight Beta build distribution only

查看:415
本文介绍了从registerTemplateWithDeviceToken仅Testflight测试版本发行收益SBNotificationHub崩溃的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我禁用应用程序的通知,我不同步和应用程序运行正常。如果他们允许,且code通知和尝试同步 - 这分崩离析

If I disable notifications for the app, I don't sync and the app runs fine. If they're enabled, and the code notices and tries to sync - it falls apart.

应用一直100%的罚款数周没有code的变化。想知道如果同样的测试设备在相同的构建方式的转换是冲水的事情。

App has been working 100% fine for weeks with no code changes. Wondering if switching between schemes of the same build on the same test device is hosing things.

从作品X code到设备使用相同的,非调试/生产运行正常,方案。但是,通过官方的Testflight应用程序安装归档构建崩溃。十分怪异。

Works fine run with the same, non-debug/production, scheme from Xcode to the device. But installed via Testflight app of an official archived build it crashes. Very weird.

任何见解?

Thread : Fatal Exception: NSInvalidArgumentException
0  CoreFoundation                 0x000000018714659c __exceptionPreprocess + 132
1  libobjc.A.dylib                0x00000001978980e4 objc_exception_throw + 60
2  CoreFoundation                 0x00000001870311f8 -[__NSDictionaryM setObject:forKey:] + 972
3                                 0x0000000100522580 -[SBLocalStorage updateWithRegistrationName:registration:] (SBLocalStorage.m:89)
4                                 0x00000001005223fc -[SBLocalStorage updateWithRegistration:] (SBLocalStorage.m:59)
5                                 0x000000010051ceb4 __72-[SBNotificationHub retrieveAllRegistrationsWithDeviceToken:completion:]_block_invoke (SBNotificationHub.m:314)
6                                 0x000000010051b31c -[SBURLConnection connectionDidFinishLoading:] (SBURLConnection.m:115)
7  CFNetwork                      0x0000000186beae70 __65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke + 80
8  CFNetwork                      0x0000000186beae00 -[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 208
9  CFNetwork                      0x0000000186beaf7c -[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 60
10 CFNetwork                      0x0000000186abf8e4 ___ZN27URLConnectionClient_Classic26_delegate_didFinishLoadingEU13block_pointerFvvE_block_invoke + 104
11 CFNetwork                      0x0000000186b88540 ___ZN27URLConnectionClient_Classic18_withDelegateAsyncEPKcU13block_pointerFvP16_CFURLConnectionPK33CFURLConnectionClientCurrent_VMaxE_block_invoke_2 + 104
12 CFNetwork                      0x0000000186aabb54 RunloopBlockContext::_invoke_block(void const*, void*) + 76
13 CoreFoundation                 0x0000000187028aac CFArrayApplyFunction + 68
14 CFNetwork                      0x0000000186aaba00 RunloopBlockContext::perform() + 136
15 CFNetwork                      0x0000000186aab8b4 MultiplexerSource::perform() + 312
16 CFNetwork                      0x0000000186aab6e0 MultiplexerSource::_perform(void*) + 68
17 CoreFoundation                 0x00000001870fe9ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 24
18 CoreFoundation                 0x00000001870fdc90 __CFRunLoopDoSources0 + 264
19 CoreFoundation                 0x00000001870fbd40 __CFRunLoopRun + 712
20 CoreFoundation                 0x00000001870290a4 CFRunLoopRunSpecific + 396
21 GraphicsServices               0x00000001901c35a4 GSEventRunModal + 168
22 UIKit                          0x000000018b95aaa4 UIApplicationMain + 1488
23                                0x00000001000dabc0 main (main.m:14)
24 libdyld.dylib                  0x0000000197f06a08 start + 4

这是1.2.4版本的Windows Azure的消息SDK

This is 1.2.4 version of the Windows Messaging Azure SDK

修改:也V2.0

推荐答案

修改:我跟踪它到<一个href=\"https://github.com/Azure/azure-notificationhubs/blob/master/iOS/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBLocalStorage.m#L89\"相对=nofollow>这行code 的,我相信这是因为坠落的<一过href=\"https://github.com/Azure/azure-notificationhubs/blob/bf075aaf78177f24756884c1b1576d0b7d26e8eb/iOS/WindowsAzureMessaging/WindowsAzureMessaging/Helpers/SBNotificationHubHelper.m#L268\"相对=nofollow>无模板名称。在我的服务器code这也与轮毂进行交互,我不是过客模板名称,所以它得到了nilled。但是,单靠不会导致崩溃。还有一个方案,我还与设备ID变化,或类似的揭示,即使这种表面上。我会更新,当我弄清楚什么。

Edit: I tracked it down to this line of code, which I believe is falling over because of a nil template name. In my server code which also interacts with the hub, I'm not passing template name so it's getting nilled out. But that alone doesn't cause the crash. There is a scenario I'm yet to uncover with the device ID changing, or similar, that is making this surface. I'll update when I figure out what.

编辑2 :对于的谁遇到过,他们在Azure中的数据的共同特征,并通过上面的code作为暗示用户,是一个缺少 TEMPLATENAME 。它可以通过将无名称手动强制崩溃:

Edit 2: For the few users who experienced this, the common characteristic of their data in Azure, and as hinted by the code above, was a missing TemplateName. It is possible to manually force the crash by passing a nil name to:

[hub registerTemplateWithDeviceToken:deviceToken 
                                name:nil 
                    jsonBodyTemplate:alertTemplate 
                      expiryTemplate:@"0" 
                                tags:[NSSet setWithArray:tags] 
                          completion:^(NSError* error) {

我不知道发生了什么与Azure的发生,使得具有有效的字符串调用的名称的未更新Azure的数据并返回一个有效的价值,但我的直觉是有一个竞争条件和错误的天青一边。

I don't know what was happening with Azure such that a call with a valid string name wasn't updating the Azure data and returning a valid value, but my gut feeling is there is a race condition and bug on the Azure side.

我们现在正在爬行通过Azure中登记的用户数据和固定模板无名字,这是我们已经验证了修复该问题在这个周期的悲伤被抓起来的用户。

We're now crawling through the registered user data in Azure and fixing the nil template names, which we've verified fixes the issue for users that were caught up in this cycle of sadness.

更新 - 这确实是修复。还没有,因为纠正坏的用户模板数据崩溃。

Update - this was indeed the fix. Haven't had the crash since correcting the bad user template data.

原来的答复
不是一个非常充实的解决方案,但我禁用通知的应用程序(通过OS设置),使用的应用程序来退订我订阅了(大量的)的所有标签。然后重新启用通知和崩溃不再出现。

Original answer: Not a very fulfilling solution, but I disabled notifications for the app (Via OS Settings), used the app to unsubscribe to all the tags I was subscribed to (lots). Then re-enabled notifications, and the crash no longer occurs.

现在我的两个研发X code方案,试飞在相同的设备ID安装的结果。这似乎并不一直是问题的根源,但谁知道。将是非常有趣的知道什么是SDK试图在它崩溃的地步坚持 - 这将是弄清楚发生了什么的最可靠途径。

Now both my production Xcode scheme and test flight install result in the same device ID. That doesn't seem to have been the root of the issue, but who knows. Would be really interesting to know what the SDK is trying to persist at the point where it crashes - that would be the surest way to figure out what happened.

这篇关于从registerTemplateWithDeviceToken仅Testflight测试版本发行收益SBNotificationHub崩溃的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆