Skip to content

Library source does not match the bytecode for class ParseFacebookUtils #1140

@Code-B1

Description

@Code-B1

New Issue Checklist

Issue Description

When following the instructions to implement Facebook login using the Parse SDK (instructions provided by Back4App) I have reached a hurdle where on clicking on the log in button the project has a fatal exception and crashes.

The fatal exception details the below:

E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.authenticationtesttwoback4app, PID: 2117
    java.lang.NoSuchMethodError: No static method logInWithInBackground(Ljava/lang/String;Ljava/util/Map;)Lbolts/Task; in class Lcom/parse/ParseUser; or its super classes (declaration of 'com.parse.ParseUser' appears in /data/app/~~y7oSz52GMdD-dfc8qNSD-Q==/com.example.authenticationtesttwoback4app-pTWUIAaWaZVSSpSG0vbGiQ==/base.apk)
        at com.parse.facebook.ParseFacebookUtils$ParseUserDelegateImpl.logInWithInBackground(ParseFacebookUtils.java:587)
        at com.parse.facebook.ParseFacebookUtils$2.then(ParseFacebookUtils.java:306)
        at com.parse.facebook.ParseFacebookUtils$2.then(ParseFacebookUtils.java:303)
        at bolts.Task$15.run(Task.java:917)
        at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
        at bolts.Task.completeAfterTask(Task.java:908)
        at bolts.Task.continueWithTask(Task.java:715)
        at bolts.Task.continueWithTask(Task.java:726)
        at bolts.Task$13.then(Task.java:818)
        at bolts.Task$13.then(Task.java:806)
        at bolts.Task$15.run(Task.java:917)
        at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
        at bolts.Task.completeAfterTask(Task.java:908)
        at bolts.Task.access$100(Task.java:32)
        at bolts.Task$11.then(Task.java:708)
        at bolts.Task$11.then(Task.java:705)
        at bolts.Task.runContinuations(Task.java:956)
        at bolts.Task.trySetResult(Task.java:994)
        at bolts.TaskCompletionSource.trySetResult(TaskCompletionSource.java:39)
        at com.parse.facebook.FacebookController$1.onSuccess(FacebookController.java:115)
        at com.parse.facebook.FacebookController$1.onSuccess(FacebookController.java:110)
        at com.facebook.login.LoginManager.finishLogin(LoginManager.java:1184)
        at com.facebook.login.LoginManager.onActivityResult(LoginManager.java:304)
        at com.facebook.login.LoginManager$1.onActivityResult(LoginManager.java:241)
        at com.facebook.internal.CallbackManagerImpl.onActivityResult(CallbackManagerImpl.kt:44)
        at com.parse.facebook.FacebookController.onActivityResult(FacebookController.java:88)
        at com.parse.facebook.ParseFacebookUtils.onActivityResult(ParseFacebookUtils.java:159)
        at com.example.authenticationtesttwoback4app.MainActivity.onActivityResult(MainActivity.kt:130)
        at android.app.Activity.dispatchActivityResult(Activity.java:8310)
        at android.app.ActivityThread.deliverResults(ActivityThread.java:5008)
        at android.app.ActivityThread.handleSendResult(ActivityThread.java:5056)
        at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:223)
        at android.app.ActivityThread.main(ActivityThread.java:7656)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
I/Process: Sending signal. PID: 2117 SIG: 9

When looking within the ParseFacebookUtils.java it appears (at least the first clickable link in the error) that there is an issue relating to bolts:

Required type: bolts.Task
Provided: com.parse.boltsinternal.Task

I know this file is read-only as such unsure how I can resolve this issue. Unfortunately I am very new to Kotlin and Android Studio and searching online has not brought much luck with " similar " issues being resolved by cleaning and the project, rebuilding, changing compileSdk versions etc but none of these have worked for me and I am at a point where I am wondering if I will be able to use this SDK for Facebook login at all due to this error so could do with some assistance.

Steps to reproduce

Using the latest SDK and following the steps for implementing Facebook Login provided on the back4app tutorials.

Actual Outcome

I get this error when trying to log in

Expected Outcome

The code to execute without error and create a user in my dashboard.

Environment

Parse Android SDK

  • SDK version: 2.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:questionSupport or code-level question

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions