sbtである日突然GZIPInputStream: java.io.EOFException

scala 開発関連
スポンサーリンク

sbt runするとある日突然エラーが出るように・・・

エラーログ

Error wrapping InputStream in GZIPInputStream: java.io.EOFException
	at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
	at sbt.WrapUsing.open(Using.scala:34)
	at sbt.Using.apply(Using.scala:23)
	at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:810)
	at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:809)
	at sbt.Using.apply(Using.scala:24)
	at sbt.IO$.gzipFileIn(IO.scala:809)
	at sbt.Sync$.readUncaught(Sync.scala:88)
	at sbt.Sync$.readInfo(Sync.scala:84)
	at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)
	at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
	at com.typesafe.sbt.web.SbtWeb$.syncMappings(SbtWeb.scala:487)
	at com.typesafe.sbt.web.SbtWeb$$anonfun$34.apply(SbtWeb.scala:281)
	at com.typesafe.sbt.web.SbtWeb$$anonfun$34.apply(SbtWeb.scala:281)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:235)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.io.EOFException
	at java.util.zip.GZIPInputStream.readUByte(GZIPInputStream.java:268)
	at java.util.zip.GZIPInputStream.readUShort(GZIPInputStream.java:258)
	at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:164)
	at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:79)
	at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)
	at sbt.Using$$anonfun$gzipInputStream$1.apply(Using.scala:84)
	at sbt.Using$$anon$1.openImpl(Using.scala:51)
	at sbt.WrapUsing$$anonfun$open$2.apply(Using.scala:34)
	at sbt.ErrorHandling$.translate(ErrorHandling.scala:10)
	at sbt.WrapUsing.open(Using.scala:34)
	at sbt.Using.apply(Using.scala:23)
	at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:810)
	at sbt.IO$$anonfun$gzipFileIn$1.apply(IO.scala:809)
	at sbt.Using.apply(Using.scala:24)
	at sbt.IO$.gzipFileIn(IO.scala:809)
	at sbt.Sync$.readUncaught(Sync.scala:88)
	at sbt.Sync$.readInfo(Sync.scala:84)
	at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:28)
	at sbt.Sync$$anonfun$apply$1.apply(Sync.scala:22)
	at com.typesafe.sbt.web.SbtWeb$.syncMappings(SbtWeb.scala:487)
	at com.typesafe.sbt.web.SbtWeb$$anonfun$34.apply(SbtWeb.scala:281)
	at com.typesafe.sbt.web.SbtWeb$$anonfun$34.apply(SbtWeb.scala:281)
	at scala.Function1$$anonfun$compose$1.apply(Function1.scala:47)
	at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:40)
	at sbt.std.Transform$$anon$4.work(System.scala:63)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
	at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:226)
	at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:17)
	at sbt.Execute.work(Execute.scala:235)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
	at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:226)
	at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159)
	at sbt.CompletionService$$anon$2.call(CompletionService.scala:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
[error] (web-assets:assets) Error wrapping InputStream in GZIPInputStream: java.io.EOFException

なぜかassetsで。。。

解決方法

異なるsbtのバージョン問題かと思いきや、clean buildだけで大丈夫でした。

$ sbt clean compile

それでもダメな場合は

私は試しませんでしたが、targetを全て削除すればなおるかもしれません

play2.2時代に作りはじめためっちゃ古いプロジェクトだったのでバージョン問題かと思いきや違いました。

タイトルとURLをコピーしました