Error in setting up Google play services in unity - unity3d

Following the instruction on google play games plugin for unity, I have not been able to set it up correctly. My application crashes on signing in, with the following log output (with no more details). I've got no luck in finding a probable cause and searches seems to be out of any useful tip.
The actual error is displayed as:
Application ID () must be a numeric value. Please verify that your manifest refers to the correct project ID
The complete log output:
10-08 19:43:49.581 25688-25734/? E/linker: readlink('/proc/self/fd/49') failed: Permission denied [fd=49]
10-08 19:43:49.581 25688-25734/? E/linker: warning: unable to get realpath for the library "/data/data/com.testcompany.testapp/app_.gpg.classloader/d75c8e1bbeab9e1ddffb9d332585db71.dex". Will use given name.
10-08 19:43:49.667 25688-25734/? W/PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
10-08 19:43:49.675 25688-26526/? I/GamesNativeSDK: Auth operation started: SIGN IN
10-08 19:43:49.675 25688-26526/? I/GamesNativeSDK: Connecting to Google Play...
10-08 19:43:49.802 10946-10956/? W/GamesServiceBroker: Client connected with SDK 9683000, Services 9683438, and Games 37240038
10-08 19:43:49.837 10946-26540/? E/ValidateServiceOp: Application ID () must be a numeric value. Please verify that your manifest refers to the correct project ID.
10-08 19:43:49.842 25688-25688/? D/AndroidRuntime: Shutting down VM
10-08 19:43:49.846 25688-25688/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.testcompany.testapp, PID: 25688
java.lang.Error: FATAL EXCEPTION [main]
Unity version : 5.4.0f3
Device model : LGE Nexus 5
Device fingerprint: google/hammerhead/hammerhead:6.0/MRA58K/2256973:user/release-keys
Caused by: java.lang.IllegalStateException: A fatal developer error has occurred. Check the logs for further information.
at com.google.android.gms.common.internal.zze$zza.zzc(Unknown Source)
at com.google.android.gms.common.internal.zze$zza.zzv(Unknown Source)
at com.google.android.gms.common.internal.zze$zze.zzauc(Unknown Source)
at com.google.android.gms.common.internal.zze$zzd.handleMessage(Unknown Source)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I've taken the steps needed to generate OAuth2 client ID and I've successfully applied that to GooglePlayGame plugin in unity. What could be the reason of the error message?

If we refer to the actual error as shown in your log output, the problem is caused by the application ID declared in your Manifest which is actually one of the top setup mistakes committed by developers as shown in this video.
To troubleshoot this kind of error, please check the following:
For Android:
please verify that the value of the #string/app_id resource matches your application's numeric ID. The value of this resource should only contain digits. For example:
<string name="app_id">123456789012</string>
Warning: Do not use the full client ID (1233456789012.apps.googleusercontent.com) as your app ID. This will result in errors.
For iOS:
The application_ID is the number that Google Play Developer Console assigns to your project. Please note that is not the same as your Apple application_ID.
Then, after checking the application ID, please also check the certificate fingerprint. Please be noted that:
If you are debugging your game using your debug certificate but have configured games services using your release certificate, you should add a second linked app using the same package name and your debug certificate's SHA1 fingerprint. This will allow you to sign in to the application whether it's signed with the debug or release certificates.
For additional tips, refer to these related resources:
Top 7 Google Play games services setup mistakes - Video that describes common Google Play games services setup pitfalls and scenarios.
Android troubleshooting guide - Developer documentation that describes how to troubleshoot issues while developing Android games.
Lastly, this Q&A thread might also help wherein this GitHub post was suggested.

The problem was caused by multiple application configurations in Google play services. Although the game services panel was showing only one application with my package name, there were several instances of the same application configured in google cloud services previously for google cloud messaging and other services. The problem was only solved when I shut down all services, deleted the applications and patiently created one unified application configuration in Google play services.

I got this problem too. Here's My solution:
Delete old version of GooglePlayService and Admob plugins and import the new ones.
Open Android SDK Manager(In Unity, Window -> Google Play Games -> Downloads -> Google Play Gamse SDK(Android)), update the following ones:
Then try to set up Goole Play Service.
Additional, current verion of GooglPlayServices and Admob both import PlayServicesResolver/Editor/Google.JarResolverLib.dll(JarResolverLib.dll), just delete Google.JarResolerLib.dll.
Hope this can help you!

Related

java.lang.RuntimeException: Unable to start receiver (exception showed up in Google play store internal testing)

