DroidKaigi / conference-app-2023

The Official Conference App for DroidKaigi 2023
Apache License 2.0
648 stars 206 forks source link

Crash when open contributors screen offline #752

Closed ked4ma closed 1 year ago

ked4ma commented 1 year ago

Describe the bug App will crash when you open contributors screen offline

To Reproduce Steps to reproduce the behavior:

  1. modify DefaultRemoteConfigApi.getBoolean(...) due to crashing by other issue (#734)
    actual override suspend fun getBoolean(key: String): Boolean {
     + try {
            firebaseRemoteConfig.fetchAndActivate()
     + } catch (exception: FirebaseException) {
     +     Log.e("DefaultRemoteConfig", exception.message, exception)
     + }
        return firebaseRemoteConfig[key]
    }
  2. set device offline
  3. launch app
  4. go to contributors from bottom nav bar
  5. crash app

Expected behavior

Screenshots

https://github.com/DroidKaigi/conference-app-2023/assets/74723074/44e2bd5b-611b-48b2-8867-1f3c9109660b

matsuurayuki1219 commented 1 year ago

@ked4ma cc: @takahirom Thank you for finding out the bug 😊 Are you going to fix this ??

If you don't think so, I want to fix this bug 👍

ked4ma commented 1 year ago

@matsuurayuki1219 Please take it!

matsuurayuki1219 commented 1 year ago

@ked4ma Thank you !!

@takahirom Please assign this issue to me 🙇

takahirom commented 1 year ago

🙆‍♀️

matsuurayuki1219 commented 1 year ago

@takahirom I'm wondering what to do, so will you help me ?? 🙇

Now I'm fixing ContributorsViewModel.kt. To handle exceptions in data layer and show snackBars, I want to refer to UserMessageStateHolder in ContributorsViewModel. ( like the below. )

However, I can' t refer to UserMessageStateHolder, so What should I do ??

takahirom commented 1 year ago

@matsuurayuki1219 Sorry for being late. It is because ContributorsViewModel is in commonMain and UserMessageStateHolder is in androidMain. We might have to move UserMessageStateHolder to commonMain to refer to UserMessageStateHolder.

matsuurayuki1219 commented 1 year ago

@takahirom Thank you for your comment !! I see your point 👍

I tried to fix, but I'm not so familiar with KMM, so I didn't fix this problem ... ( I moved UserMessageStateHolder, but I can't build the application ... )

So can I remove my assignment ... ??

takahirom commented 1 year ago

Of course! Thank you for your challenge!🙆‍♂️

hoashi-akane commented 1 year ago

🙋 Can I take the challenge?

satsukies commented 1 year ago

@hoashi-akane Sure! Go ahead!