expo-notifications not working properly with android. "Error encountered while updating server registration with latest device push token." - expo-notifications

I have a problem setting notifications with expo-notifications on android.
So I followed all the steps of expo documentation. Everithing works very well with iOS but when it comes to android, I get the following error:
[expo-notifications] Error encountered while updating server registration with latest device push token. Error: Fetching the token failed: Please set your Project ID. A valid Firebase Project ID is required to communicate with Firebase server APIs: It identifies your application with Firebase.Please refer to https://firebase.google.com/support/privacy/init-options.
I think I did everything I had to do:
Set up a firebase account with a given ID,
add an android application (the package name is the same of the one that apperas on app.json)
download google-services.json file and copy it on app's root directory
check that the key generated on google cloud is the same than the one on google-services.json file
add on app.json file "googleServicesFile": "./google-services.json" and "useNextNotificationsApi": true,
copy the server token from firebase and upload to the project using command expo push:android:upload --api-key
build the project
I really tried to look for information but I can't find a solution.
the error appears only on android devices, and it appears as soon as the command import * as Notifications from 'expo-notifications'; is called.
Please help!

Related

Empty build after upload app to Test Flight App Store Connect

I try upload new version of my app and I do it directly from XCode. After succesfull upload I do not see new build online on AppStore connect, but XCode says that upload is done.
As You see, 1.0.52 is created by Xcode but empty. 1.0.38 is my old build when all was ok. Any idea how to fix it? I can manually create iOS build on AppStore Connect and add package from my computer?
AppStore Connect didn't return any error, but now I found email on my developers email account. I missed one value at info.plist, similar problem like there: NSAppleMusicUsageDescription - Missing Info.plist key
But about it I didn't have any information on AppStore Connect, only on email.
Part of email:
Dear Developer,
We identified one or more issues with a recent delivery for your app, "**** ***" (***** ***). Please correct the following issues, then upload again.
ITMS-90683: Missing Purpose String in Info.plist - Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSAppleMusicUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. Starting Spring 2019, all apps submitted to the App Store that access user data are required to include a purpose string. If you're using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required. You can contact the developer of the library or SDK and request they release a version of their code that doesn't contain the APIs. Learn more (https://developer.apple.com/documentation/uikit/core_app/protecting_the_user_s_privacy).

iOS 10 - uploaded build showing success in xcode but its not available in the app store content?

Xcode upload showing success while upload but not showing error message in the app store content page
Note: already requested more information to apple team
Please check your email, iTunes connect page.
App Store team should request resolving ITMS-XXXXX some issue.
It is showing success when uploading binary but after processing in iTunes connect, they request resolving specific issue number ITMS-XXXXXX
for example
Dear Developer,
We identified one or more issues with a recent delivery for your app, "SUPER GREAT APP". Please correct the following issues, then upload again.
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview).
Best regards,
The App Store Team
With the reference of the video, I resolved:
https://developer.apple.com/videos/play/wwdc2016/709/?time=1754
I missed NSCameraUsageDescription field in the info.plist
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html

How to read crash report getting in Organizer?

I am getting a crash while running the App in real time only. If I send build using Diawi and Payload methods, it runs very well on all the iPhone devices but when I upload build using Testflight it crashes and gives me this kind of report:
Even I am not using any kind of enumrateObjectWithOptions:usingBlock function in my class. I have googled a lot about it but didn't get anything!
NOTE: First of all user logs in with facebook then firebase auth then
firebase login with facebook access token and after that getting crash
before I use the firebase instance id.
Any help will be appreciated.

"The Application is incorrectly configured" on published game

