Getting the following error when running FCM on iOS, but works fine in android.
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:347:14: Firebase FCM token received: fcCwcTew2Po:APA91bGjgIRM2Wqkw2uZH273AGvGT1-j2fZdjHz7aKGtzDqFB19W9VQYxwLzcPSnliF6zsGsixZ5xxGAkQvX4bwXoE9xM63wuKY_z9DZGbfNMs_UWer4kuCd36Re3X9SG8WU4-umr-3I
Aug 15 17:21:09 Kamrans-MacBook-Pro Messaging[8276]: CONSOLE LOG file:///app/pages/home/home.js:20:20: Firebase push token: fcCwcTew2Po:APA91bGjgIRM2Wqkw2uZH273AGvGT1-j2fZdjHz7aKGtzDqFB19W9VQYxwLzcPSnliF6zsGsixZ5xxGAkQvX4bwXoE9xM63wuKY_z9DZGbfNMs_UWer4kuCd36Re3X9SG8WU4-umr-3I
Aug 15 17:21:09 Kamrans-MacBook-Pro Messaging[8276]: CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:356:18: Firebase was unable to connect to FCM. Error: Error Domain=com.google.fcm Code=501 "(null)"
I've added a comment at the line that logs the error: "// this is not fatal at all but still would like to know how often this happens". So can you try to see if it still works correctly? I can see you've received a push token..
It stills don't seem to work for iOS but only for works for Android. Plus I don't get the notification prompt. I have deleted the node_modules and platform folders and started again. Still the same problem.
I have tried sending a push notification from firebase and it doesn't seem to work.
Yes, I have.
Plus there is a step missing after you uncommenting Firebase/Messaging in the podfile. You have to go into you iOS platform folder and run pod install
That's supposed to happen automatically when doing a tns run ios, no? Anyway, I always remove and add my platform folder after such a significant change.
What's your testdevice?
nexus 6p for android and simulator for ios
You know you can't receive notifications on the iOS sim, right?
You should be able to receive the "this app wants to send push notifications" prompt but that's all down to the provisioning profile stuff.
I don't even see
"this app wants to send push notifications"
Try a real device first. You can't receive notifications on the simulator anyway.
How come I don't get the prompt for notification support for iOS simulator.
IDK. Just try a real device with the proper push entitlement settings etc and let me know how that works out for you.
I have got the same issue with a real device.
Taking a look.
Added a section to the messaging readme on this topic.
If you still don't see a prompt I will need to look at your code because I just retested this on a fresh app with success..
I have created a new nativescript 2.2.0 app with the same app id and I still get the same issue:
2016-08-17 10:29:33.894 FirebaseTest[2246:1488909] Configuring the default app.
2016-08-17 10:29:33.906 FirebaseTest[2246:]
2016-08-17 10:29:33.907 FirebaseTest[2246:]
2016-08-17 10:29:33.913 FirebaseTest[2246:1488909] Firebase Crash Reporting: Successfully enabled
2016-08-17 10:29:33.921:
2016-08-17 10:29:33.921:
2016-08-17 10:29:33.925:
2016-08-17 10:29:33.967:
CONSOLE LOG file:///app/main.js:7:16: firebase.init done
NativeScript loaded bundle file:///System/Library/Frameworks/CoreGraphics.framework
NativeScript loaded bundle file:///var/containers/Bundle/Application/CC5C03CF-F880-4222-8043-6721FF034197/FirebaseTest.app/Frameworks/TNSWidgets.framework
CONSOLE LOG file:///app/tns_modules/@angular/core/src/facade/lang.js:360:16: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
2016-08-17 10:29:34.937 FirebaseTest[2246:]
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:347:14: Firebase FCM token received: fezdZIu3NMw:APA91bEivcLKSgKM-VK616-kZ5IrBVvk5xMaoGMgvyJsUsPib7aX1wU5DZOi0AmG0Giya5ZK6HFAEhbfLwvyYZIosEa_XXEhmYSAnfr6IbmVq0Op2to63Aeg_AnIUM191dBJMxCjmvaH
CONSOLE LOG file:///app/main.js:12:16: token is: fezdZIu3NMw:APA91bEivcLKSgKM-VK616-kZ5IrBVvk5xMaoGMgvyJsUsPib7aX1wU5DZOi0AmG0Giya5ZK6HFAEhbfLwvyYZIosEa_XXEhmYSAnfr6IbmVq0Op2to63Aeg_AnIUM191dBJMxCjmvaH
2016-08-17 10:29:35.384:
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:356:18: Firebase was unable to connect to FCM. Error: Error Domain=com.google.fcm Code=501 "(null)"
Do you have any ideas what I might have done wrong?
Like I said I need to take a look at the code, otherwise it's impossible for me to assist.
Sample project for iOS only (because Android works fine). Please note that I have removed the GoogleService-Info.plist and changed the app id...
Thanks! Taking a look..
@dbenninger You're doing it right, and with your app I was able to get this prompt in the simulator:

