Am having problem with Proguard in release build

In debug build this code executes fine

Art art = new Art(randomStore, nPrice, pictureCount,null, productId, posterId, posterPhone,posterWhatsApp,state,region,advertTitle,category, type, size,artTitle, description);

            // Create Post  in Art Cloud DB
            Backendless.Data.of(Art.class).save(art, new AsyncCallback<Art>() {

                @RequiresApi(api = Build.VERSION_CODES.O)
                @Override
                public void handleResponse(Art object) {

                    //object saved

                }

                @Override
                public void handleFault(BackendlessFault fault) {

                   
                    Log.e(getClass().getName(), "Save Fault:" + fault.toString()+fault.getMessage());

                }
            });

But when i enable proguard in release build i get this error

Fault:BackendlessFault{ code: ‘8001’, message: ‘Duplicate property: description’
I’ve checked my Table fields, they are all in order.Description field doesnt have any duplicate.

I already have this rule in my proguard file

#backendless
-dontwarn com.backendless.** -dontwarn weborb.** -keep class weborb.** {;}
-keep class com.backendless.** {
;}

Is there another rule i should be aware of?

Hi.
What if you put breakpoint just right before save operation and look through the object you are saving or (if you can) a little deeper (till the serialization point) and check the fields?
For now i cannot say anything for sure. We need more time for investigation. Inner task: [BKNDLSS-26354].

I still can’t spot where the problem is

Let’s focus on the description field for now. What is the name of the class where the field is declared? Could you please post the source of that class here?

package ng.antigram.CloudDB;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Data
@Builder
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor

//@Entity
public class Art{

private int Store;
private int Price;
private int PictureCount;

private String objectId; //this is required for deleting record
private String ProductId; //Globally Unique Identifier

private String PosterId;

private String PosterPhone;
private String PosterWhatsApp;

private String State;
private String Region;

private String AdvertTitle;
private String Category;
private String Type;
private String Size;
private String ArtTitle;
private String Description;

}

Hi.
As a test could you try to rewrite you code without using the lombok?

I have done that, but the problem persists

Hello @Nkekere_Tommy_Minimann

We will investigate your problem and respond as soon as possible.

Regards,
Inna

Hello @Nkekere_Tommy_Minimann

I created a new project, executed the code you wrote above - Art was saved without errors.
Then I added to the build.gradle file:

android {
...
    buildTypes {
        release {
            debuggable true
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile ('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }

        debug {
            debuggable true
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile ('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
...
}

Then I did it again - Art was still saved without errors.

I need to ask you a few more questions so I can understand the problem better.

What exactly did you do?
Please describe your steps in as much detail as possible.

Perhaps you can provide a minimal project that reproduces this behavior? It would be very helpful in identifying the problem.

Am trying to create records in the two tables Master and Art
I had these errors
2021-11-07 03:20:02.596 22671-22671/ng.antigram E/ng.antigram.Activities.PostArtActivity$4: Save Fault in Master:BackendlessFault{ code: ‘8001’, message: ‘Duplicate property: rating’, detail: ‘Duplicate property: rating’ }
2021-11-07 03:20:02.602 22671-22671/ng.antigram E/ng.antigram.Activities.PostArtActivity$3: Save Fault in Art:BackendlessFault{ code: ‘8001’, message: ‘Duplicate property: description’, detail: ‘Duplicate property: description’,}

My understanding is that ‘Rating’ in the master table clashes with ‘rating’ in the users table even though my code didn’t touch the users table.(this doesnt happen in debug builds because proguard is disabled there)
I changed the ‘Rating’ field in my master table to ‘Priority’ and the first error disappeared only to be replaced with this one.
2021-11-07 03:47:02.014 29550-29550/ng.antigram E/ng.antigram.Activities.PostArtActivity$4: Save Fault in Master:BackendlessFault{ code: ‘8001’, message: ‘Duplicate property: PosterPhone’, detail: ‘Duplicate property: PosterPhone’}
2021-11-07 03:47:02.013 29550-29550/ng.antigram E/ng.antigram.Activities.PostArtActivity$3: Save Fault in Art:BackendlessFault{ code: ‘8001’, message: ‘Duplicate property: description’, detail: ‘Duplicate property: description’}

My observation is that in release builds all my table column names must be unique.
Is there a way i can avoid this? The “Description” column in all my tables mean the same thing,it wouldn’t be nice if i renamed them to reflect their specific tables eg ArtDescription,HomeDescription, etc
Renaming “PosterPhone” is even more difficult

Hello @Nkekere_Tommy_Minimann

Unfortunately, I was unable to reproduce the problem.

Which of the steps I described earlier (post) I did not like you, maybe I did something missed?

Could you please create a minimal project that reproduces the problem? This would be of great help in identifying the problem and resolving the issue.

Regards,
Vladimir

Should I create another app with just the basics so as to demonstrate this?

Hi, @Nkekere_Tommy_Minimann

You can just create a minimal project that reproduces the problem. And send it to us. There is no need to create a new app.

Regards,
Marina

Thank you, I will do that.