com.google.gson.JsonSyntaxException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • NFE when debugging in delve
    via GitHub by dlsniper
    ,
  • GitHub comment 2707#237215556
    via GitHub by keith198
    ,
  • Amy Mitchell - Google+
    via by Unknown author,
  • When we have a test result to be parsed by mocha and this results have duration that are non-integer, the build will fail with the error below: {code} com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 3.3382 at line 1 column 39 at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:232) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:222) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:790) at com.google.gson.Gson.fromJson(Gson.java:729) at com.atlassian.bamboo.plugins.nodejs.tasks.mocha.parser.MochaReportCollector.collect(MochaReportCollector.java:36) at com.atlassian.bamboo.build.test.TestCollationServiceImpl$1$1.run(TestCollationServiceImpl.java:139) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NumberFormatException: Expected an int but was 3.3382 at line 1 column 39 at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1192) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:230) ... 17 more {code} Most test results are in milliseconds and this makes parsing impossible
    via by Sultan Maiyaki [Atlassian],
  • When we have a test result to be parsed by mocha and this results have duration that are non-integer, the build will fail with the error below: {code} com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 3.3382 at line 1 column 39 at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:232) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:222) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:81) at com.google.gson.internal.bind.CollectionTypeAdapterFactory$Adapter.read(CollectionTypeAdapterFactory.java:60) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:93) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:172) at com.google.gson.Gson.fromJson(Gson.java:790) at com.google.gson.Gson.fromJson(Gson.java:729) at com.atlassian.bamboo.plugins.nodejs.tasks.mocha.parser.MochaReportCollector.collect(MochaReportCollector.java:36) at com.atlassian.bamboo.build.test.TestCollationServiceImpl$1$1.run(TestCollationServiceImpl.java:139) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NumberFormatException: Expected an int but was 3.3382 at line 1 column 39 at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1192) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:230) ... 17 more {code} Most test results are in milliseconds and this makes parsing impossible
    via by Sultan Maiyaki [Atlassian],
  • Exception
    via GitHub by glaubermmferreira
    ,
    • com.google.gson.JsonSyntaxException: java.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:249) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:239) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:217) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:117) at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:217) at com.google.gson.Gson.fromJson(Gson.java:861) at com.goide.dlv.DlvCommandProcessor.readResult(DlvCommandProcessor.java:84) at com.goide.dlv.DlvCommandProcessor.readResult(DlvCommandProcessor.java:36) at org.jetbrains.rpc.RequestPromise.onSuccess(CommandSenderBase.kt:45) at com.goide.dlv.DlvCommandProcessor.call(DlvCommandProcessor.java:59) at com.goide.dlv.DlvCommandProcessor.call(DlvCommandProcessor.java:36) at org.jetbrains.rpc.MessageManager.processIncoming(MessageManager.kt:102) at com.goide.dlv.DlvCommandProcessor.processIncomingJson(DlvCommandProcessor.java:53) at com.goide.dlv.DlvVm$2.messageReceived(DlvVm.java:61) at org.jetbrains.io.SimpleChannelInboundHandlerAdapter.channelRead0(SimpleChannelInboundHandlerAdapter.java:20) at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:293) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:267) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:326) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1320) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:334) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:905) at io.netty.channel.oio.AbstractOioByteChannel.doRead(AbstractOioByteChannel.java:162) at io.netty.channel.oio.AbstractOioChannel$1.run(AbstractOioChannel.java:38) at io.netty.channel.ThreadPerChannelEventLoop.run(ThreadPerChannelEventLoop.java:67) at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:742) 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.lang.NumberFormatException: Expected an int but was 8791751565421 at line 1 column 48 path $.currentThread.pc at com.google.gson.stream.JsonReader.nextInt(JsonReader.java:1179) at com.google.gson.internal.bind.TypeAdapters$7.read(TypeAdapters.java:247) ... 35 more

    Users with the same issue

    Unknown visitor2 times, last one,