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

NullPointerException when sharing newly created directory in Nextcloud #13596

Closed
4 tasks done
rugk opened this issue Sep 22, 2024 · 3 comments
Closed
4 tasks done

NullPointerException when sharing newly created directory in Nextcloud #13596

rugk opened this issue Sep 22, 2024 · 3 comments
Labels

Comments

@rugk
Copy link

rugk commented Sep 22, 2024

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

Create anew directory, another subdirectory in there and navigate back.

Now try to share that by tapping on the share button. (I mean the people +1 one)

Is the same though if you share it via info - > share.

Reproducible.

Expected behaviour

No crash.

Actual behaviour

Cause of error

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.datamodel.FileDataStorageManager.isPartOfInternalTwoWaySync(FileDataStorageManager.java:2504)
    at com.owncloud.android.ui.fragment.FileDetailFragment.updateFileDetails(FileDetailFragment.java:572)
    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:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8592)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

App information

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

Device information

  • Brand: Fairphone
  • Device: FP4
  • Model: FP4
  • Id: AP2A.240905.003
  • Product: FP4eea

Firmware

  • SDK: 34
  • Release: 14
  • Incremental: 24511010

Android version

14

Device brand and model

Fairphone 4 FP4

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

Version 3.30.0 com.nextcloud.client

Nextcloud server version

N/A

Using a reverse proxy?

Yes

Android logs

No response

Server error logs

No response

Additional information

CalyxOS 5.11.1

@rugk rugk added the bug label Sep 22, 2024
@amalgame21
Copy link

Same issue.
No matter the directory is already shared or not, when pressing on the share button (a person with a plus sign icon/ Circles with the first alphabet of shared accounts), it shows similar error message.

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:959)
    at android.os.Handler.dispatchMessage(Handler.java:100)
    at android.os.Looper.loopOnce(Looper.java:232)
    at android.os.Looper.loop(Looper.java:317)
    at android.app.ActivityThread.main(ActivityThread.java:8623)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
    at com.android.internal.os.ExecInit.main(ExecInit.java:50)
    at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
    at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:369)

Android version
14

Nextcloud android app
Version 3.30.0

@alperozturk96
Copy link
Collaborator

Duplication of #13502

Could you try with this PR: #13612 ?

@rugk
Copy link
Author

rugk commented Oct 10, 2024

Just tested the pr build, it works.

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