Status Update
Comments
su...@google.com <su...@google.com>
he...@google.com <he...@google.com> #2
The attached Build Scan log shows that the emulator process crashed unexpectedly. Could you rerun your task with --info
and -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
to get more information about the emualtor process logs?
dm...@ownid.com <dm...@ownid.com> #4
No idea why the scan does not contain log information, here you are:
he...@google.com <he...@google.com> #5
The link in --info
and -Pandroid.experimental.testOptions.managedDevices.emulator.showKernelLogging=true
, the emulator process output its kernel logging to stdout. Do you see any stacktrace or segfault in the log?
dm...@ownid.com <dm...@ownid.com> #6
That's strange, the repo and the build is public... But I attached the logs as file
dm...@ownid.com <dm...@ownid.com> #7
I looked into the logs and it turns out, the runner didn't have enough disk space. I guess the root cause is the Gradle update causing another Gradle major version (and its new transform-4) folder to cache was too much. Anyway, a better error message of the exit code of GMD would be helpful.
he...@google.com <he...@google.com>
ak...@google.com <ak...@google.com> #8
Thanks for uploading the log! Yes, the emulator kernel log says the issue was the insufficient disk space:
2024-04-02T18:31:45.7078429Z ERROR | Not enough space to create userdata partition. Available: 7177.027344 MB at /home/runner/.config/.android/avd/gradle-managed/dev34_aosp_atd_x86_64_Pixel_2.avd, need 7372.800000 MB.
Also, I agreed that GMD should diagnose errors and can provide better messages.
Let me rename this issue's title to improve the error message for disk space error.
ak...@google.com <ak...@google.com> #9
I've added a fix that will surface all error messages from the emulator in the exception when it closes unexpectedly.
ap...@google.com <ap...@google.com> #10
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 2
- Android Gradle Plugin 8.9.0-alpha02
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
dm...@ownid.com <dm...@ownid.com> #11
Thanks for reply. I see the proposed changes as a temporal workaround and not as proper library behavior on configuration changes. Even more - the proposed changes "fix" only some cases for configuration changes, not all of them.
In addition to that, proposed fix requires changes to be introduced to the customers application, in particular how activity handles configurations changes. This may not be acceptable way to fix the issue, especially in my case as SDK developer. I cannot ask customer to do such changes as it may break many things in there production app.
Bottom line - proposed solution does not solve the problem.
ah...@gmail.com <ah...@gmail.com> #12
ah...@gmail.com <ah...@gmail.com> #13
ah...@gmail.com <ah...@gmail.com> #14
Ok
ah...@gmail.com <ah...@gmail.com> #15
F
ah...@gmail.com <ah...@gmail.com> #16
ah...@gmail.com <ah...@gmail.com> #17 Restricted+
ap...@google.com <ap...@google.com> #18
Branch: androidx-main
commit a75fcac0d319a411a6d750119b9ac2e0f3585a7c
Author: Arpan Kaphle <akaphle@google.com>
Date: Mon Apr 10 20:56:24 2023
Configuration Change Consistency in Play Auth Flow
This change is a follow up to a prior change that handles more general
configuration changes - or really anything that restarts the app
(assuming it is run in the proper scope, namely a non cancellation
inducing scope in the programming). This ensures that the behaviour of the underlying
module is consistent and returns credentials as expected.
Bug: 276316128
Bug: 276939495
Test: E2E Test and Build
Change-Id: Iae8ce99fa56d237d874c5af2c61a914aaaeb85e4
M credentials/credentials-play-services-auth/src/main/java/androidx/credentials/playservices/HiddenActivity.kt
M credentials/credentials-play-services-auth/src/main/java/androidx/credentials/playservices/controllers/CredentialProviderBaseController.kt
M credentials/credentials-play-services-auth/src/main/java/androidx/credentials/playservices/controllers/CredentialProviderController.kt
ak...@google.com <ak...@google.com> #19
I hope you can excuse me for the delayed response. We have put up a new solution that should contain the expected behavior. If the calling application uses a cancellable scope as @he...@google.com mentioned above, a proper JobCancellationException will be thrown. If a non cancellable scope is used, even on configuration change, our library will ensure proper return of credentials. You can expect this change to arrive in the next release, around May.
In the meantime, to try this out you can use a snapshot SDK from
Step 1: Add the following maven url line to your build.gradle file.
allprojects {
repositories {
google()
jcenter()
maven { url 'https://androidx.dev/snapshots/builds/9928302/artifacts/repository' }
}
}
Step 2: Depend on the snapshot version artifact:
dependencies {
def work_version = '1.0.0-SNAPSHOT'
implementation "androidx.credentials:credentials-play-services-auth:$work_version"
...
}
Thank you for your patience, and please let us know if there are any other issues. We appreciate your help in making Credential Manager better prior to the final launch.
sg...@google.com <sg...@google.com>
dm...@ownid.com <dm...@ownid.com> #20
I confirm that issue is fixed. Thanks! However memory leak is still present. Will open another issue for that.
pr...@google.com <pr...@google.com> #21
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.credentials:credentials-play-services-auth:1.0.0-alpha07
gu...@gmail.com <gu...@gmail.com> #22
When I call getCredential() and the identity selection pops up, I select an account and the popover cancels, and then nothing
The code:
fun Login(mActivity:Activity,mCredentialManager: CredentialManager,mGoogleIdOption: GetGoogleIdOption){
viewModelScope.launch {
try {
val request: GetCredentialRequest = GetCredentialRequest.Builder()
.addCredentialOption(mGoogleIdOption)
.build()
val result = mCredentialManager.getCredential(mActivity,request)
if (result != null) {
handleSignIn(result)
} else {
}
} catch (e: GetCredentialException) {
Log.e(LoginActivity.TAG, e.toJson())
}
}
}
Error: {"errorMessage":"activity is cancelled by the user.","type":"android.credentials.GetCredentialException. TYPE_USER_CANCELED","detailMessage":"activity is cancelled by the user.","stackTrace":[]}
Configured version: implementation "com.google.android.libraries.identity.googleid:googleid:1.1.0"
implementation("androidx.credentials:credentials:1.3.0-alpha01")
implementation("androidx.credentials:credentials-play-services-auth:1.3.0-alpha01”)
gu...@gmail.com <gu...@gmail.com> #23
sg...@google.com <sg...@google.com> #24
This looks like a different issue, could you please open a new bug with more details about which version of jetpack you're using, which version of android you're running, a bug report and etc.
Description
Component used: Credentials
Version used: androidx.credentials:credentials:1.0.0-alpha05
androidx.credentials:credentials-play-services-auth:1.0.0-alpha05
Steps to reproduce:
On Passkeys prompt slider (or on biometry/pin prompt) rotate device (trigger configuration change)
Result: coroutineScope is canceled but credential operation is not, causing:
Expected correct behavior: Passkey operation is canceled correctly: