Closed isabsent closed 7 years ago
@isabsent The same problem on Asus ZenPad 8 (Android 6.0.1) :(
@IvanShafran Can you paste the log of unsuccessful authorization here?
@isabsent
I/LiveAuthClient: No refresh token available, sorry!
I/LiveAuthClient: All tokens expired, you need to call login() to initiate interactive logon
E/MSAAuthenticator$5[onAuthComplete] - 314: Failed silent login, interactive login required
com.onedrive.sdk.authentication.ClientAuthenticatorException: Failed silent login, interactive login required
at com.onedrive.sdk.authentication.MSAAuthenticator$5.onAuthComplete(MSAAuthenticator.java:312)
at com.microsoft.services.msa.LiveAuthClient$3.doInBackground(LiveAuthClient.java:484)
at com.microsoft.services.msa.LiveAuthClient$3.doInBackground(LiveAuthClient.java:473)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
I/LiveAuthClient: No refresh token available, sorry!
I/LiveAuthClient: All tokens expired, you need to call login() to initiate interactive logon
I/WebViewFactory: Loading com.google.android.webview version 53.0.2785.124 (code 278512400)
D/WebViewFactory: primaryArchIs64bit = false
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.ServiceWorkerControllerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/art: Rejecting re-init on previously-failed class java.lang.Class<com.android.webview.chromium.TokenBindingManagerAdapter>
I/cr_LibraryLoader: Time to load native libraries: 2 ms (timestamps 5889-5891)
I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
V/WebViewChromiumFactoryProvider: Binding Chromium to main looper Looper (main, tid 1) {8714ac3}
I/cr_LibraryLoader: Expected native library version number "53.0.2785.124", actual native library version number "53.0.2785.124"
I/chromium: [INFO:library_loader_hooks.cc(151)] Chromium logging enabled: level = 0, default verbosity = 0
I/cr_BrowserStartup: Initializing chromium process, singleProcess=true
W/cr_media: Requires BLUETOOTH permission
W/cr_AwContents: onDetachedFromWindow called when already detached. Ignoring
I/cr_Ime: ImeThread is not enabled.
I/Choreographer: Skipped 48 frames! The application may be doing too much work on its main thread.
E/libEGL: validate_display:255 error 3008 (EGL_BAD_DISPLAY)
W/VideoCapabilities: Unrecognized profile 2130706433 for video/avc
W/AudioCapabilities: Unsupported mime audio/dts
W/VideoCapabilities: Unsupported mime video/mp4v-esdp
W/cr_BindingManager: Cannot call determinedVisibility() - never saw a connection for the pid: 3610
W/WebKit: A Parser-blocking, cross-origin script, https://auth.gfx.ms/16.000.26893.00/DefaultLoginPaginatedStrings.EN-GB.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
W/WebKit: A Parser-blocking, cross-origin script, https://auth.gfx.ms/16.000.26893.00/DefaultLoginPaginatedStrings.EN-GB.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
I/chromium: [INFO:CONSOLE(8)] "A Parser-blocking, cross-origin script, https://auth.gfx.ms/16.000.26893.00/DefaultLoginPaginatedStrings.EN-GB.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.", source: https://login.live.com/oauth20_authorize.srf?client_id=f03c227e-933e-46f1-a014-38c675d834c5&scope=onedrive.readwrite&display=android_tablet&response_type=code&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf (8)
W/WebKit: A Parser-blocking, cross-origin script, https://auth.gfx.ms/16.000.26893.00/DefaultLogin_PCore.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.
I/chromium: [INFO:CONSOLE(8)] "A Parser-blocking, cross-origin script, https://auth.gfx.ms/16.000.26893.00/DefaultLoginPaginatedStrings.EN-GB.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.", source: https://login.live.com/oauth20_authorize.srf?client_id=f03c227e-933e-46f1-a014-38c675d834c5&scope=onedrive.readwrite&display=android_tablet&response_type=code&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf (8)
I/chromium: [INFO:CONSOLE(8)] "A Parser-blocking, cross-origin script, https://auth.gfx.ms/16.000.26893.00/DefaultLogin_PCore.js, is invoked via document.write. This may be blocked by the browser if the device has poor network connectivity.", source: https://login.live.com/oauth20_authorize.srf?client_id=f03c227e-933e-46f1-a014-38c675d834c5&scope=onedrive.readwrite&display=android_tablet&response_type=code&redirect_uri=https%3A%2F%2Flogin.live.com%2Foauth20_desktop.srf (8)
I/art: Background partial concurrent mark sweep GC freed 87713(5MB) AllocSpace objects, 9(320KB) LOS objects, 59% free, 8MB/20MB, paused 1.612ms total 170.120ms
And my gradle:
compile ('com.onedrive.sdk:onedrive-sdk-android:1.2+') {
transitive = false
}
compile ('com.google.code.gson:gson:2.3.1')
compile ('com.microsoft.services.msa:msa-auth:0.8.+')
compile ('com.microsoft.aad:adal:1.1.+')
@isabsent @IvanShafran hi have you tried with other 6.0.1 devices? I used Nexus 5 with Android 6.0.1 and could not reproduce it.
I have Lenovo Vibe Shot with Android 6.0.1 only and emulator. The problem is absent on the emulator and definetely the problem exists on Lenovo. I will try to find other device with 6.0.1. Do above logs have something useful for understanding of a problem?
@isabsent I searched on the internet for a while and it seems related to the chromium package is not included as other users reported the 'Rejecting re-init on previously-failed class' log in other packages: https://github.com/realm/realm-java/issues/1990 http://stackoverflow.com/questions/32243791/unity-android-with-appcompat-rejecting-re-init-on-previously-failed-class-java-l
and specifically for the chromium webview, it seems it is related to specific hardware as you can see a similar question here: https://bugs.chromium.org/p/chromium/issues/detail?id=576252
Is it possible to do not use webview in your Authenticator?
I got a similar issue on Samsung Galaxy S5. On tapping on Login, the screen would go blank. Looking at @daboxu 's answer I went ahead and updated the WebView on the device and voila! it worked.
@isabsent the webview is from the MSA Authenticator 'com.microsoft.services.msa:msa-auth:0.8.+' which we don't have plan right now to upgrade it. @anishhegdeSE glad to hear it works, could you mind sharing more info about your solution?
As I understand from @anishhegdeSE answer it is necessary to update preinstalled WebView from Google Play. It works for Lenovo Vibe Shot too!
Is it possible to write a ticket to MSA Authenticator developers to check WebView version and ask user to update it if needed?
I see, I will close this issue for now as there is a solution for it. Feel free to reopen it if necessary.
Is it possible to write a ticket to MSA Authenticator developers to check WebView version and ask user to update it if needed?
@isabsent I would argue with including this check into the Authenticator package, as stated in the Play Store
Android WebView is a system component powered by Chrome that allows Android apps to display web content. This component is pre-installed on your device and should be kept up to date to ensure you have the latest security updates and other bug fixes.
if this logic could be done in your app that would make more sense for me, and I am not sure how many devices have been affected and we want the SDK for general use purpose.
I have faced with a very strange situation on Lenovo Vibe Shot Z90a40 (Android 6.0.1) device. When I try to login to OneDrive (not a Bussiness Cloud) with
it does not show me login screen - just a white screen without any content. In the logcat I see:
On other device (and emulator with Android 6.0 Google APIs ) MSA authentication works fine (code is the same as for Lenovo) and logcat is:
In the build.gradle I have:
Why login screen does not appear?
P.S. Message "This may be blocked by the browser if the device has poor network connectivity" in the first logcat is very strange because Lenovo device has 20 Mbps download and upload speed over WiFi at this moment (measured by Speedtest app).