hoccer / hoccer-talk-spike

Android Client & Backend Software
0 stars 0 forks source link

Download fails when uploader started it offline #1089

Closed elRadish closed 8 years ago

elRadish commented 8 years ago

Older bug:

  1. Start upload while being offline
  2. Go online
  3. Download not starting
elRadish commented 8 years ago

12-18 15:06:26.296 15389-16826/? E/Hoccer﹕ [startDownload-pool-1] ERROR com.hoccer.talk.client.DownloadAction - Download error java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference at java.net.URI.parseURI(URI.java:353) at java.net.URI.<init>(URI.java:204) at java.net.URI.create(URI.java:731) at org.apache.http.client.methods.HttpGet.<init>(HttpGet.java:80) at com.hoccer.talk.client.DownloadAction.b(DownloadAction.java:115) at com.hoccer.talk.client.DownloadAction.a(DownloadAction.java:62) at com.hoccer.talk.client.model.TalkClientDownload.setState(TalkClientDownload.java:210) at com.hoccer.talk.client.model.TalkClientDownload.switchState(TalkClientDownload.java:191) at com.hoccer.talk.client.DownloadAction.a(DownloadAction.java:52) at com.hoccer.talk.client.DownloadAgent$2.run(DownloadAgent.java:109) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:422) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:152) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:265) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) 12-18 15:06:26.296 15389-16826/? E/Hoccer﹕ [startDownload-pool-1] ERROR com.hoccer.talk.client.DownloadAction - 2 startDownload exception!

pavel-mayer commented 8 years ago

See #1090 for the reason. The server now will not deliver such messages any more; the will appear as undeliverable, although an upload will be performed

It does not happen all the time when you start attachment sending while offline, but it happens if you kill and restart the app before going online again.

It also happens sometimes when you are online but have a bad connection or a slow phone.