facebook-android-sdk icon indicating copy to clipboard operation
facebook-android-sdk copied to clipboard

facebook-sdk:12.3.0 doesn't work fine on Oculus, hangs indefinatelly when logging in.

Open RkShaRkz opened this issue 3 years ago • 3 comments

Checklist before submitting a bug report

Java version

I dont know what java version the oculus runs, but it's API 29. Oculus OS version is 40.0.0.106.259.370694197 Runtime version is 40.0.0.120.333.370694039

Android version

API 29

Android SDK version

12.3.0

Installation platform & version

Gradle

Package

Login

Goals

I want to be able to login to facebook account, obtain the email and the access token of the account, while using a Meta Quest 2 device. I want to do this from an app/game I'm developing.

I didn't manage to get 13.2.0 running without build errors, so I'm sticking with 12.3.0 for now, because the same issue applies to even facebook-login:11.2.0 - all of which work fine when I run the project on a mobile device (phone)

Expected results

Get redirected to browser to login, click login, and browser closing/redirecting me to my previous activity (game)

Actual results

I get redirected to Meta Quest Browser on the "Login with Facebook" page, I click login (or continue as ...), the Meta Quest Browser loads indefinatelly and I never get a login callback. When I do close the browser, i get a "Login Cancel" callback.

Steps to reproduce

  1. Initiate facebook login using either facebook-login:11.2.0 or facebook-sdk:12.3.0 on Meta Quest 2 device
  2. Either click as "Continue as ..." or fill in your details and click login
  3. the bug problem happens.

Code samples & details

// INSERT YOUR CODE HERE

I could upload a whole sample UE4 project somewhere or send it to you, but there's no way i could fit all of that in this little box.

RkShaRkz avatar Jun 03 '22 16:06 RkShaRkz

Sorry about having to click the checkmark, but I did not yet manage to update to latest release; i'll try to play more with that from tomorrow/monday. But the issue is reproducible with every release that can perform facebook login from facebook-login:11.2.0 to facebook-sdk:12.3.0.

I'm yet to get facebook-sdk:13.2.0 to build and run (when i did get around the java8 desugarring issue, the stacktrace was)

E AndroidRuntime: java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar)
E AndroidRuntime:        at com.facebook.FacebookSdk.<clinit>(FacebookSdk.kt:151)
E AndroidRuntime:        at com.facebook.internal.FacebookInitProvider.onCreate(FacebookInitProvider.kt:21)
E AndroidRuntime:        at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
E AndroidRuntime:        at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
E AndroidRuntime:        at android.app.ActivityThread.installProvider(ActivityThread.java:7018)
E AndroidRuntime:        at android.app.ActivityThread.installContentProviders(ActivityThread.java:6563)
E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6491)
E AndroidRuntime:        at android.app.ActivityThread.access$1300(ActivityThread.java:226)
E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1868)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:107)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7391)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

I'll try versions in between 12.3.0 and 13.2.0 and see whether they work at all (or fine)

RkShaRkz avatar Jun 03 '22 16:06 RkShaRkz

Tried out 13.2.0 as well after sorting out the java8 desugaring related crash

E AndroidRuntime: FATAL EXCEPTION: main
E AndroidRuntime: Process: com.lotusflare.vrstorefront, PID: 6561
E AndroidRuntime: java.lang.NoSuchMethodError: No static method metafactory(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodType;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)Ljava/lang/invoke/CallSite; in class Ljava/lang/invoke/LambdaMetafactory; or its super classes (declaration of 'java.lang.invoke.LambdaMetafactory' appears in /apex/com.android.runtime/javalib/core-oj.jar)
E AndroidRuntime:        at com.facebook.FacebookSdk.<clinit>(FacebookSdk.kt:151)
E AndroidRuntime:        at com.facebook.internal.FacebookInitProvider.onCreate(FacebookInitProvider.kt:21)
E AndroidRuntime:        at android.content.ContentProvider.attachInfo(ContentProvider.java:2092)
E AndroidRuntime:        at android.content.ContentProvider.attachInfo(ContentProvider.java:2066)
E AndroidRuntime:        at android.app.ActivityThread.installProvider(ActivityThread.java:7018)
E AndroidRuntime:        at android.app.ActivityThread.installContentProviders(ActivityThread.java:6563)
E AndroidRuntime:        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6491)
E AndroidRuntime:        at android.app.ActivityThread.access$1300(ActivityThread.java:226)
E AndroidRuntime:        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1868)
E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:107)
E AndroidRuntime:        at android.os.Looper.loop(Looper.java:214)
E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:7391)
E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
E AndroidRuntime:        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

and after resolving that by adding

android {
    compileOptions {
        targetCompatibility JavaVersion.VERSION_1_8
        sourceCompatibility JavaVersion.VERSION_1_8
    }
}

it behaves similar to 12.3.0 - redirects to browser, browser hangs on login, and that's about it.

LFShark avatar Jun 08 '22 14:06 LFShark

Thank you for your patience. Please use the Oculus SDK instead.

yurika-e avatar Jun 21 '22 00:06 yurika-e