无法针对 MCA 进行身份验证:Throwable:无法从响应中保存证书
Failed to authenticate against MCA: Throwable: Failed to save certificate from response
我正在做 bluemix 教程 Sample Android App Link(android 应用程序)并遇到此异常。有什么问题?我一步一步地做了所有事情,为我的 android 应用程序生成了签名,将 facebook 应用程序与我的 bluemix 应用程序链接起来,编译了 gradle 中需要的所有库。应用程序有效(添加和编辑项目)但我无法删除项目并通过 facebook 授权 - 这是我的目标。
错误堆栈如下:
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.access0(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.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.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
此处可能存在一些问题:
您的测试设备显示的日期或时间可能不正确。确保日期和时间准确无误。
您可能使用了不受支持的 Android OS。此示例支持 API 级别 14 及以上,(Android 4.0 及以上)。
根据日志中的其他警告,您的测试设备可能不包含所需的最新库。确保您的设备是最新的 and/or 模拟器已正确配置。
最后,错误堆栈越往下,我提供的解决方案就越准确。我以前从未见过此错误,因此如果上述解决方案无法解决您的问题,我将需要整个错误堆栈以及您的 appId 和路由。
我正在做 bluemix 教程 Sample Android App Link(android 应用程序)并遇到此异常。有什么问题?我一步一步地做了所有事情,为我的 android 应用程序生成了签名,将 facebook 应用程序与我的 bluemix 应用程序链接起来,编译了 gradle 中需要的所有库。应用程序有效(添加和编辑项目)但我无法删除项目并通过 facebook 授权 - 这是我的目标。 错误堆栈如下:
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.access0(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.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.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
此处可能存在一些问题:
您的测试设备显示的日期或时间可能不正确。确保日期和时间准确无误。
您可能使用了不受支持的 Android OS。此示例支持 API 级别 14 及以上,(Android 4.0 及以上)。
根据日志中的其他警告,您的测试设备可能不包含所需的最新库。确保您的设备是最新的 and/or 模拟器已正确配置。
最后,错误堆栈越往下,我提供的解决方案就越准确。我以前从未见过此错误,因此如果上述解决方案无法解决您的问题,我将需要整个错误堆栈以及您的 appId 和路由。