Firebase database iOS crashing GTMSessionFetcher - ios

I updated firebase and since then my app keeps crashing with the following error
Fetcher delegate class: NRMAURLSessionTaskDelegate Fetcher made an
extra session: GTMSessionFetcher 0x125d53db0 Couldn't assign
delegate.
Fetcher delegate class: NRMAURLSessionTaskDelegate
-[GTMSessionFetcher setFetcher:forTask:]: unrecognized selector sent to instance 0x125d53db0
* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[GTMSessionFetcher
setFetcher:forTask:]: unrecognized selector sent to instance
0x125d53db0'
* First throw call stack: (0x18260ad8c 0x1817c45ec 0x182618098 0x1826105c8 0x1824f641c 0x104637b14 0x104613928 0x10461011c
0x102d9364c 0x102d96bdc 0x102d95140 0x102d92a54 0x102db3f90
0x102db36b0 0x102da0e00 0x105bfd1dc 0x105bfd19c 0x105c0bdfc
0x105c006ac 0x105c0bc20 0x105c006ac 0x105c0cd54 0x105c13e38
0x18222fe70 0x18222fb08) libc++abi.dylib: terminating with uncaught
exception of type NSException
the call that I make and crashes is the following:
let reviewsRef = Database.database().reference()
reviewsRef.child("reviews").queryOrdered(byChild: "timestamp").queryLimited(toLast: count)
I added a debug log and the call is made only once.
It seems the line that the app is crashing is
let ref = Database.database().reference()
Did anything changed regarding configuring Firebase from 4.9 to 5.0 version?
Another update:
It seems to be working on the Xcode simulator but not on device. Device is iPhone 6s with 11.4
Kind of working since on simulator I receive the whole database instead of only the "reviews" that I am requesting
if the rules are:
{
"rules": {
".read": true,
but when I change to:
"rules": {
"reviews": {
".read": true,
I get permission denied(on simulator).It has to do maybe with authentication? I understand that those 2 might be two different issues.

I have no idea why this happened on the first place. But I created a new project in firebase with exact same rules and it worked... for some reason the specific project became corrupt on firebase side.

NRMAURLSessionTaskDelegate indicates usage of New Relic - if it worked on a clean project there might be an incompatibility with Firebase

Related

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: self.senderId != nil'

I'm playing with JSQMessagesViewController. My first project I did using Raywenderlich's Firebase Tutorial: Real-time Chat tutorial.
Then I created a new project to play more with JSQMessagesViewController. And in this new project I'm having issue now.
After I import JSQMessagesViewController and add it as a super class for my ViewController, I got this error in my console -
Assertion failure in -[NewProject.ViewController viewWillAppear:],
/Users/Downloads/ChatChatFirebaseTutorial-finished/Pods/JSQMessagesViewController/JSQMessagesViewController/Controllers/JSQMessagesViewController.m:233
2017-05-30 20:43:44.498 NewProject[10688:314277] *** Terminating app
due to uncaught exception 'NSInternalInconsistencyException', reason:
'Invalid parameter not satisfying: self.senderId != nil'
I see message from ChatChatFirebaseTutorial(am I right?) my previous project in my new project.
So, I deleted everything what was about ChatChatFirebaseTutorial and even more from my mac. It didn't help. I uninstalled and installed pods from project and mac few times. It didn't help.
Did anyone has this issue before? If yes, how did you solve it?
The Library requires that you set a senderID for the current user. This can be done by adding a function like this to your class
override func senderId() -> String {
return "UNIQUEID"
}
I would use something you know is going to be unique such as an email or a unique Id you generate just associated to the user so you can determine who sent the messages.

Quckiblox ios SDK crashes on all API calls

I am developing an app using Quckiblox (Swift 2, iOS 9) and all attempts to make an API call produce the following error:
2015-10-04 04:46:06.411 Twister[1964:846268] +[QBRequest signUp:successBlock:errorBlock:]: unrecognized selector sent to class 0x1000f7358
2015-10-04 04:46:06.415 Twister[1964:846268] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '+[QBRequest signUp:successBlock:errorBlock:]: unrecognized selector sent to class 0x1000f7358'
The SDK was installed with Cocoapods and it's being set up like:
func setup() {
print("Setting up Quickblox...")
QBApplication.sharedApplication().applicationId = UInt(AppConfiguration.Quickblox.ApplicationID.description)!
QBConnection.registerServiceKey(AppConfiguration.Quickblox.AuthorizationKey.description)
QBConnection.registerServiceSecret(AppConfiguration.Quickblox.AuthorizationSecret.description)
QBSettings.setAccountKey(AppConfiguration.Quickblox.AccountKey.description)
}
This is the faulty call:
QBRequest.signUp(user, successBlock: { response, user -> Void in
print("Sign up successfull:\n \(user)")
})
{ response -> Void in
print(response.error)
}
Any ideas on what might be wrong?
Make sure you have opened xcworkspace and NOT xcodeproj.
I have tested your code and everything works, so problem is that Xcode can not find .framework symbols, it finds only headers
May be this is late but it may help someone in future
i have faced same problem and that was solved by
Add -lxml2, -ObjC flags to Other Linker Flags section in project settings
Official doc link
If still error occurs check if any framework is missing

Amazon SNS is crashed with SNSInvalidParameterException in iOS 8?

I have implemented AWS - Simple Notification Service and it was working fine, but after I upgraded my iOS 7 to iOS 8 application is crashed with :
*** Terminating app due to uncaught exception 'AmazonClientException', reason: ''
* First throw call stack:
(0x186f3e084 0x19751c0e4 0x100270224 0x10026f95c 0x1000dd7f0 0x187e0a60c 0x197d3fe80 0x197d3fddc 0x197d3cfb0)
libc++abi.dylib: terminating with uncaught exception of type SNSInvalidParameterException
After execution of below code snippet its crashing,
endPoint.platformApplicationArn = #"arn:aws:sns:eu-west-1:ID:app/APNS_SANDBOX/AppName_Dev";
[amazonClient createPlatformEndpoint:endPoint];
Thank you in advance.
Finally, I've got an solution, this is due to not using same user data for endPoint.customUserData. As Yosuke commented [AmazonLogger verboseLogging]; helped me a lot in tracking the bug.
So try to use same data (as in here #"Test") for one application.
endPoint.customUserData = #"Test";

Integration and Use of W3i iOS Advertiser SDK to advertise our iOS app

I'm integrating W3i Advertiser SDK in iOS app, but app is being crashed at following line.
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID];
and here is exception:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
I Searched a lot but there is no information on net related to w3i's integration and it's use except w3i's official guideline.
https://associate.w3i.com/integration/W3i_iOS_Advertiser_SDK_Integration_Guide1.htm
https://associate.w3i.com/integration/index.html
Here are steps i'm following:
Step1: Download SDK from W3i
Step2: Drag W3iAdvertiserSdk-3.2.0 folder into project's file folder
Step3 Add a link to the following frameworks if not already present:
AdSupport.framework
UIKit.framework
Foundation.framework
CoreGraphics.framework
Step4: Add to your AppDelegate.m file, #import "W3iAdvertiserSdk.h"
If I run the app after above Integration then app runs fine without any error but when i call the method of W3iAdvertiser to connect with app then it it throws exception which i've already posted above.
// add this line to application's didFinishLaunchingWithOptions method
[[W3iAdvertiserSdk sharedConnector] connectWithAppID:W3I_APP_ID]; //appId created at w3i
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSDictionaryI W3iPublisherJSONRepresentation]: unrecognized selector sent to instance 0xa1d7520'
*** First throw call stack:
(0x29d3012 0x23fae7e 0x2a5e4bd 0x29c2bbc 0x29c294e 0x16af7a 0x3e25 0xcd57b7 0xcd5da7 0xcd6fab 0xce8315 0xce924b 0xcdacf8 0x2903df9 0x2903ad0 0x2948bf5 0x2948962 0x2979bb6 0x2978f44 0x2978e1b 0xcd67da 0xcd865c 0x2d08d 0x26c5)
libc++abi.dylib: terminate called throwing an exception
Can anyone please guide me where i'm going wrong, how to use SDK's functions to connect App with w3i's to advertise our app through w3i ?
You need to follow this step as well:
Add -ObjC to Other Linker Flags in your target's Build Settings. That will allow "Option 1" to not crash.
There are two ways to connect app with w3i:
Option1: Integrate W3i-iOS-SDK, and call it's method "connectWithAppId" at start of application.
Option2: Call W3i "appWasRun" API at start of application
first option didn't work for me, but Option2 is quite easy and working fine.
Here is format of API and it's parameters:
http://api.w3i.com/PublicServices/MobileTrackingApiRestV1.svc/AppWasRun?AppId={APPID}&clientIp={CLIENTIP}&iOSIDFA={advertisingIdentifier}&iOSUDID={IOSUDID}&iOSOpenUDID={IOSOpenUDID}&iOSMD5WLANMAC={iOSMD5WLANMAC}&iOSSha1HashedMac={iOSSha1HashedMac}
Request Type: GET
Required Parameters: APPID (generated by W3I) and at-least one identifier (all parameters are preferred by W3i)
I used only OpenUDID and it worked fine.
http://api.w3i.com/PublicServices/MobileTrackingApiRestV1.svc/AppWasRun?AppId=W3i_APP_ID&iOSOpenUDID=OPEN_UDID
For More Information check the following links.
https://sites.google.com/site/w3ideveloperscom/ios/iOSAFPP/advapi
https://associate.w3i.com/integration/Device_Identifiers.htm
Hope it would help others in future :)

Unity iOS game crashing with NSInternalInconsistencyException

I am using Prime31's GameCenter Turn Based plugin in my game in order to handle online matches. A problem arises when I receive an "invitation to play" notification from Game Center while Game Center's matchmaker is showing (called using the plug-in => GameCenterTurnBasedBinding.findMatch(2,2,false); ).
The app crashes and the following output is shown in Xcode:
2012-08-20 08:39:27.050 Cabrais[1808:707] *** Assertion failure in -[NSIndexPath row], /SourceCache/UIKit/UIKit-1914.85/UITableViewSupport.m:2606
2012-08-20 08:39:27.052 Cabrais[1808:707] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid index path for use with UITableView. Index paths passed to table view must contain exactly two indices specifying the section and row. Please use the category on NSIndexPath in UITableView.h if possible.'
*** First throw call stack:
(0x355ec88f 0x33210259 0x355ec789 0x349e03a3 0x32d4d673 0x35dba49d 0x35dd90e5 0x35dd9379 0x32d4cefb 0x32d4bfd9 0x32d4b763 0x35da7657 0x32ceff37 0x3554b1fb 0x32716aa5 0x327166bd 0x327165c9 0x35dd8179 0x35da936b 0x35dbce65 0x35dbb6b3 0x33979c59 0x33984e91 0x355bf2ad 0x355424a5 0x3554236d 0x332dd439 0x32d1acd5 0x6954 0x3388)
terminate called throwing an exception(lldb)
I have tried disabling notifications through the Ipad/Iphone settings for both my app and GameCenter as well as through the code by removing all notification related code but this hasn't had any effect at all.
I know through debugging that the code in my function attached to GameCenterTurnBasedManager.handleTurnEventEvent doesn't get called before the crash occurs, and neither does the one registered to EtceteraManager.remoteNotificationReceived. (Both these function work perfectly fine otherwise.)
I have asked Prime31 and they have told me that the exception is a mishandling of the tables data source, and to file a bug report with Apple.
Has anyone experienced a similar crash/error while working with Unity?
And is there any way I can try to catch the notification before it arrives and remove the matchmaker or be able to handle the error from unity?
Any insight/help/comments would be greatly appreciated,
Thanks.

Resources