parse-community / Parse-SDK-Android

The Android SDK for Parse Platform
https://parseplatform.org/
Other
1.88k stars 734 forks source link

Weird issue Parse Facebook SDK with AndroidX #1041

Open Sulfkain opened 4 years ago

Sulfkain commented 4 years ago

Hello, I was using implementation "com.github.parse-community.Parse-SDK-Android:parse:1.1.0" implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.1.0" implementation "com.github.parse-community.Parse-SDK-Android:ktx:1.1.0" implementation "com.github.parse-community:ParseLiveQuery-Android:1.1.0" implementation "com.github.parse-community:ParseFacebookUtils-Android:1.14.0" implementation 'com.facebook.android:facebook-login:5.1.1'

And my bottomNavBar was working fine.

When I migrate to the new versions: implementation "com.github.parse-community.Parse-SDK-Android:parse:1.23.1" implementation "com.github.parse-community.Parse-SDK-Android:fcm:1.23.1" implementation "com.github.parse-community.Parse-SDK-Android:ktx:1.23.1" implementation "com.github.parse-community:ParseLiveQuery-Android:1.1.0" implementation ("com.github.parse-community.Parse-SDK-Android:facebook:1.24.2" implementation 'com.facebook.android:facebook-login:6.3.0'

Then some buttons are not working fine, just click listener jump when click around the icon :/. I don't use new versions of parse due https://github.com/parse-community/Parse-SDK-Android/issues/1036, I'm still receiving crashes of bolts with that's versiones. So please, don't tell me update to the new SDK versiones, I already have tested.

I was isolating the problem and was with the version 1.23.0, the migration to Facebook to AndroidX and deprecation of ParseFacebookUtils-Android Repo.

It' doesn't matter if I update the appcompat to 1.2.1-beta01 version, downgrade everything except facebook and any other test you could think (I was checking 8h, test old commits until I find it's Parse Facebook SDK for sure). The old repo works, the new facebookUtils not.

I was trying to avoid transitive dependencies on com.github.parse-community.Parse-SDK-Android:facebook but it doesn't work neither.

My BottomBar it's simple and didn't change during commits that works, and then not.

<?xml version="1.0" encoding="utf-8"?>
<androidx.coordinatorlayout.widget.CoordinatorLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/animationView"
    android:layout_alignParentBottom="true"
    android:layout_centerHorizontal="true"
    android:fitsSystemWindows="true" >

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/main_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        app:layout_behavior="com.frysbe.Frysbe.utils.presentation.MoveUpBehavior">

        <com.frysbe.Frysbe.components.NonSwipeableViewPager
            android:id="@+id/main_pager"
            android:layout_width="match_parent"
            android:layout_height="0dp"
            android:background="@color/default_color"
            app:layout_constraintBottom_toTopOf="@id/nav_bar"
            app:layout_constraintTop_toTopOf="@id/main_view" />

        <com.google.android.material.bottomnavigation.BottomNavigationView
            android:id="@+id/nav_bar"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:background="@android:color/transparent"
            android:elevation="@dimen/toplayer_elevation"
            app:itemBackground="?attr/colorPrimary"
            app:layout_constraintBottom_toTopOf="@id/appodealBannerView"
            app:menu="@menu/main_nav_items"
            app:itemIconSize="@dimen/nav_icon"
            app:itemHorizontalTranslationEnabled="false"
            app:labelVisibilityMode="unlabeled" />

        <com.appodeal.ads.BannerView
            android:id="@+id/appodealBannerView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:layout_constraintBottom_toBottomOf="@id/main_view"
            android:visibility="gone" />

    </androidx.constraintlayout.widget.ConstraintLayout>
</androidx.coordinatorlayout.widget.CoordinatorLayout>

I attach 2 videos showing the issue: BottomBarProblem.zip

The video is on a Emulator but it happens too in real phone with 8.1 Android.

The dependencies of my project are this: ParseFacebookDependencies.txt

And after update: ParseFacebookUtilsDependencies.txt

Any other question, test you need, just tell me please.

Jawnnypoo commented 4 years ago

Can you post the crash log?

Sulfkain commented 4 years ago

Hello @Jawnnypoo, with libs updates, v1.24.2 for Parse and 1.2.0 for liveParse. The crash is the same here https://github.com/parse-community/Parse-SDK-Android/issues/1036

The problem here don't has log, warnings, nothing, just this weird behaviour :/.

Do you think there is something which could break this when you updated the facebook lib to androidX, the problem seems to be some weird collision between androidX.

pc-cesar commented 4 years ago

Hello,i have the same probleme (#1036)

recently i received this problem #1028 ,but in new version the error is solved for facebook,but now,the live query crash using: implementation 'com.github.parse-community.Parse-SDK-Android:parse:1.24.2' implementation 'com.github.parse-community:ParseLiveQuery-Android:1.2.0' implementation 'com.github.parse-community.Parse-SDK-Android:facebook:1.24.2'

Jawnnypoo commented 4 years ago

Hi there, please update to the latest dependency for LiveQuery (1.2.1) and this will be resolved.

Sulfkain commented 4 years ago

Sorry @Jawnnypoo but have you read my messages? Maybe you missunderstood the bug.

I have tested with the newest versions 1.24.1 and 1.2.1 and the bug still there.

The problem it's not with bolts (which was a secondary problem due versions), the problem it's with Parse Facebook and his migration to androidX.

Jawnnypoo commented 4 years ago

You updated to LiveQuery 1.2.1 and still see it? @pc-cesar can you confirm if you still see the issue too?

Sulfkain commented 4 years ago

Yes, I updated to latests versions.

I think @pc-cesar speaks about the bolt bugs, but I speak to a visual bug, not related with bolts, nor liveQuery.

You can see the videos I attached on the first message. And the bug is pointing to the new ParseFacebook lib with AndroidX. Because with the old one, the bug didn't happen.

Sulfkain commented 4 years ago

@Jawnnypoo could you open this issue again?, because it's not fixed :/.

Thank you. If you need any more info, just ask for. :)

Jawnnypoo commented 4 years ago

Sure. I have really not clues where to start with this. If you could get a sample project that isolates this problem, maybe there is more we can do, but this seems like a very specific problem that may or may not be due to Parse.

Sulfkain commented 4 years ago

I will try to replicate with a dummy project as soon as I can. thanks.