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

Bugfix - E2E Share File From Other Apps #14332

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

alperozturk96
Copy link
Collaborator

@alperozturk96 alperozturk96 commented Jan 7, 2025

  • Tests written, or not not needed

Fixes:

• Resolved the crash issue.
• Made mParents variable compatible with encrypted files. The remotePath now uses the encrypted path instead of the decrypted path, allowing files to be uploaded via FileUploadWorker.

Steps to Reproduce:

  1. Open the app and log in.
  2. Use any gallery app to select a file, then share it to the NextCloud app.
  3. On the “Choose upload folder” screen, select an encrypted folder.
  4. Tap “Create new folder” and create a subfolder in the encrypted folder.
  5. App will crash

Crash Report

java.lang.NullPointerException: Attempt to invoke virtual method 'boolean [com.owncloud.android](http://com.owncloud.android/).datamodel.OCFile.canWrite()' on a null object reference
                                                    at [com.owncloud.android](http://com.owncloud.android/).ui.activity.ReceiveExternalFilesActivity.onCreateOptionsMenu([ReceiveExternalFilesActivity.java:1037](http://receiveexternalfilesactivity.java:1037/))
                                                    at [android.app](http://android.app/).Activity.onCreatePanelMenu([Activity.java:3680](http://activity.java:3680/))
                                                    at androidx.activity.ComponentActivity.onCreatePanelMenu(ComponentActivity.kt:470)
                                                    at androidx.appcompat.view.WindowCallbackWrapper.onCreatePanelMenu([WindowCallbackWrapper.java:94](http://windowcallbackwrapper.java:94/))
                                                    at [androidx.appcompat.app](http://androidx.appcompat.app/).AppCompatDelegateImpl$AppCompatWindowCallback.onCreatePanelMenu([AppCompatDelegateImpl.java:3413](http://appcompatdelegateimpl.java:3413/))
                                                    at [androidx.appcompat.app](http://androidx.appcompat.app/).ToolbarActionBar.populateOptionsMenu([ToolbarActionBar.java:458](http://toolbaractionbar.java:458/))
                                                    at [androidx.appcompat.app](http://androidx.appcompat.app/).ToolbarActionBar$1.run([ToolbarActionBar.java:58](http://toolbaractionbar.java:58/))
                                                    at android.view.Choreographer$CallbackRecord.run([Choreographer.java:1092](http://choreographer.java:1092/))
                                                    at android.view.Choreographer.doCallbacks([Choreographer.java:893](http://choreographer.java:893/))
                                                    at android.view.Choreographer.doFrame([Choreographer.java:809](http://choreographer.java:809/))
                                                    at android.view.Choreographer$FrameDisplayEventReceiver.run([Choreographer.java:1078](http://choreographer.java:1078/))
                                                    at android.os.Handler.handleCallback([Handler.java:907](http://handler.java:907/))
                                                    at android.os.Handler.dispatchMessage([Handler.java:105](http://handler.java:105/))
                                                    at android.os.Looper.loop([Looper.java:216](http://looper.java:216/))
                                                    at [android.app](http://android.app/).ActivityThread.main([ActivityThread.java:7625](http://activitythread.java:7625/))
                                                    at java.lang.reflect.Method.invoke(Native Method)
                                                    at [com.android](http://com.android/).internal.os.RuntimeInit$MethodAndArgsCaller.run([RuntimeInit.java:524](http://runtimeinit.java:524/))
                                                    at [com.android](http://com.android/).internal.os.ZygoteInit.main([ZygoteInit.java:987](http://zygoteinit.java:987/))

@alperozturk96 alperozturk96 force-pushed the bugfix/e2e-share-file-from-other-app branch from 837bb04 to 1908e2d Compare January 7, 2025 13:52
@alperozturk96 alperozturk96 changed the title Bugfix - E2E Share File From Other App Bugfix - E2E Share File From Other Apps Jan 7, 2025
@alperozturk96 alperozturk96 force-pushed the bugfix/e2e-share-file-from-other-app branch 3 times, most recently from ca0814e to 6c45826 Compare January 9, 2025 13:56
Signed-off-by: alperozturk <[email protected]>
@alperozturk96 alperozturk96 force-pushed the bugfix/e2e-share-file-from-other-app branch from 6c45826 to 47d7627 Compare January 13, 2025 10:30
@alperozturk96
Copy link
Collaborator Author

/backport to stable-3.30

@alperozturk96 alperozturk96 added this to the Nextcloud App 3.30.8 milestone Jan 13, 2025
Copy link

Codacy

Lint

TypemasterPR
Warnings5656
Errors33

SpotBugs

CategoryBaseNew
Bad practice6565
Correctness5858
Dodgy code296296
Experimental11
Internationalization77
Malicious code vulnerability11
Multithreaded correctness77
Performance5353
Security1818
Total506506

Copy link

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/14332.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud app.

@tobiasKaminsky tobiasKaminsky merged commit e31c098 into master Jan 13, 2025
21 of 22 checks passed
@tobiasKaminsky tobiasKaminsky deleted the bugfix/e2e-share-file-from-other-app branch January 13, 2025 15:05
@tobiasKaminsky
Copy link
Member

\backport to stable-3.30

@tobiasKaminsky
Copy link
Member

/backport to stable-3.30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants