braze-inc / braze-android-sdk

https://www.braze.com
Other
19 stars 7 forks source link

[Bug]: StrictMode DiskReadViolation crash when clicking on a Content Card #25

Closed amatsehor-atd closed 1 month ago

amatsehor-atd commented 3 months ago

Braze Android SDK Version

30.0.0

Steps To Reproduce

With StrictMode enabled, call com.braze.models.cards.Card.logClick() by clicking on a Content Card

Expected Behavior

Crash shouldn't happen

Actual Incorrect Behavior

Crash happens

E  FATAL EXCEPTION: pool-16-thread-1
android.os.strictmode.DiskReadViolation
    at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1658)
    at [libcore.io](http://libcore.io/).BlockGuardOs.access(BlockGuardOs.java:74)
    at [libcore.io](http://libcore.io/).ForwardingOs.access(ForwardingOs.java:128)
    at android.app.ActivityThread$AndroidOs.access(ActivityThread.java:8615)
    at [java.io](http://java.io/).UnixFileSystem.checkAccess(UnixFileSystem.java:281)
    at [java.io](http://java.io/).File.exists(File.java:813)
    at android.app.SharedPreferencesImpl$EditorImpl.isSpeg(SharedPreferencesImpl.java:505)
    at android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:517)
    at bo.app.y.a(SourceFile:1528)
    at bo.app.y.a(SourceFile:1512)
    at bo.app.y.markCardAsClicked(SourceFile:1)
    at com.braze.models.cards.Card.logClick(SourceFile:6)

Verbose Logs

No response

Additional Information

Device Brand:Samsung Model:Galaxy S20 FE

Operating System Version:Android 13

bryanlogan commented 3 months ago

Thanks @amatsehor-atd . I've opened a bug on our internal system to get this fixed. We'll update you when it's released.

bryanlogan commented 2 months ago

@amatsehor-atd I've been trying to recreate this and it won't recreate on the variety of devices I have. Are you doing any special Content Card implementation? Does it recreate on a variety of devices or just a few?

Thanks.

radixdev commented 1 month ago

Hi @amatsehor-atd ,

A fix was released just now in 31.0.0 of the SDK. Please let us know if you have any more questions.