harukawa / DriveText

0 stars 2 forks source link

空のファイルがあると落ちる #19

Open karino2 opened 4 years ago

karino2 commented 4 years ago
  1. Drive上にPC等からtest.txtという空のファイルを作る
  2. DriveText上でsyncする
  3. 以下のスタックトレースでクラッシュ
    com.google.api.client.http.HttpResponseException: 416 Requested range not satisfiable
    {
     "error": {
      "errors": [
       {
        "domain": "global",
        "reason": "requestedRangeNotSatisfiable",
        "message": "Request range not satisfiable"
       }
      ],
      "code": 416,
      "message": "Request range not satisfiable"
     }
    }

        at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1072)
        at com.google.api.client.googleapis.media.MediaHttpDownloader.executeCurrentRequest(MediaHttpDownloader.java:244)
        at com.google.api.client.googleapis.media.MediaHttpDownloader.download(MediaHttpDownloader.java:198)
        at com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeMediaAndDownloadTo(AbstractGoogleClientRequest.java:562)
        at com.google.api.services.drive.Drive$Files$Get.executeMediaAndDownloadTo(Drive.java:3256)
        at com.github.harukawa.drivetext.MainActivity.downLoadFile(MainActivity.kt:265)
        at com.github.harukawa.drivetext.MainActivity$updateFileAndDb$1.invokeSuspend(MainActivity.kt:235)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:238)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:742)
karino2 commented 4 years ago

大して困ってないので優先度は低めですが、偶然見つけたので記録の為issueにしておきます。 気が向いたら直してください。