1

I have finished building my app and have successfully published it on Google Playstore. But when users download it from Playstore, the data isn't loading on their phones. It's just blank. It is able to read the size of the lists, but the data isn't loading.

What could be the problem? Below is the display of the image

enter image description here



EDIT

2020-02-10 10:18:56.352 281-281/? E/DumpTunnel: finding regDump() failed 2020-02-10 10:18:58.664 30084-30084/? E/AndroidRuntime: FATAL
EXCEPTION: main Process: com.onlinestore.finalapp, PID: 30084 c.d.b.l.c: No properties to serialize found on class c.e.a.c.f at c.d.b.l.r.u0.p.a$a.<init>(:11) at c.d.b.l.r.u0.p.a.a(Unknown Source:12) at c.d.b.l.r.u0.p.a.c(Unknown Source:233) at c.d.b.l.e.a(:9) at c.e.a.a.n.a(Unknown Source:59) at c.d.a.a.k.s.run(:6) at android.os.Handler.handleCallback(Handler.java:790) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6548) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:451) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:888)

I am now receiving this error after configuring my proguard

puma_black
  • 19
  • 4
  • Can you add your code and firebase database structure? – Md. Asaduzzaman Feb 10 '20 at 09:03
  • Check this link: https://stackoverflow.com/questions/45721120/firebase-database-doesnt-work-after-publishing-app-to-play-store – Mehedi Hasan Feb 10 '20 at 09:13
  • 1
    Please don't add [duplicate](https://stackoverflow.com/questions/60135515/why-is-data-not-loading-from-firebase-after-publishing-app-on-google-playstore) questions. – Alex Mamo Feb 10 '20 at 09:40
  • I have similar problem, @puma_black have managed to resolve this? – Ally Dec 03 '20 at 04:15
  • Hello @puma_black where you able to resolve this... I'm having the same issue and it's frustrating me... It seems the issue is coming from the app being generated from the bundle file being uploaded to the appstore – XY-JOE Apr 24 '21 at 16:59

4 Answers4

1

The default rules disable read and write access to your database by users. With these rules, you can only access the database through the Firebase console. you need to change them here.

// These rules don't allow anyone to read or write access to your database
{
  "rules": {
    ".read": false,
    ".write": false
  }
}

If both of these are true and still this problem exists then, read the official documentation and integration manual of the firebase. Adding Firebase to Android...

Also, You would be aware that release APK and debug APK has different

  • SHA1
  • API keys

for google services. So you need to add both of them on Firebase inside your Project Setting. After doing this you need to redownload the

google-services.json

file and put it in your project at the right place. Create a fresh release build with your Keystore and publish your app on the Google Play store. I hope it will work in your case.

Zia
  • 705
  • 9
  • 11
  • how do i get both the release and debug keys onto my firebase settings? – puma_black Feb 10 '20 at 10:26
  • As of Android Studio 2.2, SHA-1 fingerprint can be obtained from inside the IDE itself. The most common way developers use to find the fingerprint is shooting up the console/terminal/cmd prompt and using the keytool command. Here’s an example for that: keytool -list -v -keystore ~/.android/debug.keystore -alias androiddebugkey -storepass android -keypass android – Zia Feb 10 '20 at 10:48
  • 1
    Now I will show you a better and faster way to get SHA-1 fingerprint. Step 1. Open your project in Android Studio. Step 2. Click on Gradle Menu on the right side and expand it. Step 3. Click on android and then signing a report. – Zia Feb 10 '20 at 10:49
  • I have the SHA-1 fingerprint on the firebase database settings. But I don't understand why I still get the crash on my app – puma_black Feb 10 '20 at 12:49
  • An Android app crashes whenever there’s an unexpected exit caused by an unhandled exception and Solving crashes can be difficult. However, if you can identify the root cause of the crash, most likely you can find a solution to it. So, read your Stack trace, Memory errors, and Networking exceptions. – Zia Feb 12 '20 at 10:30
1

It might be late but I heard a similar problem after releasing the app to Playstore.

Things to consider as per firebase checklist

  1. Add your app release SHA1 fingerprint to firebase project settings for Authentication
  2. Configure your pro guard rules when using Firebase Realtime Database in your app along with ProGuard, you need to consider how your model objects will be serialized and deserialized after obfuscation. If you use DataSnapshot.getValue(Class) or DatabaseReference.setValue(Object) to read and write data, you will need to add rules to the proguard-rules.pro file:

Add this global rule

-keepattributes Signature

# This rule will properly ProGuard all the model classes in
# the package com.yourcompany.models. Modify to fit the structure
# of your app.
-keepclassmembers class com.yourcompany.models.** {
  *;
}
Ally
  • 783
  • 6
  • 14
1

In my case I just had to change minifyEnabled from true to false.

Now it looks so":

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
Rulietti
  • 11
  • 1
0

Please make sure that your database has public access to read and write data because by default read and write access to your data base has restricted so only authenticated users can read or write data.

Here is link to configure your rules for public access

This make your database available for public access so who doesn't have your app that can also access your database so be sure to restrict your database after proper authentication.

Kinjal
  • 327
  • 2
  • 11
  • I have configured my firebase security rules for both private and public access. The app seems to be running fine on some devices but crashes on other devices. Check my edit for the error log – puma_black Feb 10 '20 at 10:31