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

java.lang.NullPointerException in OfflineSyncWork.checkEtagChanged line 140 #11342

Open
4 tasks done
hasezoey opened this issue Feb 2, 2023 · 0 comments
Open
4 tasks done
Labels
bug performance: NPE 🚫 NullPointerException / Null Pointer Exception

Comments

@hasezoey
Copy link

hasezoey commented Feb 2, 2023

⚠️ 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

it happens in a background task

Expected behaviour

probably no error

Actual behaviour

a error is logged

02-02 13:07:33.077  3991  4038 E CheckEtagRemoteOperation: Error while retrieving eTag
02-02 13:07:33.077  3991  4038 D OfflineSyncJob: /: eTag changed
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: Work [ id=1978cd15-2514-4729-9d89-d67a22ebbfc0, tags={ timestamp:1675177395832, com.nextcloud.client.jobs.OfflineSyncWork, *, name:periodic_offline_sync } ] failed because it threw an exception/error
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: java.util.concurrent.ExecutionException: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.get(int)' on a null object reference
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:516)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:311)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1137)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:637)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at java.lang.Thread.run(Thread.java:1012)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object java.util.ArrayList.get(int)' on a null object reference
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at com.nextcloud.client.jobs.OfflineSyncWork.checkEtagChanged(OfflineSyncWork.kt:140)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at com.nextcloud.client.jobs.OfflineSyncWork.recursive(OfflineSyncWork.kt:79)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at com.nextcloud.client.jobs.OfflineSyncWork.doWork(OfflineSyncWork.kt:64)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	at androidx.work.Worker$1.run(Worker.java:86)
02-02 13:07:33.079  3991  4011 E WM-WorkerWrapper: 	... 3 more
02-02 13:07:33.080  3991  4011 I WM-WorkerWrapper: Worker result FAILURE for Work [ id=1978cd15-2514-4729-9d89-d67a22ebbfc0, tags={ timestamp:1675177395832, com.nextcloud.client.jobs.OfflineSyncWork, *, name:periodic_offline_sync } ]

Android version

13

Device brand and model

OnePlus 9 Pro

Stock or custom OS?

Custom (explain in "additional information")

Nextcloud android app version

3.23.1

Nextcloud server version

None (error happened when server is not online)

Using a reverse proxy?

Yes

Android logs

logcatOutput.txt
Note: log has been edited to remove references to actual server / ip's (and also somewhat personal data like directory names)

Server error logs

None (no server was running)

Additional information

i had noticed this error while investigating something unrelated to nextcloud, and i am reporting it because this error does not seem like it should be happening

probably:

Custom (explain in "additional information")

LineageOS 20 (20.0-20230131)

@hasezoey hasezoey added the bug label Feb 2, 2023
@joshtrichards joshtrichards added the performance: general/non-specific lag, ANR, etc and rarer exceptions/errors that don't have their own labels label Oct 19, 2023
@joshtrichards joshtrichards added performance: NPE 🚫 NullPointerException / Null Pointer Exception and removed performance: general/non-specific lag, ANR, etc and rarer exceptions/errors that don't have their own labels labels Dec 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug performance: NPE 🚫 NullPointerException / Null Pointer Exception
Projects
None yet
Development

No branches or pull requests

2 participants