Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nextcloud crashes when accessing "Details" #13607

Closed
4 tasks done
superzanti opened this issue Sep 23, 2024 · 4 comments
Closed
4 tasks done

Nextcloud crashes when accessing "Details" #13607

superzanti opened this issue Sep 23, 2024 · 4 comments
Labels

Comments

@superzanti
Copy link

superzanti commented Sep 23, 2024

⚠️ Before posting ⚠️

Steps to reproduce

After upgrading to Nextcloud 30300090 from 30290390 (the issue does not exist in the earlier version) after clicking "details" for any file or folder, the app crashes.

This was in an attempt to get 2-way-sync working: #13294 (comment)_

From linked issue above I was instructed to tag:
@tobiasKaminsky and @alperozturk96

Expected behaviour

The regular details view should open.

Actual behaviour

Instead, I get a crash:

Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'long java.lang.Long.longValue()' on a null object reference
    at com.owncloud.android.datamodel.OCFile.isInternalFolderSync(OCFile.java:1058)
    at com.owncloud.android.ui.fragment.FileDetailFragment.updateFileDetails(FileDetailFragment.java:569)
    at com.owncloud.android.ui.fragment.FileDetailFragment.onViewCreated(FileDetailFragment.java:266)
    at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3152)
    at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:608)
    at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:286)
    at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:2164)
    at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:2059)
    at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:2002)
    at androidx.fragment.app.FragmentManager$5.run(FragmentManager.java:702)
    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:548)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)

With:

  • ID: com.nextcloud.client
  • Version: 30300090
  • Build flavor: generic

Downgrading to 30290390 fixes this problem.

Android version

12

Device brand and model

Pixel 5a

Stock or custom OS?

Stock

Nextcloud android app version

30300090

Nextcloud server version

23.0.3

Using a reverse proxy?

No

@alperozturk96
Copy link
Collaborator

Duplication of #13502

Thanks for the report. We are aware of this issue, and we will fix it asap.

@AndyScherzinger
Copy link
Member

Sorry for the extra efforts @superzanti and thanks for checking @alperozturk96 - now we know for sure 👍

@alperozturk96
Copy link
Collaborator

alperozturk96 commented Sep 24, 2024

Could you try with this PR: #13612 ? @superzanti

@superzanti
Copy link
Author

superzanti commented Sep 24, 2024

@alperozturk96 I wish I could. unfortunately the NextcloudQA builds have never worked for me. They always crash when I type in the address to my nextcloud server.

Edit:
I went into logcat and found:

09-24 11:09:42.763  9103  9103 E AndroidRuntime: FATAL EXCEPTION: main
09-24 11:09:42.763  9103  9103 E AndroidRuntime: Process: com.nextcloud.android.qa, PID: 9103
09-24 11:09:42.763  9103  9103 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=redacted... flg=0x10000000 }
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:2087)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.Instrumentation.execStartActivity(Instrumentation.java:1747)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.Activity.startActivityForResult(Activity.java:5403)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.kt:704)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.Activity.startActivityForResult(Activity.java:5361)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at androidx.activity.ComponentActivity.startActivityForResult(ComponentActivity.kt:683)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.Activity.startActivity(Activity.java:5747)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.Activity.startActivity(Activity.java:5700)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at com.owncloud.android.authentication.AuthenticatorActivity.launchDefaultWebBrowser(AuthenticatorActivity.java:493)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at com.owncloud.android.authentication.AuthenticatorActivity.lambda$anonymouslyPostLoginRequest$1(AuthenticatorActivity.java:462)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at com.owncloud.android.authentication.AuthenticatorActivity.$r8$lambda$HghPOrCvYiC9MbGZkBiQhXwJPi8(Unknown Source:0)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at com.owncloud.android.authentication.AuthenticatorActivity$$ExternalSyntheticLambda9.run(D8$$SyntheticClass:0)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:938)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:99)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:201)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:288)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:7839)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
09-24 11:09:42.763  9103  9103 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)
09-24 11:09:42.776  1623  5918 W ActivityTaskManager:   Force finishing activity com.nextcloud.android.qa/com.owncloud.android.authentication.AuthenticatorActivity

And realized it was a simple solution. For some reason the QA version logs in using the browser, while the regular nextcloud does not.
I prefer not to have a web-browser on my phone to keep it distraction free.

Anyway - I installed a web browser and this crash was resolved....

Moving on to if #13612 worked: Yes- If I open details there is a sync checkbox now!
Thank you and I look forward to having this integrated into the main release :)

@superzanti superzanti mentioned this issue Sep 24, 2024
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants