2

I'm doing bluemix tutorial Sample Android App Link (android app) and got this exception. What can be wrong? I did everything step by step, generated signiture for my android app, linked facebook app with my bluemix app, compiled all libraries needed in gradle. Application works (adds and edits items) but I cannot delete items and authorize through facebook - and it is my aim. An error stack is below:

 03-14 21:29:49.579 14165-14165/? D/dalvikvm: Late-enabling CheckJNI
03-14 21:29:49.659 14165-14165/com.ibm.hellotodoadvanced D/HyLog: I : /data/font/config/sfconfig.dat, No such file or directory (2)
03-14 21:29:49.659 14165-14165/com.ibm.hellotodoadvanced D/HyLog: I : /data/font/config/dfactpre.dat, No such file or directory (2)
03-14 21:29:49.659 14165-14165/com.ibm.hellotodoadvanced D/HyLog: I : /data/font/config/sfconfig.dat, No such file or directory (2)
03-14 21:29:50.079 14165-14165/com.ibm.hellotodoadvanced I/dalvikvm: Could not find method android.app.Notification$Builder.setLocalOnly, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
03-14 21:29:50.079 14165-14165/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to resolve virtual method 265: Landroid/app/Notification$Builder;.setLocalOnly (Z)Landroid/app/Notification$Builder;
03-14 21:29:50.079 14165-14165/com.ibm.hellotodoadvanced D/dalvikvm: VFY: replacing opcode 0x6e at 0x00c2
03-14 21:29:50.079 14165-14165/com.ibm.hellotodoadvanced I/dalvikvm: Could not find method android.content.pm.PackageManager.getPackageInstaller, referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zzh
03-14 21:29:50.079 14165-14165/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to resolve virtual method 572: Landroid/content/pm/PackageManager;.getPackageInstaller ()Landroid/content/pm/PackageInstaller;
03-14 21:29:50.079 14165-14165/com.ibm.hellotodoadvanced D/dalvikvm: VFY: replacing opcode 0x6e at 0x000b
03-14 21:29:50.329 14165-14165/com.ibm.hellotodoadvanced I/Adreno-EGL: <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build:  ()
                                                                       OpenGL ES Shader Compiler Version: E031.24.00.08
                                                                       Build Date: 03/21/14 Fri
                                                                       Local Branch: AU200-20140313-all-patches-KK8x26-664328
                                                                       Remote Branch: 
                                                                       Local Patches: 
                                                                       Reconstruct Branch: 
