stefan-niedermann / nextcloud-deck

📋 Android client for nextcloud deck app
https://play.google.com/store/apps/details?id=it.niedermann.nextcloud.deck.play
GNU General Public License v3.0
487 stars 52 forks source link

NullPointerException: Attempt to invoke virtual method #740

Closed markushub closed 3 years ago

markushub commented 3 years ago

Please use GitHub reactions 👍 to show that you are affected by the same issue. Please don't comment if you have no relevant information to add!

Describe the bug

after start app deck (and do nothing) app full crash

To reproduce Issue is reproducible with an account from try.nextcloud.com:

Steps to reproduce the behavior: Not reproduceable only stacktrace available.

Additional Info Update Nextcloud from 20.0.1 to 20.0.2 and Nextcloud Android from 3.13.1 to 3.14.0. Updates finished successful.

Expected behavior no crash and no terminate

Screenshots

Versions

Smartphone (please complete the following information):

Are you using LDAP?

Stacktrace

Full Crash:

App Version: 1.12.1
App Version Code: 1012001
App Flavor: fdroid

Files App Version Code: 30140090

---

OS Version: 3.18.120-perf-Arrow(2048)
OS API Level: 29
Device: potter
Manufacturer: motorola
Model (and Product): Moto G5 Plus (XT1685) (Moto G5 Plus)

---

java.lang.NullPointerException: Attempt to invoke virtual method 'void it.niedermann.nextcloud.deck.ui.card.attachments.CardAttachmentAdapter.applyBrand(int)' on a null object reference
    at it.niedermann.nextcloud.deck.ui.card.attachments.CardAttachmentsFragment.applyBrand(CardAttachmentsFragment.java:520)
    at it.niedermann.nextcloud.deck.ui.branding.BrandedFragment.onStart(BrandedFragment.java:19)
    at androidx.fragment.app.Fragment.performStart(Fragment.java:2731)
    at androidx.fragment.app.FragmentStateManager.start(FragmentStateManager.java:365)
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1206)
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1368)
    at androidx.fragment.app.FragmentManager.moveFragmentToExpectedState(FragmentManager.java:1446)
    at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:1509)
    at androidx.fragment.app.FragmentManager.dispatchStateChange(FragmentManager.java:2637)
    at androidx.fragment.app.FragmentManager.dispatchStart(FragmentManager.java:2595)
    at androidx.fragment.app.FragmentController.dispatchStart(FragmentController.java:258)
    at androidx.fragment.app.FragmentActivity.onStart(FragmentActivity.java:550)
    at androidx.appcompat.app.AppCompatActivity.onStart(AppCompatActivity.java:210)
    at it.niedermann.nextcloud.deck.ui.branding.BrandedActivity.onStart(BrandedActivity.java:22)
    at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1432)
    at android.app.Activity.performStart(Activity.java:7847)
    at android.app.ActivityThread.handleStartActivity(ActivityThread.java:3294)
    at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:221)
    at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:201)
    at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:173)
    at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2016)
    at android.os.Handler.dispatchMessage(Handler.java:107)
    at android.os.Looper.loop(Looper.java:214)
    at android.app.ActivityThread.main(ActivityThread.java:7356)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:940)
desperateCoder commented 3 years ago

@markushub thanks for the report! No luck these times, huh? @stefan-niedermann will be at my place in an hour or so, I'll force him to fix this.

stefan-niedermann commented 3 years ago

Your server has not been connected successfully - Please try to clear the storage of the app and reimport your account as described here.

Hint @desperateCoder - no server app version at the stacktrace instead of 0.6.4 in the current version.

stefan-niedermann commented 3 years ago

@markushub did clearing the storage and reimporting the account work for you or are you experiencing the same issue?

markushub commented 3 years ago

thank you. Clearing the storage and reimporting the account solves the problem

stefan-niedermann commented 3 years ago

Thanks for the feedback!