What I did after unzipping you code was:
GoogleService-Info.plist to app/App_Resources/iOSnativescript.id in the root package.json to org.nativescript.firebasedemo (same as the BUNDLE_ID in GoogleService-Info.plistconsole.log("------ firebase bootstrap ok"); to node_modules/nativescript-plugin-firebase/firebase.ios.js at line 140, so inside the function where UIApplicationDidFinishLaunchingNotification is registeredtns platform remove ios && tns platform add ios to clear any dangling stuffUpon the next `tns emulate ios --device "iPhone 6s" I got that prompt.
Let me know if you can at least get the console.log statement to show up as that's key to showing the prompt (actually the line application.registerForRemoteNotifications(); in said funtion is).
Well, I always got the prompt, even with the error messages in the log.
I followed your steps above and this is what I got in the simulator:
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]: Configuring the default app.
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]: Normal message received by listener connection. Ignoring.
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]: Could not successfully update network info during initialization.
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]: Firebase Crash Reporting: Successfully enabled
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]:
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]:
Aug 17 13:11:48 Davids-MacBook-Pro-2 FirebaseTest[60987]: CONSOLE LOG file:///app/main.js:7:16: firebase.init done
Aug 17 13:11:48 Davids-MacBook-Pro-2 backboardd[60928]: SecTaskCopyDebugDescription: FirebaseTest[60987]
Aug 17 13:11:48 Davids-MacBook-Pro-2 backboardd[60928]: SecTaskCopyDebugDescription: FirebaseTest[60987]
Aug 17 13:11:48 Davids-MacBook-Pro-2 backboardd[60928]: SecTaskCopyDebugDescription: FirebaseTest[60987]
Aug 17 13:11:49 Davids-MacBook-Pro-2 backboardd[60928]: SecTaskCopyDebugDescription: FirebaseTest[60987]
Aug 17 13:11:49 Davids-MacBook-Pro-2 backboardd[60928]: SecTaskCopyDebugDescription: FirebaseTest[60987]
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: assertion failed: 15G31 13E230: libxpc.dylib + 57882 [66C28065-C9DB-3C8E-926F-5A40210A6D1B]: 0x7d
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:140:18: ------ firebase bootstrap ok
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]:
Aug 17 13:11:49 --- last message repeated 1 time ---
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: CONSOLE LOG file:///app/tns_modules/@angular/core/src/facade/lang.js:360:16: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
Aug 17 13:11:49 --- last message repeated 3 times ---
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: (Error) MC: MobileContainerManager gave us a path we weren't expecting; file a radar against them
Expected: /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
Actual: /Users/davidbenninger/Library/Developer/CoreSimulator/Devices/9AF1BF74-AAA6-4CF4-B4D3-10D54627EF1C/data/Containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles
Overriding MCM with the one true path
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:348:14: Firebase FCM token received: cE-kjBcBIHs:APA91bGTTcABSdKPd-f9miZFPJDTN38c3amYYTwS80I4nAIKtc1mzhVpOgWHlm4kar8KQ7Sa7gOIqAx5U5p3rOlrDORPIRUUutgnrJUS29TTln6UdUPIkqEnYiZm_EYkpJ-cblbjX7RF
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: CONSOLE LOG file:///app/main.js:12:16: token is: cE-kjBcBIHs:APA91bGTTcABSdKPd-f9miZFPJDTN38c3amYYTwS80I4nAIKtc1mzhVpOgWHlm4kar8KQ7Sa7gOIqAx5U5p3rOlrDORPIRUUutgnrJUS29TTln6UdUPIkqEnYiZm_EYkpJ-cblbjX7RF
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]: CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:357:18: Firebase was unable to connect to FCM. Error: Error Domain=com.google.fcm Code=501 "(null)"
Aug 17 13:11:49 Davids-MacBook-Pro-2 FirebaseTest[60987]:
And this is what I get on my device:
2016-08-17 13:14:05.818 FirebaseTest[2300:1518213] Configuring the default app.
2016-08-17 13:14:05.830 FirebaseTest[2300:]
2016-08-17 13:14:05.836 FirebaseTest[2300:]
2016-08-17 13:14:05.838 FirebaseTest[2300:1518213] Firebase Crash Reporting: Successfully enabled
2016-08-17 13:14:05.848:
2016-08-17 13:14:05.848:
2016-08-17 13:14:05.855:
2016-08-17 13:14:05.893:
CONSOLE LOG file:///app/main.js:7:16: firebase.init done
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:140:18: ------ firebase bootstrap ok
NativeScript loaded bundle file:///System/Library/Frameworks/CoreGraphics.framework
NativeScript loaded bundle file:///var/containers/Bundle/Application/42FE4599-B4E2-4E61-BDC9-218D0A2FBA6B/FirebaseTest.app/Frameworks/TNSWidgets.framework
CONSOLE LOG file:///app/tns_modules/@angular/core/src/facade/lang.js:360:16: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
2016-08-17 13:14:07.163 FirebaseTest[2300:]
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:348:14: Firebase FCM token received: evO9xQDZnpk:APA91bEKKLGOdZJbLHt5r_bO69p0Ve4dnsEqiOcxj8aA1Og_ijPnYTlGTt498cyKfGvctspLHVmv_wNbZqVAdvjmfGPJaf3ottUeK8LaxOj-LBfRBePn4w0KLFlYYrZlasyoB6S__RfO
CONSOLE LOG file:///app/main.js:12:16: token is: evO9xQDZnpk:APA91bEKKLGOdZJbLHt5r_bO69p0Ve4dnsEqiOcxj8aA1Og_ijPnYTlGTt498cyKfGvctspLHVmv_wNbZqVAdvjmfGPJaf3ottUeK8LaxOj-LBfRBePn4w0KLFlYYrZlasyoB6S__RfO
2016-08-17 13:14:07.636:
CONSOLE LOG file:///app/tns_modules/nativescript-plugin-firebase/firebase.js:357:18: Firebase was unable to connect to FCM. Error: Error Domain=com.google.fcm Code=501 "(null)"
@dbenninger So @kamranarshad said he didn't get the prompt and you said "I have got the same issue with a real device." so I assumed you didn't see it as well.
So what exactly is and is not working for you and what have you tried? If I Google for "FIRMessaging registration is not ready with auth credentials" (part of the log above) I see people saying you need to upload your APNS certificates to Firebase. Did you do that for your app in the Fb console at settings > Cloud messaging?
Yes, sorry about that, I was only referring to the "Firebase was unable to connect to FCM" log message. The problem is that I do not get any push notifications on iOS.
I did create the certificates and uploaded them to Firebase. But I think I'll just delete the Firebase project completely and start over again... something must be messed up. I will let you know if I find the issue...
OK, good luck. I think you're on the right track. Make sure the app id's in package.json, the plist, etc are all the same.
Thanks. Quick question: when running on your simulator, did you get any errors or warnings in the console? Did you try it on a real device?
I probably got warnings but don't mind them since I always test on a real device as well as a sim can't receive notifications.
I can't get it to work either. What a f*g pain in the ass it is to make it work on iOS whereas it works so effortlessly on Android.
I tried everything under the sun, I followed each guide, uploaded the p12, re-downloaded provisioning profile, used Xcode to deploy to make sure I was using the right signing identity, etc but I always get this stupid message.
I have looked around extensively on the internet to find a solution but without much success. I found two possible solutions, could you have a look?
https://github.com/googlesamples/google-services/issues/205#issuecomment-228569641
"501 means that the app is missing an id that GCM needs requires. (...) If you guys are facing issues with this I would suggest moving to the new Firebase Cloud Messaging libraries. We don't expose these errors in the new library and we all the auto-retry and fetch stuff is in it so you wouldn't have to worry about these errors."
And
https://codedump.io/share/Co9IremtXwOv/1/cloud-messaging-handing-terminate-app
"After that in App Delegate use the code below(I specify the tricky line) : (...)"
"FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.Unknown)"
Also, maybe this:
"We found the fix - if you enable detailed debug logging you will probably see a message saying something about using the instance id too soon. Once you make the call to the IID api you have wait for a bit before starting to use it to register with GCM. We put in a retry loop with some delay upfront and the problem was gone."
Thank you
So guys, how are you testing sending a push notification? I have limited success with the Firebase console, but the curl command is very quick and always delivers push notifications to me.
curl -X POST --header "Authorization: key=SERVER_KEY" --Header "Content-Type: application/json" https://fcm.googleapis.com/fcm/send -d "{\"notification\":{\"title\": \"My title\", \"text\": \"My text\", \"sound\": \"default\"}, \"priority\": \"High\", \"to\": \"PUSH_TOKEN\"}"
init and you should see "Firebase FCM token received" along with the value.Please let me know if that changes things.
I test directly from the gcm interface and use "send to all". It worked flawlessly for Android so the problem is not from this side I believe but I will test with curl.
Nope, absolutely nothing with curl. I even deleted the app to get another token.
Could you look at the links I provided including this one ("which seems to do pretty much the same"): http://stackoverflow.com/questions/37333177/cloud-messaging-handing-terminate-app
It really seems to be this line "FIRInstanceID.instanceID().setAPNSToken(deviceToken, type: FIRInstanceIDAPNSTokenType.Unknown)".
Do you set it up this way?
@Sethiatspace I did indeed take a thorough look at your links as I take this issue very seriously. It's very hard to reproduce without knowing everything about your apps so I have to make assumptions and be prepared for many scenario's. That's why I've now added another handler for registering with FCM just in case Firebase autoconnect fails us (it's in one of the links you suggested).
Also, I've upgraded the Firebase SDK to the latest version (we were one pointrelease behing). So if builds fail make sure you update your local Podspec and do a tns platform remove ios && tns platform add ios. From the changelog it shouldn't make a difference but you never know..
I'm using the demo app and curl, and after starting the app and running init, then invoking the curl command I get a push message in about half a second.
Please retry with 3.5.2.
YES! Now it works, thank you! Just so you know, I saw in your commit that you changed Firebase POD to 3.4.0 but that wasn't the case in the Podfile after doing tns plugin add so I manually changed it and now everything works perfectly.
@Sethiatspace good point, I'll amend that. Thanks for all your feedback. Fixed in 3.5.3.
Great! It works now!
Thanks a lot...
Close it! Close it! 🍷
So what was the final fix for this issue?
On Firebase 3.10 I have this issue on first launch of my iOS app, which disappears after 2nd launch.
(Unable to connect to Firebase with error: Error Domain=com.google.fcm Code=501 "(null)")
yep...this issue just disappear after 2nd lauch.
Hi, does the library works with XCode 7
@wickstargazer dunno, why would you use 7 anyway?
Our production is on 7, 2.2 And we have some urgent requirements to
release. Will take an amount of time to migrate to swift3 ... any
suggestions?
On Thu, Feb 2, 2017 at 2:52 PM, Eddy Verbruggen notifications@github.com
wrote:
@wickstargazer https://github.com/wickstargazer dunno, why would you
use 7 anyway?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/105#issuecomment-276890375,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeNEprHm7rfBsw6Ply-bC3c6ftfMl_uks5rYYtDgaJpZM4JkiJC
.
I don't have 7 so you're best equipped to answer your own question I guess.
To answer my own question is, Xcode 8 needs migration to 2.3 and I better
do it once and migrate to 3.0. So for the time being i just need to know if
5.3.2 can work with swift 2.2 on Xcode 7. If i install 8, the minimum
version is automatically 2.3 = Force migration!
On Thu, Feb 2, 2017 at 3:08 PM, Eddy Verbruggen notifications@github.com
wrote:
I don't have 7 so you're best equipped to answer your own question I guess.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/EddyVerbruggen/nativescript-plugin-firebase/issues/105#issuecomment-276892929,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABeNEgP18VADi1UVr-xhYPDuBt_Owm6bks5rYY8KgaJpZM4JkiJC
.
I meant your initial Q: "Hi, does the library works with XCode 7".
firebase.init({
// Optionally pass in properties for database, authentication and cloud messaging,
// see their respective docs.
iOSEmulatorFlush: true,
persist: true,
onPushTokenReceivedCallback: function(token){
console.log(token+ " Push Token");
setString("deviceToken", token);
}
}).then(
(instance) => {
console.log("firebase.init done");
},
(error) => {
console.log("firebase.init error: " + error);
}
);
Getting Log Error :
2017-02-07 14:29:41.138:
CONSOLE LOG file:///app/app.module.js:22:16: firebase.init done
2017-02-07 14:29:41.246 PushDemo[672:]
2017-02-07 14:29:41.249 PushDemo[672:]
2017-02-07 14:29:41.250 PushDemo[672:]
2017-02-07 14:29:42.196 PushDemo[672]
2017-02-07 14:29:43.622 PushDemo[672:]
14:29:44 - Compilation complete. Watching for file changes.
Also not asking Permission Dialog to receive notification Anyone Face this issue..???
Share your project with me plz so I can take a look. Not a fragment, the entire thing.
@EddyVerbruggen : thank you for your prompt response...
Sorry I asked my Senior won't allow me to share my entire project. But giving you the Class Details.
// this import should be first in order to load some required settings (like globals and reflect-metadata)
import { platformNativeScriptDynamic, NativeScriptModule } from "nativescript-angular/platform";
import { AppModule } from "./app.module";
import firebase = require("nativescript-plugin-firebase");
firebase.init({
// Optionally pass in properties for database, authentication and cloud messaging,
// see their respective docs.
}).then(
(instance) => {
console.log("firebase.init done");
},
(error) => {
console.log("firebase.init error: " + error);
}
);
firebase.addOnPushTokenReceivedCallback(
function(token) {
console.log('token is: ' + token);
}
);
platformNativeScriptDynamic().bootstrapModule(AppModule);
This is the main Module where I am initialize the Firebase...
Error In the Xcode...
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26: Unhandled Promise rejection: Enable FIRMessaging in Podfile first ; Zone: <root> ; Task: null ; Value: Enable FIRMessaging in Podfile first undefined
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:342:26: Unhandled Promise rejection: Enable FIRMessaging in Podfile first ; Zone: <root> ; Task: null ; Value: Enable FIRMessaging in Podfile first undefined
2017-02-08 10:27:27.989406 Hieber[1406:169763] CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): Enable FIRMessaging in Podfile first
CONSOLE ERROR file:///app/tns_modules/nativescript-angular/zone.js/dist/zone-nativescript.js:344:22: Error: Uncaught (in promise): Enable FIRMessaging in Podfile first
2017-02-08 10:27:31.491037 Hieber[1406:169763] CONSOLE LOG file:///app/tns_modules/@angular/core/bundles/core.umd.js:78:20: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
CONSOLE LOG file:///app/tns_modules/@angular/core/bundles/core.umd.js:78:20: Angular 2 is running in the development mode. Call enableProdMode() to enable the production mode.
2017-02-08 10:27:32.450194 Hieber[1406:169985] [Firebase/Core][I-COR000001] Configuring the default app.
2017-02-08 10:27:32.450 Hieber[1406] <Debug> [Firebase/Core][I-COR000001] Configuring the default app.
2017-02-08 10:27:32.647: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-02-08 10:27:32.665529 Hieber[1406:169763] CONSOLE LOG file:///app/main.js:7:16: firebase.init done
CONSOLE LOG file:///app/main.js:7:16: firebase.init done
2017-02-08 10:27:32.697673 Hieber[1406:169985] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-02-08 10:27:32.698 Hieber[1406:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-02-08 10:27:32.699056 Hieber[1406:169985] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-02-08 10:27:32.699 Hieber[1406:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-02-08 10:27:32.704963 Hieber[1406:170051] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-02-08 10:27:32.707 Hieber[1406:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
Don't do addOnPushTokenReceivedCallback before init is done. You can simply add it to init as shown here.
But the main problem is this error log message: Enable FIRMessaging in Podfile first
@EddyVerbruggen : I have tried that too still getting the same Error.. !!!
Great. That's why I need to look at your project. But until then, trial and error continues.
Remove and re-add the ios platform forlder tns platform remove ios.. and check that you have enabled messaging in the firebase json configuration file.
@EddyVerbruggen : I have remove and re-add iOS Platform still not getting Push Token in console as well as no Permission Dialog for Receive notification
Analytics/INFO> Firebase Analytics v.3600000 started
<FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
<FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
[] nw_host_stats_add_src recv too small, received 24, expected 28
Feb 8 11:08:31 --- last message repeated 13 times ---
[] ____nwlog_simulate_crash_inner_block_invoke dlopen CrashReporterSupport failed
[] __nwlog_err_simulate_crash simulate crash failed "nw_socket_set_common_sockopts setsockopt SO_NOAPNFALLBK failed: [42] Protocol not available"
CONSOLE LOG file:///app/main.ts:null:null: firebase.init done
Do you still have the Enable FIRMessaging in Podfile first message as well?
Like I said: I need your project, otherwise this will go back and forth forever. If you can't send that, then provide me with a new project that reproduces the error.
@EddyVerbruggen : give me 30 min. creating new project that produces the same error.. and share with you
@EddyVerbruggen : Pls Check Demo to help me out from this issue...
I have set up...
Running app pushDemo.xcworkspace getting following error....
2017-02-08 11:42:08.960256 PushDemo[223:7330] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-02-08 11:42:08.961 PushDemo[223:] <FIRAnalytics/INFO> Firebase Analytics v.3600000 started
2017-02-08 11:42:09.000: <FIRInstanceID/WARNING> FIRInstanceID AppDelegate proxy enabled, will swizzle app delegate remote notification handlers. To disable add "FirebaseAppDelegateProxyEnabled" to your Info.plist and set it to NO
2017-02-08 11:42:09.018461 PushDemo[223:7065] CONSOLE LOG file:///app/firebase.js:15:20:
CONSOLE LOG file:///app/firebase.js:15:20:
2017-02-08 11:42:09.019137 PushDemo[223:7065] CONSOLE LOG file:///app/firebase.js:16:20: firebase.init done
CONSOLE LOG file:///app/firebase.js:16:20: firebase.init done
2017-02-08 11:42:09.162753 PushDemo[223:7330] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-02-08 11:42:09.163 PushDemo[223:] <FIRAnalytics/INFO> To enable debug logging set the following application argument: -FIRAnalyticsDebugEnabled (see http://goo.gl/Y0Yjwu)
2017-02-08 11:42:09.167931 PushDemo[223:7330] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
2017-02-08 11:42:09.168 PushDemo[223:] <FIRAnalytics/INFO> Successfully created Firebase Analytics App Delegate Proxy automatically. To disable the proxy, set the flag FirebaseAppDelegateProxyEnabled to NO in the Info.plist
So far no error for FIRMessaging but not getting Push Token...
@dbenninger : I am facing the same problem.. Please help me out to solve the issue..
@pap5508, I would like to help you, but the uploaded PushDemo.zip is missing some important files (e.g. package.json). Could you please share the complete PushDemo project?
Also I think it's weird that FIRMessaging is not logging anything. Did you run 'npm run setup' in the node_modules/nativescript-plugin-firebase folder?
@dbenninger : thank you.. but I have solved the issue and working fine
@pap5508 don't leave us hanging! What was the fix?
Same issue here:
FIRMessaging.messaging().connect { (error) in
if (error != nil) {
print("Unable to connect with FCM. \(error)")
} else {
print("Connected to FCM.")
}
}
Error
Unable to connect with FCM. Optional(Error Domain=com.google.fcm Code=501 "(null)")
Most helpful comment
@pap5508 don't leave us hanging! What was the fix?