I deployed my flutter app to Google play store internal testing and after one hour, I saw this exception in the Pre-launch report details. I am not even sure where to start debugging. Could Someone please help? I don't have a lot of knowledge of Android since I am using Flutter.
Exception java.lang.RuntimeException: Unable to start receiver
com.google.android.finsky.instantapps.PhenotypeUpdateReceiver:
java.lang.IllegalStateException: Not allowed to start service Intent {
act=com.google.android.gms.phenotype.UPDATE
cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService
}: app is in background uid UidRecord{2a75503 u0a192 TRNB
bg:+2m53s648ms idle change:uncached procs:4 seq(0,0,0)} at
android.app.ActivityThread.handleReceiver (ActivityThread.java:4035)
at android.app.ActivityThread.access$1400 (ActivityThread.java:237)
at android.app.ActivityThread$H.handleMessage
(ActivityThread.java:1924) at android.os.Handler.dispatchMessage
(Handler.java:106) at android.os.Looper.loop (Looper.java:223) at
android.app.ActivityThread.main (ActivityThread.java:7664) at
java.lang.reflect.Method.invoke (Method.java) at
com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run
(RuntimeInit.java:592) at com.android.internal.os.ZygoteInit.main
(ZygoteInit.java:947) Caused by java.lang.IllegalStateException: Not
allowed to start service Intent {
act=com.google.android.gms.phenotype.UPDATE
cmp=com.android.vending/com.google.android.finsky.instantapps.PhenotypeUpdateService
}: app is in background uid UidRecord{2a75503 u0a192 TRNB
bg:+2m53s648ms idle change:uncached procs:4 seq(0,0,0)} at
android.app.ContextImpl.startServiceCommon (ContextImpl.java:1715)
at android.app.ContextImpl.startService (ContextImpl.java:1670) at
android.content.ContextWrapper.startService (ContextWrapper.java:720)
at alj.a (alj.java:2) at alm.a (alm.java:3) at wnv.a (wnv.java:2)
at
com.google.android.finsky.instantapps.PhenotypeUpdateReceiver.onReceive
(PhenotypeUpdateReceiver.java:6) at
android.app.ActivityThread.handleReceiver (ActivityThread.java:4026)
I also managed to download the full logcat which is very large file. I am not sure how to include the file over here.
flutter downgrade to as much as possible
You have to uninstall and reinstall the app, and also have to clear the data and cache from the Settings page.
Try it.
I have solved the problem this way.

Unable to open ejabbered web dashboard localhost:5280

I am new to ejabberd and trying to play with it. I installed ejabbered following the instructions present at official doc page with username and password. I am able to start the ejabbered server and connect to it through Java using "Smack" API's.
However, when I try to open Web Dashboard at http://localhost:5280/admin/ and then login with admin user, It doesn't show up anything. When I checked logs, it shows following erros -
2020-03-13 21:03:17.618 [error] <0.1965.0>#ejabberd_http:apply_custom_headers:860 CRASH REPORT Process <0.1965.0> with 0 neighbours crashed with reason: bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860
2020-03-13 21:03:17.619 [error] <0.535.0>#ejabberd_http:apply_custom_headers:860 Supervisor ejabberd_http_sup had child undefined started with {ejabberd_http,start_link,undefined} at <0.1965.0> exit with reason bad argument in call to maps:from_list([html]) in ejabberd_http:apply_custom_headers/2 line 860 in context child_terminated
Pleasse help me out with this. Thanks!
Yes, that problem was introduced in ejabberd 20.02, and it's fixed in the following versions.
You have two options:
Download ejabberd 20.01, that doesn't have this problem
Or download ejabberd 20.03 or above.

Jenkins CORS Filter plugin not adding Access-Control-Allow-Origins header

