hawk icon indicating copy to clipboard operation
hawk copied to clipboard

can't get data when overriding apps

Open jynd opened this issue 4 years ago • 2 comments

Please try to fill all questions below before submitting an issue.

  • [ ] On which android versions do you have this issue? : every version
  • [ ] On which phones do you have this issue? : xiaomi 8 lite
  • [ ] Which hawk version are you using? : 2.0.1
  • [ ] Does this issue happen always or is it flaky? : no
  • [ ] Can you write failing test? : no
  • [ ] If it is Hawk.put and Hawk.get issue, can you write down which data you were trying to save and get it back?no
  • [ ] Is the data you are trying to save it huge or small? small

i am using Hawk in a project (A), it's publishing in google play. Now, i created another project (B), I let the appId of 2 projects overlap, I increased the version code and version name on B, B can override A but B can't get data in A.

in project A, i saved String by Hawk, when B override A, B can read this data, but when i save object in A, B can't read it. What have i do?

Thanks

jynd avatar Oct 23 '21 09:10 jynd

I have exactly the same problem when i try to update app to new version، that's how it was

On which android versions do you have this issue? : every version On which phones do you have this issue? : every phones Which hawk version are you using? : 2.0.1 Does this issue happen always or is it flaky? : in latest update of app happend Can you write failing test? : no If it is Hawk.put and Hawk.get issue, can you write down which data you were trying to save and get it back? simple pojo Is the data you are trying to save it huge or small? small


this is my pojo

public class TokenRes {

@SerializedName("token_type")
@Expose
public String tokenType;
@SerializedName("expires_in")
@Expose
public String expiresIn;
@SerializedName("access_token")
@Expose
public String accessToken;
@SerializedName("refresh_token")
@Expose
public String refreshToken;

}

When will this problem be solved? Or is there at least one solution right now? I encountered this strange problem just when the new version was delivered, and I have very little time

MS0054 avatar Dec 01 '21 01:12 MS0054

I have exactly the same problem when i try to update app to new version، that's how it was

On which android versions do you have this issue? : every version On which phones do you have this issue? : every phones Which hawk version are you using? : 2.0.1 Does this issue happen always or is it flaky? : in latest update of app happend Can you write failing test? : no If it is Hawk.put and Hawk.get issue, can you write down which data you were trying to save and get it back? simple pojo Is the data you are trying to save it huge or small? small

this is my pojo

public class TokenRes {

@SerializedName("token_type")
@Expose
public String tokenType;
@SerializedName("expires_in")
@Expose
public String expiresIn;
@SerializedName("access_token")
@Expose
public String accessToken;
@SerializedName("refresh_token")
@Expose
public String refreshToken;

}

When will this problem be solved? Or is there at least one solution right now? I encountered this strange problem just when the new version was delivered, and I have very little time

I fixed this problem. my solution was to clone the hawk project and copy all the code into my project then i edited the code in it. I found the problem where the hawk library decryption key, I skipped the encryption and decryption step.

jynd avatar Dec 03 '21 07:12 jynd