When I try to create and send a push notificartion to my Android TV, I get following toast message on my TV:
Developer warning for package *.
Failed to post notification on channel "default".
See logs for more details.
Where are those log files saved to?
I've found it in usual logcat. But not under app package's logs, but just in unfiltered system ones, like:
2021-12-17 01:27:54.257 665-1957/? E/NotificationService: No Channel found for pkg=com.company.appname, channelId=default, id=0, tag=null, opPkg=com.company.appname, callingUid=10131, userId=0, incomingUserId=0, notificationUid=10131, notification=Notification(channel=default pri=0 contentView=null vibrate=null sound=null defaults=0x0 flags=0x10 color=0xffffffff vis=PRIVATE)
Related
I created an empty xamarin forms project and followed the path to connect to the database. I am able to connect with the right key store file but as soon as I try to create data on the server I am getting a bad grpc response.
It look like ios is calling with http 1.1, but google requiers 2.0.
This is the line that fails:
await docRef.SetAsync(user);
This is the error I am getting:
e {Grpc.Core.RpcException: Status(StatusCode="Internal", Detail="Bad gRPC response. Response protocol downgraded to HTTP/1.1.") at Google.Api.Gax.Grpc.ApiCallRetryExtensions+<>c__DisplayClass0_0`2[TRequest,TResponse].<WithRetry>b__0 (TRequest request, Google.Ap…}
I am stuck here for days now, please help.
The same code works fine on android devices, its just iOS problem in xamarin.forms.
EDIT:
I have noticed, that this issue does not exist on the firebase nuget package 3.2.1 and below. Just the higher ones throw this error.
I'm having an issue with FCM on flutter. I have implemented messaging from my server so I'm storing my phone token for each user.
The thing is that when a user logs in for the very first time everything works properly, messages are being sent and user gets notified.
If I do not use the app during the weekend, on Monday I try to send a message by doing some actions on my app but messages are not being sent. I can see my token stored properly in my database.
I'm using firebase_messaging 2.1.0 for flutter.
This is how I get my token
_fireBaseMessaging.getToken().then((token){
_myPhoneToken = token;
});
1-I know token may change when:
App deletes Instance ID
App is restored on a new device
User uninstalls/reinstall the app
User clears app data
But none of this happens.
Any advice on how to handle this scenario? thanks in advance.
UPDATE
Provided you have setup the FCM sdk the right way (but you said that it works the fist time you install the app, so I guess so).
Provided that you are sure that the device_token you are using is the one of the device on which you are expecting to receive the notification (check if it's still the same), you should get on this device your notification quite soon if you use "priority" : "high".
{
"to" : "device_token",
"priority" : "high",
"notification" : {
"sound": "default",
"body" : "Test Notification body",
"title": "Test Notification title"
}
}
This method call
_firebaseMessaging.getToken().then((String token)
return always the new token even if it has been updated. So if you print this out on your device and you send a notification on this token without error, there's no reason why you should not get the token if the device has a valid internet connection active.
It's true that the device token can change during time. If you uninstall and reinstall the app, you can see the token will change and if you try to send a notification on the old one, you will get an error.
If instead the token will change during application lifetime, you can be notify on your server side by listening:
_firebaseMessaging.onTokenRefresh.listen((newToken) {
_fcm_token = newToken;
// send the new fcm to your server
});
So first of all I suggest you to be able to send a notification to a device with Postman. Check if the token you are using is still the one on the device. Then you can try to uninstall and reinstall the application and try to use the old token. You will get an error. Then try to send to the new one, and you should get your notification.
Then wait for some days and try again, check if the token has changed or not and if it's not changed you should be able to send the notification without problems with the same token.
Also be aware that data message on Android if the app is terminated are still not supported.
Some networks/router/mobile can cut the connection between firebase library and firebase server due to inactivity (5min without message). This cut may be detected by the library up to 30min (FCM heatbeat interval).
These are some links discussing this issue:
https://github.com/firebase/quickstart-android/issues/307
Android: Delay in Receiving message in FCM(onMessageReceived)
I contacted firebase support but they told that since the issue is caused by external part they cannot fix it (I suggest decreasing heartbeat interval ...)
I fixed it in android using an interval job which apply these instructions:
context.sendBroadcast(new Intent("com.google.android.intent.action.GTALK_HEARTBEAT"));
context.sendBroadcast(new Intent("com.google.android.intent.action.MCS_HEARTBEAT"));
You may write this specific code for Android side and should find something similar for ios side.
I've setup Google login in my Firebase app (I'm using the new Firebase console), but each time I try with Google, I get the following error:
#<NSError:0x11f0625a0, description="An internal error has occurred, print and inspect the error details for more information.", code=17999, domain="FIRAuthErrorDomain", userInfo={"NSUnderlyingError"=>#<NSError:0x122278130, description="The operation couldn’t be completed. (FIRAuthInternalErrorDomain error 3.)", code=3, domain="FIRAuthInternalErrorDomain", userInfo={"FIRAuthErrorUserInfoDeserializedResponseKey"=>{"message"=>"", "errors"=>[{"reason"=>"invalid", "message"=>"", "domain"=>"global"}], "code"=>400}}>, "error_name"=>"ERROR_INTERNAL_ERROR", "NSLocalizedDescription"=>"An internal error has occurred, print and inspect the error details for more information."}>
I don't really know where yo go from here, since there's no message in the message field. Any guesses on what this could be?
I've recently migrated to the new version of Firebase btw. I'm using the new SDK in my iOS app. Furthermore, I setup Google authentication a week before I migrated. I'm not sure if any keys have been overwritten in the migration. How do I check if I have the right keys in my console vs my GoogleService plist file?
I am trying to configure an example for SIPml5 and i found this info from https://wiki.asterisk.org/wiki/display/AST/Asterisk+WebRTC+Support.
I have asterisk 11.9.0 installed and downloaded source of SIPml5 from http://code.google.com/p/sipml5/source/checkout
I copied sample code into web root directory and example loaded successfully and also able to register 2 extensions.
I have tried both browser Google Chrome and Firefox with their latest versions.
For asterisk, I made some configuration like below.
Please check : http://pastebin.com/7KCvtcNf
For Outbound calls :
when i am dialling 8002 -> 8001 every time Chrome Browser asking for allow microphone. Is there any way to disable asking permission and allowing it by default ?
when i allow microphone then SIpml5 phone showing like "Not Allow".
Here is the asterisk logs : http://pastebin.com/JZeDjyay
For Incoming calls :
When call come to browser,And allow microphone then Call rejected and asterisk showing like "Got SIP response 603 "Failed to get local SDP" in asterisk CLI.
But After some google i found new link https://code.google.com/p/sipml5/wiki/Downloads for "SIPml-api.js" and after replacing that JS File Calls are comming in browser even i am able to answer that calls,Also in browser it says "In call" but in asterisk CLI it keep showing ringing and other end showing like "remote ringing" .
Here is the asterisk logs : http://pastebin.com/e8Ap3bhq
Can anyone please let me know what am i doing wrong?
If you are going to test webRTC, i successfully tested the Flashphoner Web Call Server with Asterisk 1.8.x versions using different call scenarios. Regarding sipML5, i would suggest you to please try using this tutorial by Sanjay Willy : http://highsecurity.blogspot.com/2012/12/webrtc-and-asterisk-11-using-sipml5.html
I hope it will be helpful for you.
Regards,
I am trying to run the pushtest sample that ships with the iOS SDK. In the .m file I have replaced the org name, app name and notifier name( which I have named 'apple'). I have the provisioning set up for my iPad. When I run the code, I don't see any window asking me to allow push notifications. On clicking the push to this device, the terminal spits out this error:
2014-01-30 14:04:20.525 Push Test[2970:60b] displaying alert. title: Error, message: {"error":"unauthorized","timestamp":1391119457656,"duration":0,"exception":"org.apache.shiro.authz.UnauthorizedException","error_description":"Subject does not have permission [applications:post:ed031740-7e90-11e3-a906-25e89414fcd7:/notifications]"}
I believe this is because the app has not obtained push permission, however, the alert window asking for this was not presented in the first case. How can I fix this?
"error":"unauthorized"`
This is an indication that your request requires authentication and you're not authorized to access the endpoint.
Push notifications out of the box require authentication - either an access_token (recommended) or client_id/secret. Try including the access_token in your header (instructions here).
If you want to disable authentication, you can add the GUEST role to /notifications (instructions here).
You need to give permissions to your application role:
curl -X POST "https://api.usergrid.com///roles/ -d '{"name":"nameforrole","title":"titleforrole","permission" : "GET,PUT,POST,DELETE:/users/me/**"}'