I am trying to add CORS support to my Jenkins server so I could access the REST API from the browser. From looking around, the recommended approach is to use the CORS Filter plugin.
I have installed it, enable it, and add http://localhost to the Access-Control-Allow-Origins field, as well as GET to Access-Control-Allow-Methods field. However, these headers are not showing up in my requests.
This plugin has not been updated in a few years, so I'm not sure if it's compatible with the latest version of Jenkins. I'm running version 2.172.
In the Jenkins system log, I see these errors, not sure if it's related/ relevant
Caught exception evaluating: descriptor.getPropertyType(instance,field).itemTypeDescriptorOrDie in /configure. Reason: java.lang.reflect.InvocationTargetException
java.lang.AssertionError: class hudson.ivy.IvyBuildTrigger$IvyConfiguration is missing its descriptor in public hudson.ivy.IvyBuildTrigger$IvyConfiguration[] hudson.ivy.IvyBuildTrigger$DescriptorImpl.getConfigurations(). See https://jenkins.io/redirect/developer/class-is-missing-descriptor
Caught exception evaluating: h.filterDescriptors(it,attrs.descriptors) in /configure. Reason: java.lang.NullPointerException: Descriptor list is null for context 'class hudson.model.Hudson' in thread 'Handling GET /configure from 100.71.26.18 : qtp589873731-14 Jenkins/configure.jelly GlobalLibraries/config.jelly LibraryConfiguration/config.jelly SCMRetriever/DescriptorImpl/config.jelly MultiSCM/DescriptorImpl/config.jelly'
java.lang.NullPointerException: Descriptor list is null for context 'class hudson.model.Hudson' in thread 'Handling GET /configure from 100.71.26.18 : qtp589873731-14 Jenkins/configure.jelly GlobalLibraries/config.jelly LibraryConfiguration/config.jelly SCMRetriever/DescriptorImpl/config.jelly MultiSCM/DescriptorImpl/config.jelly'
These errors have at org.jenkinsci.plugins.corsfilter.AccessControlsFilter.doFilter(AccessControlsFilter.java:79) in their stack trace.
Does anyone know of a good way to enable CORS support for Jenkins REST API?
Jenkins version 2.303 and I struggle with the same issue. I would recommend to add the port number on the localhost URI you defined in the plugin settings, even though I'm pretty sure that won't change anything.
It actually seems the plugin is having no effect at all.
Probably the best solution is to set up your own proxy which would take care of CORS. Here is a good and well document example Build a Node.js Proxy Server in Under 10 minutes!

Android mobile first app stopped working after Bluemix moved to cflinuxfs2 stack

I have an android app based on the bluelist app for bluemix BMS service. it stopped working yesterday when the stack is moved to cflinuxfs2.
Today I checked my ios app on the same bluemix service, it is working. so I looked into the exception on Android, it is from MFPush, looks like a context is null. see the attached image for the line of code where the NPE is thrown.
The stacktrace is: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Intent android.content.Context.registerReceiver(android.content.BroadcastReceiver, android.content.IntentFilter)' on a null object reference
12-10 16:00:31.240 14482-14482/com.ibm.bluelist E/AndroidRuntime: at com.ibm.mobilefirstplatform.clientsdk.android.push.api.MFPPush.listen(MFPPush.java:232)
12-10 16:00:31.240 14482-14482/com.ibm.bluelist E/AndroidRuntime: at com.ibm.bluelist.GroupsActivity.onResume(GroupsActivity.java:250)
12-10 16:00:31.240 14482-14482/com.ibm.bluelist E/AndroidRuntime: at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1257)
12-10 16:00:31.240 14482-14482/com.ibm.bluelist E/AndroidRuntime: at android.app.Activity.performResume(Activity.java:6119)
Chances are the MFPPush SDK has not been initialized when you are attempting to call:
push.listen(notificationListener)
I suggest saving the push value:
push = MFPPush.getInstance()
Immediately after initialization or registration (whatever you feel is more appropriate) in the class.
That way you will have the appropriate initialized push instance when attempting to listen to a notification listener.

HSM: Error while opening connection to the HSM

Receiving the CKR_GENERAL_ERROR when the application tries to open a connection to the H/W HSM.
The error in detail is:
50004-Crypto API could not be open.
Caused by: xxx.xxx.xxx.cryptoapi.CryptoApiSysException: Error opening session!!
Caused by: iaik.pkcs.pkcs11.wrapper.PKCS11Exception: CKR_GENERAL_ERROR
at iaik.pkcs.pkcs11.wrapper.PKCS11Implementation.C_Initialize(Native Method) ~[pkcs11Wrapper-1.2.18.jar:1.2.18]
at iaik.pkcs.pkcs11.Module.initialize(Module.java:307) ~[pkcs11Wrapper-1.2.18.jar:1.2.18]
Could anyone please tell what might be the reason for this error? The application works fine with the software HSM.
H/W HSM details:
ProtectToolkit C Key management utility : 4.2.0 (even tried with 4.3.0)
Manufacturer : Eracom
Hardware version : 66.00
Firmware version : 2.02
CKR_GENERAL_ERROR is the general error message thrown by most of the PKCS#11 complaint API. Since you have the error while connecting to the HSM hardware Please make sure you do the following things:
You have successfully done the client (you app) to h/w hsm NTL configuration. Here's a link!
Verify that you have a valid slot number and partition password (PIN) while opening the session and login to the hsm.
Also, you can check HSM logs (usually residing on your hsm client installation directory in your application) to know what is the exact cause for the problem. Here's You can refer to my previous response on finding luna safenet client logs!