nextcloud / nextcloud/notes-android
Crash while doing a seach inside a note: `NullPointerException: Attempt to invoke interface method 'void com.nextcloud.android.sso.api.NextcloudAPI$ApiConnectedListener.onConnected()'`
Open
Nobody has claimed this yet.
0. Needs triage
bug
Upstream :: SSO
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 168
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 31
Description
This issue respects the following points:
- I have read the FAQ
- I have searched for existing issues
- The issue affects the Notes Android app, neither the Notes server app nor the Nextcloud Android app.
Describe the bug
App crash while doing a seach inside a note.
Steps to reproduce:
- open the app
- click on a note
- use the magnifying glass to search
- type text
- the crash occurs
Seems to be occuring randomly and when the first few letters of a word that is in the note multiple times is typed. And for bigger notes it seems, like 60 lines and 10000 characters
Expected behavior
No crash when doing a search for text inside a note
Notes Android version
4.3.1
Notes server version
4.11.0
Nextcloud Android version
3.31.1
Nextcloud version
31.0.2
Device
Samsung Galaxy A53 5G
Android Version
14
App Store
- Google Play Store
- F-Droid
- Huawei App Gallery
Stacktrace
App Version: 4.3.1
App Version Code: 40030192
App Flavor: play
Files App Version Code: 30310090 (PROD)
OS Version: 5.10.223-android12-9-28577532-abA536BXXSDEYB9(A536BXXSDEYB9)
OS API Level: 34
Device: a53x
Manufacturer: samsung
Model (and Product): SM-A536B (a53xnaeea)
java.lang.NullPointerException: Attempt to invoke interface method 'void com.nextcloud.android.sso.api.NextcloudAPI$ApiConnectedListener.onConnected()' on a null object reference
at com.nextcloud.android.sso.api.AidlNetworkRequest$1.onServiceConnected(AidlNetworkRequest.java:69)
at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:2348)
at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:2385)
at android.os.Handler.handleCallback(Handler.java:958)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:230)
at android.os.Looper.loop(Looper.java:319)
at android.app.ActivityThread.main(ActivityThread.java:8919)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:578)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1103)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the crash through the note search steps and inspect the stacktrace entry at AidlNetworkRequest.java:69, where onServiceConnected is invoked. Trace which Notes Android search action reaches this SSO callback, then verify that repeated searches in larger notes no longer crash and that the reported stacktrace is absent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100