I'm not able to get a Expo Push Notifications Token - expo

I'm stuck in the notification sections. When i load the app on real device, using expo go, i get this error:
Error encountered while fetching Expo token, expected an OK response, received: 400 (body: "{"errors":[{"code":"VALIDATION_ERROR","message":"The Expo push notification service is supported only for Expo projects Ensure you are logged in to your Expo developer account on the computer from which you are loading your project.","isTransient":false}]}").
I don't have an account on the Expo.dev site. Is this the problem?
The version of expo I'm using is sdk47.

Related

APNs token-based authentication for development

is there an example of development environment VOIP notification with token-based authentication? I am trying to send VOIP notification to my app with auth token and keep getting BadDeviceToken response with status code 400. I have searched on the web and found this stackoverflow post, https://stackoverflow.com/a/48649312/2844934.
I have made sure that my app (expo app with dev-client) has development entitlement so I guess the problem is on my provider server (which I suspect it does not use development environment token??).
Thanks

Fetching the token Failed, message : FIS_AUTH_ERROR

I'm using Expo to build 2 android app, and using 1 Firebase Project.
For Notification I'm using expo-notifications.
I had uploaded Firebase Server Key to Expo expo push:android:upload --api-key XXX-XXX-XXX.
I had configured android app credential in firebase Project Settings with SHA-1 from Google Play Console, then downloaded the latest google-services.json, then placed in app.json and set path android.googleServicesFile : "./google-services.json".
I had configured package name API Google Cloud Platform same as app.json android.package, same as Android App Firebase Project Setting Package Name.
I had configured SHA-1 Certificate Fingerprint API Google Cloud Platform and Android App Firebase Project Settings same as SHA-1 Certificate Fingerprint from Google Play Console.
I had enabled Firebase Installation API, Firebase Cloud Messaging, FCM Registration API, Cloud Messaging in Google Cloud Platform.
I set single user login within my app, so When user did new login, the past of usertoken will be reset to a new token, and another login will be logout.
The problem is, one of my app works perfectly, and another one came out with error, it said, Fetching the token Failed, message : FIS_AUTH_ERROR.
And Notification is not delivered to broken app.
Help me please...

AWS Pinpoint error after updating APNS certificate with Expo

After sending a new build to the app store, the push notifications for my app are no longer working. During the build, expo made a new APNS certificate, and now when I try to push a notification to users, I get the following error message.
"'{"errorMessage":"Invalid
Credentials","channelType":"APNS","pushProviderStatusCode":"403","pushProviderError":"InvalidProviderToken","pushProviderResponse":"{\"reason\":\"InvalidProviderToken\"}"}'"
I get the same error message when attempting to send myself a notification through the AWS Console. I tried to update my push notification credentials on expo, but get a similar error:
? Path to P8 file: /Users/REDACTED/Downloads/AuthKey_D3QREDACTED-1.p8
? Key ID: REDACTED ? Apple Team ID: REDACTED Unable to validate Push
Keys due to insufficient Apple Credentials
I tried following every thread I could find online about the error and verified that I had the right Team ID and Key ID, but it still does not work.
Happy to provide more info if needed, and thank you for your help
I just had to regenerate a new .p8 file and upload it to AWS pinpoint
I had this issue recently, and no matter how many times I tired to "Edit" the APNs configuration it would not work. Eventually I just removed APNs setting from PinPoint, saved it, and then set it up again fresh.
Now it works.

AWS Pinpoint - Unregistered Application. Pinpoint is not registered in PNS

We have registered FCM server key on Pinpoint. We were able to successfully receive messages on our emulator when tested with Cloud Messaging on Firebase console. However, when we are trying to send push notification using GCM channel of 'sendUsersMessages' API - we receive below error for endpoint
"DeliveryStatus": "PERMANENT_FAILURE",
"StatusCode": 404,
"StatusMessage": "{\"errorMessage\":\"Unregistered Application\",\"channelType\":\"GCM\",\"pushProviderStatusCode\":\"0\",\"pushProviderError\":\"a153cc45babasomepinpointid67073b-gcm#Pinpoint is not registered in PNS.\"}"
What does this error mean? Does it mean our Pinpoint application is not registered on Firebase? Or our device doesn't have token? or something else. Couldn't find any answers. Please help
After some play around - figured out that I was using RestrictedPackageName matching my application's FCM console package name (like com.xyz.app.abc) - I removed that and push notification went through successfully.

notification from app request Facebook not received

Im making an application on Phonegap, and therefore using javascript. I have added the facebook plugin, and everything seems to work fine. The user can log in and make app requests to friends using the FB.ui:
FB.ui({method: 'apprequests',
message: 'Try this application, and get ready to Guess This Sound!'
}, requestCallback);
The dialog pop up, and when I send an invitation my requestCallback method return OK
function requestCallback(response){
alert("response " + response);
}
However, my friends do not receive any notification about the request. My application is no longer i sandbox mode, and I can't figure out whats the problem is. Since Im using phonegap, I have added ios and android platform on facebook, and I guess no canvas URL is needed.
UPDATE
Some users do now receive the notifications from the application, but not everyone.However, when my friend clicks on the notification he receive this message: "The requested page can not be viewed right now. It could be temporary unavailable." Is it because my application is not available on google play and app store for the moment?
You have to Add app in your developer account
facebook -> Apps -> "You app" -> Setting -> add platform -> App on Facebook -> Add any URl
Now you will get app request notification
The problem was due to wrong set up in facebook developer API. The error still remains, but is because the app is not released yet. To see the solution to this, see:
Facebook invite request error android