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
498 stars 53 forks source link

Unable to login with Nextcloud account #1243

Closed taiBsu closed 2 years ago

taiBsu commented 2 years ago

Describe the bug After downloading the app from the F-Droid store and choosing my NC account, I am getting an error (see below). Reinstall didn't help.

Steps to reproduce the behavior:

  1. Download app from F-Store
  2. start app, choose Nextcloud account, press OK
  3. error pops up

Expected behavior I'm supposed to see my decks.

Versions

Smartphone (please complete the following information):

Stacktrace

java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String it.niedermann.nextcloud.deck.model.Account.getUserDisplayName()' on a null object reference
    at it.niedermann.nextcloud.deck.ui.accountswitcher.AccountSwitcherDialog.onCreateDialog(AccountSwitcherDialog.java:48)
    at androidx.fragment.app.DialogFragment.prepareDialog(DialogFragment.java:644)
    at androidx.fragment.app.DialogFragment.onGetLayoutInflater(DialogFragment.java:558)
    at androidx.fragment.app.Fragment.performGetLayoutInflater(Fragment.java:1654)
    at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:493)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:282)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2189)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2100)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
    at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:524)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loopOnce(Looper.java:201)
    at android.os.Looper.loop(Looper.java:288)
    at android.app.ActivityThread.main(ActivityThread.java:7839)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:550)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
stefan-niedermann commented 2 years ago

Hi,

did you already follow the steps of our FAQ?

taiBsu commented 2 years ago

Hi Stefan,

yep, I did. apps are up-to-date, storage cleared, no success.

From: Niedermann IT-Dienstleistungen Sent: Thursday, March 24, 2022 7:56 PM To: stefan-niedermann/nextcloud-deck Cc: taiBsu ; Author Subject: Re: [stefan-niedermann/nextcloud-deck] Unable to login with Nextcloud account (Issue #1243)

Hi,

did you already follow the steps of our FAQ?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

ekianjo commented 2 years ago

Same issue here. Turns out that the Deck android client only works with the Play Store version of Nextcloud. otherwise it complains of single-sign on feature missing (from the F-droid version) and refuses to log-in. Shouldn't there be another option for logging in?

stefan-niedermann commented 2 years ago

Shouldn't there be another option for logging in?

No, we commited to Nextcloud Single Sign On for various reasons (like enhanced security, no need to maintain a separate network stack, out of the box support for edge cases, self signed certificates and way more).

Deck android client only works with the Play Store version of Nextcloud

No, since I am using the F-Droid version myself, I can confirm that this is not a generic issue with F-Droid (or the published build).

@ekianjo Could you please also post the used versions and sources of your Nextcloud Android apo, Deck Android App, Deck Server App and Nextcloud itself? Do you see the exact same error message as originally posted above?

By the way @taiBsu this is not an actual issue with the login itself, I rather think that the actual root cause is a race condition @desperateCoder is already analyizing.

taiBsu commented 2 years ago

By the way @taiBsu this is not an actual issue with the login itself, I rather think that the actual root cause is a race condition @desperateCoder is already analyizing.

Hi @stefan-niedermann, thanks for getting back to this. Is there already an update on that?

tuximail commented 2 years ago

I am experiencing the same problem after switching to a new phone. So in comparison I have the old phone where the nextcloud App was from the Playstore and Deck from F-Droid. Also my Tablet where both apps are from F-Droid. Both scenarios working with the same versions as I am now using on the new phone (both from F-Droid here, too). So it really seems to be a different issue than it says in the error message. I would be interested in this issue being solved. If I could help here with any information (like details on the version, logfiles, etc) let me know - I am happy to provide them!

desperateCoder commented 2 years ago

Hi @tuximail,

you can indeed provide something:

Can you please try reinstalling the app and then create a screen recording beginning at the first start of the app until it crashes? The steps described above might be right, but with a video I can see what happens between them, at least whats happening in the UI. That'd be great!

stefan-niedermann commented 2 years ago

Can everybody who is affected please also check whether they have installed the Nextcloud Android Dev app instead of the released Nextcloud Android app? There is currently an issue with the Nextcloud Single Sign On mechanism in case only the Dev variant is installed.

tuximail commented 2 years ago

Thank you very much @stefan-niedermann! This was actually the problem here. I was using the Dev version - which should not make any difference, but because of the issue linked that only affects the Dev version, it mattered. After switching to the stable nextcloud client I could login.

stefan-niedermann commented 2 years ago

@taiBsu and @ekianjo assuming this was also the cause of your issues, I'll close this in favor of https://github.com/nextcloud/Android-SingleSignOn/issues/470

Let us know if using the stable released Nextcloud app did not solve your issue, we'll reopen this one in this case.