Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash on sendTagsToServer since 2.4.1 #211

Closed
rivera-ernesto opened this issue Mar 20, 2017 · 6 comments
Closed

Crash on sendTagsToServer since 2.4.1 #211

rivera-ernesto opened this issue Mar 20, 2017 · 6 comments

Comments

@rivera-ernesto
Copy link
Contributor

2017-03-20 15 55 56

@allaire
Copy link

allaire commented Mar 20, 2017

You should give a bit more info about your issue, but personally I'm using sendTags and it works well on latest version:

        OneSignal.sendTags([
            "userId": session.user.id,
            "firstName": session.user.profile.firstName,
            "lastName": session.user.profile.lastName,
            "deviceLanguage": preferredLocale(),
            "highestRole": session.user.highestRole 
        ])

@chrisfullscreen
Copy link

We're using "sendTag" and also been experiencing crash today -

OneSignal.sendTag("user_id", value: userId)

@jkasten2
Copy link
Member

@rivera-ernesto @chrisfullscreen We haven't seen a crash with sendTags(s) however we just fixed an issue where setting them before the the device registered was omitting them in 2.4.1. I just released a 2.4.3 SDK update to fix this case. Can you try seeing if you can reproduce the issue in the latest SDK?

If you still see an issue can you also include all code using OneSignal and where it is being called so we can reproduce the issue?

@rwinzhang
Copy link

I am also experiencing crash, even on 2.5.2 version, when calling OneSignal.deleteTags (it also call OneSignal.sendTags inside). Therefore I downgrade to version 2.4.0 and the crash never happen again.

Here is the logs:

[_SwiftTypePreservingNSNumber isEqualToString:]: unrecognized selector sent to instance 0x17023c920
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[_SwiftTypePreservingNSNumber isEqualToString:]: unrecognized selector sent to instance 0x17023c920'
*** First throw call stack:
(0x18e40afd8 0x18ce6c538 0x18e411ef4 0x18e40ef4c 0x18e30ad2c 0x100865224 0x100864db4 0x100418a90 0x1000f2b20 0x100864a08 0x1008794d4 0x10087908c 0x18eaf3630 0x18eed9804 0x18ee1e760 0x18ee0eb18 0x18eedbba0 0x103ef9a10 0x103f072e8 0x103efd634 0x103f09630 0x103f0939c 0x18d4cb1d0 0x18d4cad7c)
libc++abi.dylib: terminating with uncaught exception of type NSException

@top2tech
Copy link

top2tech commented May 7, 2017

Same problem here with 2.5.0, it's intermittent. This is a blocking issue to adopt OneSignal.

Thread 1Queue : com.apple.main-thread (serial)
#0	0x000000018cc9e6d0 in CFRelease ()
#1	0x000000018d4a8190 in +[NSURLConnection sendAsynchronousRequest:queue:completionHandler:] ()
#2	0x000000010032aba0 in +[OneSignalHelper enqueueRequest:onSuccess:onFailure:isSynchronous:] at /Users/Kasten/Documents/OneSignal/OneSignal-iOS-SDK6/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m:956
#3	0x000000010032a76c in +[OneSignalHelper enqueueRequest:onSuccess:onFailure:] at /Users/Kasten/Documents/OneSignal/OneSignal-iOS-SDK6/iOS_SDK/OneSignalSDK/Source/OneSignalHelper.m:938
#4	0x0000000100315ae8 in +[OneSignal sendTagsToServer] at /Users/Kasten/Documents/OneSignal/OneSignal-iOS-SDK6/iOS_SDK/OneSignalSDK/Source/OneSignal.m:647
#5	0x000000018d8c646c in __NSFireDelayedPerform ()
#6	0x000000018cd771d8 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#7	0x000000018cd76eec in __CFRunLoopDoTimer ()
#8	0x000000018cd767a8 in __CFRunLoopDoTimers ()
#9	0x000000018cd743a4 in __CFRunLoopRun ()
#10	0x000000018cca22b8 in CFRunLoopRunSpecific ()
#11	0x000000018e756198 in GSEventRunModal ()
#12	0x0000000192ce97fc in -[UIApplication _run] ()
#13	0x0000000192ce4534 in UIApplicationMain ()

@jkasten2
Copy link
Member

jkasten2 commented May 8, 2017

@rwinzhang We have fixed the isEqualToString: error in commit 2d0552c.

@rivera-ernesto @chrisfullscreen @top2tech I have changed the threading on this which I believe should fix the CFRelease release crash in commit d469894.

I'll be releasing a 2.5.3 later today which will include these commits.

@jkasten2 jkasten2 closed this as completed May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants