NPE on upload cancel in `UploadNotificationActionReceiver`
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
### ⚠️ Before posting ⚠️
- [X] This is a **bug**, not a question or an enhancement.
- [X] I've [searched for similar issues](https://github.com/nextcloud/android/issues) and didn't find a duplicate.
- [X] I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Steps to reproduce
1. Having a folder registered for auto upload
2. Set signal to use this folder as backup folder
3. Create a backup
4. Wait for nextcloud upload notification
5. Cancel it
### Expected behaviour
Canceled upload. Removal of temporary file on nextcloud side
### Actual behaviour
I'm getting this error and trace
### Cause of error
```java
Exception in thread "main" java.lang.RuntimeException: Unable to start receiver com.owncloud.android.files.services.FileUploader$UploadNotificationActionReceiver: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.owncloud.android.files.services.FileUploader$FileUploaderBinder.cancel(java.lang.String, java.lang.String, com.owncloud.android.lib.common.operations.RemoteOperationResult$ResultCode)' on a null object reference
at android.app.ActivityThread.handleReceiver(ActivityThread.java:5117)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2682)
at android.os.Handler.dispatchMessage(Handler.java:114)
at android.os.Looper.loopOnce(Looper.java:206)
at android.os.Looper.loop(Looper.java:296)
at android.app.ActivityThread.main(ActivityThread.java:9159)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1018)
Caused by: Exception in thread "main" java.lang.NullPointerException: Attempt to invoke virtual method 'void com.owncloud.android.files.services.FileUploader$FileUploaderBinder.cancel(java.lang.String, java.lang.String, com.owncloud.android.lib.common.operations.RemoteOperationResult$ResultCode)' on a null object reference
at com.owncloud.android.files.services.FileUploader$UploadNotificationActionReceiver.onReceive(FileUploader.java:1521)
at android.app.ActivityThread.handleReceiver(ActivityThread.java:5108)
at android.app.ActivityThread.-$$Nest$mhandleReceiver(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2682)
at android.os.Handler.dispatchMessage(Handler.java:114)
at android.os.Looper.loopOnce(Looper.java:206)
at android.os.Looper.loop(Looper.java:296)
at android.app.ActivityThread.main(ActivityThread.java:9159)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:591)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1018)
```
### App information
* ID: `com.nextcloud.client`
* Version: `30270090`
* Build flavor: `gplay`
### Device information
* Brand: `HONOR`
* Device: `HNFRI`
* Model: `FRI-NX9`
* Id: `HONORFRI-N39`
* Product: `FRI-NX9EEA`
### Firmware
* SDK: `33`
* Release: `13`
* Incremental: `7.1.0.166C430E9R3P1`
### Android version
13
### Device brand and model
Honor magic VS
### Stock or custom OS?
Stock
### Nextcloud android app version
3.27.0
### Nextcloud server version
27.1.5
### Using a reverse proxy?
No
### Android logs
_No response_
### Server error logs
_No response_
### Additional information
It may be due to the .backup*.temp file behind uploaded WHILE signal is doing the backup.
Contributor guide
Assessment
This issue has not been assessed yet.