03-14 21:29:50.369 14165-14165/com.ibm.hellotodoadvanced D/OpenGLRenderer: Enabling debug mode 0
03-14 21:29:50.459 14165-14165/com.ibm.hellotodoadvanced I/ActivityManager: Timeline: Activity_idle id: android.os.BinderProxy@42106d40 time:95089030
03-14 21:29:50.589 14165-14237/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
03-14 21:29:50.589 14165-14237/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
03-14 21:29:50.589 14165-14237/com.ibm.hellotodoadvanced I/dalvikvm: Could not find method java.nio.file.Files.newOutputStream, referenced from method okio.Okio.sink
03-14 21:29:50.589 14165-14237/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to resolve static method 60675: Ljava/nio/file/Files;.newOutputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/OutputStream;
03-14 21:29:50.589 14165-14237/com.ibm.hellotodoadvanced D/dalvikvm: VFY: replacing opcode 0x71 at 0x000a
03-14 21:29:50.589 14165-14237/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to find class referenced in signature (Ljava/nio/file/Path;)
03-14 21:29:50.599 14165-14237/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to find class referenced in signature ([Ljava/nio/file/OpenOption;)
03-14 21:29:50.599 14165-14237/com.ibm.hellotodoadvanced I/dalvikvm: Could not find method java.nio.file.Files.newInputStream, referenced from method okio.Okio.source
03-14 21:29:50.599 14165-14237/com.ibm.hellotodoadvanced W/dalvikvm: VFY: unable to resolve static method 60674: Ljava/nio/file/Files;.newInputStream (Ljava/nio/file/Path;[Ljava/nio/file/OpenOption;)Ljava/io/InputStream;
03-14 21:29:50.599 14165-14237/com.ibm.hellotodoadvanced D/dalvikvm: VFY: replacing opcode 0x71 at 0x000a
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err: java.lang.RuntimeException: Failed to save certificate from response
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationProcessManager.saveCertificateFromResponse(AuthorizationProcessManager.java:222)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationProcessManager.access$100(AuthorizationProcessManager.java:51)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationProcessManager$1.handleAuthorizationSuccessResponse(AuthorizationProcessManager.java:133)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationProcessManager$InnerAuthorizationResponseListener.onSuccess(AuthorizationProcessManager.java:469)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationRequestAgent.processResponse(AuthorizationRequestAgent.java:388)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationRequestAgent.processResponseWrapper(AuthorizationRequestAgent.java:542)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationRequestAgent.onSuccess(AuthorizationRequestAgent.java:513)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.core.api.internal.BaseRequest$1.onResponse(BaseRequest.java:419)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:170)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at java.lang.Thread.run(Thread.java:841)
03-14 21:29:52.989 14165-14237/com.ibm.hellotodoadvanced W/System.err: Caused by: java.security.cert.CertificateNotYetValidException
03-14 21:29:52.999 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.android.org.conscrypt.OpenSSLX509Certificate.checkValidity(OpenSSLX509Certificate.java:216)
03-14 21:29:52.999 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.certificate.CertificatesUtility.checkValidityWithPublicKey(CertificatesUtility.java:59)
03-14 21:29:52.999 14165-14237/com.ibm.hellotodoadvanced W/System.err:     at com.ibm.mobilefirstplatform.clientsdk.android.security.internal.AuthorizationProcessManager.saveCertificateFromResponse(AuthorizationProcessManager.java:214)
03-14 21:29:52.999 14165-14237/com.ibm.hellotodoadvanced W/System.err:  ... 12 more
03-14 21:29:52.999 14165-14237/com.ibm.hellotodoadvanced E/MainActivity: Failed to authenticate against MCA: Throwable: Failed to save certificate from response
03-14 21:29:52.999 14165-14237/com.ibm.hellotodoadvanced E/MainActivity: Failed to authenticate against MCA, unknown reason
Kirart
  • 23
  • 5
  • I am unable to reproduce your issue. Can you post your entire error stack? This may be a temporary connection issue as well, try uninstalling the app from your device and running again. – Dave Cariello Mar 14 '16 at 15:58

1 Answers1

1

A few things could be going wrong here:

  • Your test device may be displaying an incorrect date or time. Ensure the date and time are accurate.

  • You may be using an unsupported Android OS. This sample supports API level 14 and up, (Android 4.0 and up).

  • Based on the other warnings in the logs, your test device may not contain the most up to date libraries needed. Ensure your device is up to date and/or emulator is properly configured.

  • Lastly, the further you continue down the error stack the more accurate a solution I can provide. I have never seen this error before so I will need the entire error stack plus your appId and route if the above solutions do not resolve your problem.

Dave Cariello
  • 505
  • 6
  • 12
  • These solutios did not help. The stack posted is complete. ID: 5633ff57-9220-4819-82eb-0e59b6a83972 Route: http://bluelistaccess.mybluemix.net Facebook appId: 1693485954226939 – Kirart Mar 15 '16 at 18:40
  • @Kirart I could not find any of your requests in our us-south production logs. When did you last attempt to authenticate? – Dave Cariello Mar 15 '16 at 19:40
  • I launched my application several times on sunday and right now. Application works properly, items are added and updated from web-page and android application. But authorization via facebook in mobile app does not even appear and the exception is thrown, so I cannot delete items. – Kirart Mar 15 '16 at 20:42
  • @Kirart Can you remove the Facebook ID from your MCA instance on Bluemix and try again? Without the facebook config the app will use the default Client SDK to authorize the delete. Hopefully, the result can help isolate the issue. – Dave Cariello Mar 15 '16 at 21:10
  • I did everuthing, the same result. Can it be somehow connected with signing android app? – Kirart Mar 15 '16 at 21:25
  • @Kirart Using your credentials, I was able to authenticate successfully and delete an Item. Something in your local environment is not working properly. I highly suggest following the steps in my answer again. Maybe it is worth making sure you have the appropriate Java version too? If you are still using java 6, try upgrading to java 7. Those unable to find class logs make me wonder if your Java version is incompatible. I am currently using Java 8 without any problems and I do not see those extra logs. – Dave Cariello Mar 15 '16 at 21:42
  • Also, if you're still using eclipse, maybe this [answer](http://stackoverflow.com/questions/6247862/getting-caused-by-java-lang-verifyerror/10677757#10677757) can help you – Dave Cariello Mar 15 '16 at 21:50
  • Thanks for your answers! Something was wrong with my device. I used another - everything works! – Kirart Mar 16 '16 at 08:00
  • Time was set manually on my device, that was the reason. When I set Automatic date&time and Automatic time zone application works – Kirart Mar 16 '16 at 09:07