I set up Google Play Games Services through the Google Play Developer Console by following the instructions here.
I went through the troulbeshooting guide here.
If i run my app through eclipse, it can connect fine to Play Games. However now the update is released and if I download it from the Play Store it cannot connect.
I verified that my SHA1 from the android export matches what is in the developer console. I even tried linking a new app with the SHA1 and it says: "This client ID is globally unique and is already in use."
I am now panicking because my game is live and can't connect. Help!
EDIT:
I added my client ID through the Google Play Developer Console, not the Google Developer Console. I removed the Client ID that was in the Google Developer Console.
Edit:
I cannot add a new client in GDC, i get an error about "duplicate fingerprint":
Have you tried deleting the console project related with your play service game installed application ?
Before altering / adding new API clients, make sure that you have checked the following:
IS your play games project published?
Or, are the accounts you are using for testing included on the testers list?
Are you signing your app correctly? If you are using your debug keystore in a released game, the app will not correctly be able to authenticate.
At any rate, deleting clients could fix working apps if you have already published and I'd hate to give you advice that breaks stuff. That said, if you're sure you need to create / recreate your client, move on.
The reason you are encountering the "This client ID is globally unique and is already in use." issue is that there exists a client with the same package name and SHA-1 hash in any Google Developer console project (not necessarily a Google Play Games project, not necessarily the current project, and not necessarily a project for your account if you are working on teams). This is because the combination of package name and SHA-1 hash must be unique for authentication.
At any rate, it's possible that the project still has a client (for Android) created that needs to be removed. This means that you must either remove the "bad" client from the developer console, re-sign your app with a new keystore, or use a different package name.
Option 1 - Removing clients
Although this is the most destructive option, it may be a good approach if you already removed clients from the Play Games Developer console and don't want to change your configuration.
Access your project from https://console.developers.google.com because this will give you a superset of the clients created from the play games console and will have an according project. Select the APIs & Auth -> Credentials section. From here, remove any Android clients you intend to replace.
Return to https://play.google.com/apps/publish and select your games project. You should now be able to add another client.
Option 2 - Create a new keystore
This is best covered in the Android documentation. After changing your keystore, you will be able to add another client using the new keystore signature.
Option 3 - Change the package name
You must update com.yourname.app with something other than com.yourname.app. This means renaming folders in your Android project, changing includes and package namespaces, and updating your project's AndroidManifest.xml.
After changing any of these, you should be able to create a working Google API project and get your app ready.
Have you only one account?
"This client ID is globally unique and is already in use."
Maybe someone is using your sha1... or you with another account

App is not authorized to scopes after installing via chrome web store

We are in the process of creating our new app for v2 of the apps marketplace. Recently we have run into quite a major issue and we are having a lot of trouble resolving it.
We are testing the workflow where a domain admin installs via the chrome webstore listing. The actual installation of the app works, insofar as the app is installed on the domain and the scopes appear to be granted when looking at the "Manage API client access" section in the domain admin panel (http://i.stack.imgur.com/a63nv.png).
However, when we attempt to use the service account to get calendar or contacts info, we are getting "Requested client not authorized" errors.
{
"error" : "access_denied",
"error_description" : "Requested client not authorized."
}
However, if we manually add our service account + scopes to the domain in question, then accessing the data programmatically works fine (http://i.stack.imgur.com/g6pRg.png).
So, clearly we are missing something here, with how installing a marketplace app via the chrome web store is supposed to work.
Other things to note:
Chrome webstore listing is marked as unlisted.
New marketplace app is not approved (obviously) as the tester received this specific error when attempting to install the marketplace app.
We got it figured out. The issue was in how we declared our contacts API scope in the marketplace sdk setup screen.
In the marketplace setup screen, we declared using the contacts scope without a trailing slash ("https://www.google.com/m8/feeds").
However in our app, we were sending oauth requests for the calendar feed with the slash at the end. ("https://www.google.com/m8/feeds/"). This mismatch caused the whole request to fail with the error message above.
If anyone runs into this and is baffled at why their service account requests are failing, make sure you are consistent with your slashes at the end!
I would suggest to Google that you should update the marketplace sdk screen to also be consistent and reject scopes that do not have a slash at the end. That would have saved us days of frustration.

Resources