Open randybaek opened 11 years ago
Can you run the command in the message to give more information? I haven't seen it before, but perhaps the full output will give more details on what went wrong.
last server/compile:js-source-graph [debug] sbt-js template properties {} java.nio.charset.MalformedInputException: Input length = 1 at java.nio.charset.CoderResult.throwException(CoderResult.java:260) at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:319) at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158) at java.io.InputStreamReader.read(InputStreamReader.java:167) at java.io.BufferedReader.fill(BufferedReader.java:136) at java.io.BufferedReader.read(BufferedReader.java:157) at scala.io.BufferedSource$$anonfun$iter$1$$anonfun$apply$mcI$sp$1.apply$mcI$sp(BufferedSource.scala:38) at scala.io.Codec.wrap(Codec.scala:64) at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38) at scala.io.BufferedSource$$anonfun$iter$1.apply(BufferedSource.scala:38) at scala.collection.Iterator$$anon$14.next(Iterator.scala:150) at scala.collection.Iterator$$anon$25.hasNext(Iterator.scala:562) at scala.collection.Iterator$$anon$19.hasNext(Iterator.scala:400) at scala.io.Source.hasNext(Source.scala:238) at scala.collection.Iterator$class.foreach(Iterator.scala:772) at scala.io.Source.foreach(Source.scala:181) at scala.collection.TraversableOnce$class.addString(TraversableOnce.scala:298) at scala.io.Source.addString(Source.scala:181) at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:263) at scala.io.Source.mkString(Source.scala:181) at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:265) at scala.io.Source.mkString(Source.scala:181) at scala.collection.TraversableOnce$class.mkString(TraversableOnce.scala:267) at scala.io.Source.mkString(Source.scala:181) at com.untyped.sbtgraph.Graph$class.downloadAndCache(Graph.scala:156) at com.untyped.sbtjs.Graph.downloadAndCache(Graph.scala:8) at com.untyped.sbtgraph.Graph$class.getSource(Graph.scala:42) at com.untyped.sbtjs.Graph.getSource(Graph.scala:8) at com.untyped.sbtgraph.Graph$class.getSource(Graph.scala:36) at com.untyped.sbtjs.Graph.getSource(Graph.scala:8) at com.untyped.sbtjs.JsmSource$$anonfun$parents$3.apply(JsmSource.scala:12) at com.untyped.sbtjs.JsmSource$$anonfun$parents$3.apply(JsmSource.scala:11) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233) at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:233) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) at scala.collection.immutable.List.foreach(List.scala:76) at scala.collection.TraversableLike$class.map(TraversableLike.scala:233) at scala.collection.immutable.List.map(List.scala:76) at com.untyped.sbtjs.JsmSource.parents(JsmSource.scala:11) at com.untyped.sbtgraph.Graph$class.parents(Graph.scala:173) at com.untyped.sbtjs.Graph.parents(Graph.scala:8) at com.untyped.sbtgraph.Graph$class.com$untyped$sbtgraph$Graph$$$plus$eq(Graph.scala:31) at com.untyped.sbtgraph.Graph$class.$plus$eq(Graph.scala:23) at com.untyped.sbtjs.Graph.$plus$eq(Graph.scala:8) at com.untyped.sbtjs.Plugin$$anonfun$sourceGraphTask$1$$anonfun$apply$7$$anonfun$apply$8.apply(Plugin.scala:71) at com.untyped.sbtjs.Plugin$$anonfun$sourceGraphTask$1$$anonfun$apply$7$$anonfun$apply$8.apply(Plugin.scala:71) at scala.collection.LinearSeqOptimized$class.foreach(LinearSeqOptimized.scala:59) at scala.collection.immutable.List.foreach(List.scala:76) at com.untyped.sbtjs.Plugin$$anonfun$sourceGraphTask$1$$anonfun$apply$7.apply(Plugin.scala:71) at com.untyped.sbtjs.Plugin$$anonfun$sourceGraphTask$1$$anonfun$apply$7.apply(Plugin.scala:61) at com.untyped.sbtjs.Plugin$.time(Plugin.scala:35) at com.untyped.sbtjs.Plugin$$anonfun$sourceGraphTask$1.apply(Plugin.scala:61) at com.untyped.sbtjs.Plugin$$anonfun$sourceGraphTask$1.apply(Plugin.scala:58) at sbt.Scoped$$anonfun$hf7$1.apply(Structure.scala:583) at sbt.Scoped$$anonfun$hf7$1.apply(Structure.scala:583) at scala.Function1$$anonfun$compose$1.apply(Function1.scala:49) at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311) at sbt.Scoped$Reduced$$anonfun$combine$1$$anonfun$apply$12.apply(Structure.scala:311) at sbt.$tilde$greater$$anonfun$$u2219$1.apply(TypeFunctions.scala:41) at sbt.std.Transform$$anon$5.work(System.scala:71) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232) at sbt.Execute$$anonfun$submit$1$$anonfun$apply$1.apply(Execute.scala:232) at sbt.ErrorHandling$.wideConvert(ErrorHandling.scala:18) at sbt.Execute.work(Execute.scala:238) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232) at sbt.Execute$$anonfun$submit$1.apply(Execute.scala:232) at sbt.ConcurrentRestrictions$$anon$4$$anonfun$1.apply(ConcurrentRestrictions.scala:159) at sbt.CompletionService$$anon$2.call(CompletionService.scala:30) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662) error java.nio.charset.MalformedInputException: Input length = 1
Hmm, it's pretty hard to say what's wrong here. The input length = 1 suggests that one or more of your files is truncated, perhaps? I'd search the source tree for files of size 1 and check that they match the contents of the repo. Maybe your git clone failed or something else corrupted the repo? Given that it's sbtjs failing, I'd look at .js and .jsm files in particular and make sure they look legit.
Or to avoid all that, have you tried just cloning again to see how reproducible it is?
This sounds like a character encoding issue. The error occurs during javascript compilation, these should be treated as UTF-8, but are likely being parsed in whatever the default encoding is set to on your system. Can we force the encoding for sbt-js in SBT?
@randybaek Are you using Mac OS? If you are, this might help:
Try adding or editing the ~/.profile file for it to correctly export your locale settings upon initiating a new session.
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
Hi,
It runs 100% fine in my local machine. But when I try to run scala-notebook in unix server, it returns below error message.
Are anyone familiar with this message?
Thanks! Randy