mobie / platybrowser-project

7 stars 5 forks source link

Platybrowser doesn't open due to json syntax error #77

Closed constantinpape closed 4 years ago

constantinpape commented 4 years ago

When I try to open the Platybrowser I get the exception below. It looks like some json cannot be parsed correctly. Could this be due to some recent change in parsing the bookmarks, @tischi @K-Meech?

ERROR] Module threw exception
java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:45)
    at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:230)
    at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:222)
    at bdv.tools.transformation.TransformedSource.getSource(TransformedSource.java:218)
    at de.embl.cba.bdv.utils.sources.LazySpimSource.getSource(LazySpimSource.java:119)
    at bdv.tools.transformation.TransformedSource.getSource(TransformedSource.java:218)
    at bdv.tools.InitializeViewerState.initTransform(InitializeViewerState.java:118)
    at bdv.tools.InitializeViewerState.initTransform(InitializeViewerState.java:79)
    at bdv.util.BdvHandle.tryInitTransform(BdvHandle.java:195)
    at bdv.util.BdvHandle.add(BdvHandle.java:179)
    at bdv.util.BdvFunctions.addSource(BdvFunctions.java:585)
    at bdv.util.BdvFunctions.show(BdvFunctions.java:196)
    at de.embl.cba.mobie.ui.viewer.SourcesPanel.showIntensitySource(SourcesPanel.java:387)
    at de.embl.cba.mobie.ui.viewer.SourcesPanel.addSourceToViewer(SourcesPanel.java:364)
    at de.embl.cba.mobie.ui.viewer.SourcesPanel.addSourceToPanelAndViewer(SourcesPanel.java:339)
    at de.embl.cba.mobie.ui.viewer.SourcesPanel.addSourceToPanelAndViewer(SourcesPanel.java:296)
    at de.embl.cba.mobie.bookmark.BookmarksManager.addSourcesToPanelAndViewer(BookmarksManager.java:53)
    at de.embl.cba.mobie.bookmark.BookmarksManager.setView(BookmarksManager.java:35)
    at de.embl.cba.mobie.ui.viewer.MoBIEViewer.<init>(MoBIEViewer.java:87)
    at de.embl.cba.mobie.ui.viewer.MoBIEViewer.<init>(MoBIEViewer.java:52)
    at de.embl.cba.mobie.ui.command.OpenPlatyBrowserCommand.run(OpenPlatyBrowserCommand.java:16)
    at org.scijava.command.CommandModule.run(CommandModule.java:196)
    at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124)
    at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63)
    at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at net.imglib2.cache.ref.WeakRefLoaderCache.get(WeakRefLoaderCache.java:112)
    at net.imglib2.cache.ref.BoundedSoftRefLoaderCache.get(BoundedSoftRefLoaderCache.java:54)
    at net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:43)
    at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:41)
    ... 29 more
Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.Gson.fromJson(Gson.java:944)
    at com.google.gson.Gson.fromJson(Gson.java:897)
    at org.janelia.saalfeldlab.n5.GsonAttributesParser.readAttributes(GsonAttributesParser.java:115)
    at org.janelia.saalfeldlab.n5.s3.N5AmazonS3Reader.getAttributes(N5AmazonS3Reader.java:237)
    at org.janelia.saalfeldlab.n5.AbstractGsonReader.getDatasetAttributes(AbstractGsonReader.java:81)
    at de.embl.cba.mobie.n5.N5ImageLoader$SetupImgLoader.prepareCachedImage(N5ImageLoader.java:277)
    at de.embl.cba.mobie.n5.N5ImageLoader$SetupImgLoader.getVolatileImage(N5ImageLoader.java:221)
    at bdv.VolatileSpimSource.getImage(VolatileSpimSource.java:71)
    at bdv.AbstractSpimSource.lambda$new$0(AbstractSpimSource.java:163)
    at net.imglib2.cache.ref.WeakRefLoaderCache.get(WeakRefLoaderCache.java:102)
    ... 32 more
Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $
    at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:386)
    at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183)
    at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
    at com.google.gson.Gson.fromJson(Gson.java:932)
    ... 41 more
HernandoMV commented 4 years ago

I am getting that one plus additional ones:

[INFO] Reading available sites from https://imagej.net/ [INFO] Reading available sites from https://imagej.net/ Adding source: sbem-6dpf-1-whole-raw... Exception in thread "PainterThread" java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.amazonaws.services.s3.model.AmazonS3Exception: Service Unavailable (Service: Amazon S3; Status Code: 503; Error Code: 503 Service Unavailable; Request ID: 16439CB8DA32B7A6; S3 Extended Request ID: null; Proxy: null), S3 Extended Request ID: null at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:45) at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:230) at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:222) at bdv.tools.transformation.TransformedSource.getSource(TransformedSource.java:218) at de.embl.cba.bdv.utils.sources.LazySpimSource.getSource(LazySpimSource.java:119) at bdv.tools.transformation.TransformedSource.getSource(TransformedSource.java:218) at bdv.viewer.render.MultiResolutionRenderer.prefetch(MultiResolutionRenderer.java:813) at bdv.viewer.render.MultiResolutionRenderer.createSingleSourceVolatileProjector(MultiResolutionRenderer.java:764) at bdv.viewer.render.MultiResolutionRenderer.createSingleSourceProjector(MultiResolutionRenderer.java:724) at bdv.viewer.render.MultiResolutionRenderer.createProjector(MultiResolutionRenderer.java:651) at bdv.viewer.render.MultiResolutionRenderer.paint(MultiResolutionRenderer.java:510) at bdv.viewer.ViewerPanel.paint(ViewerPanel.java:482) at net.imglib2.ui.PainterThread.run(PainterThread.java:86) Caused by: java.util.concurrent.ExecutionException: com.amazonaws.services.s3.model.AmazonS3Exception: Service Unavailable (Service: Amazon S3; Status Code: 503; Error Code: 503 Service Unavailable; Request ID: 16439CB8DA32B7A6; S3 Extended Request ID: null; Proxy: null), S3 Extended Request ID: null at net.imglib2.cache.ref.WeakRefLoaderCache.get(WeakRefLoaderCache.java:112) at net.imglib2.cache.ref.BoundedSoftRefLoaderCache.get(BoundedSoftRefLoaderCache.java:54) at net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:43) at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:41) ... 12 more Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: Service Unavailable (Service: Amazon S3; Status Code: 503; Error Code: 503 Service Unavailable; Request ID: 16439CB8DA32B7A6; S3 Extended Request ID: null; Proxy: null), S3 Extended Request ID: null at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1811) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleServiceErrorResponse(AmazonHttpClient.java:1395) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1371) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1145) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:802) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:770) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:744) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:704) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:686) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:550) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:530) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5062) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5008) at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:1338) at com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:1312) at com.amazonaws.services.s3.AmazonS3Client.doesObjectExist(AmazonS3Client.java:1393) at org.janelia.saalfeldlab.n5.s3.N5AmazonS3Reader.getAttributes(N5AmazonS3Reader.java:233) at org.janelia.saalfeldlab.n5.AbstractGsonReader.getDatasetAttributes(AbstractGsonReader.java:81) at de.embl.cba.mobie.n5.N5ImageLoader$SetupImgLoader.prepareCachedImage(N5ImageLoader.java:277) at de.embl.cba.mobie.n5.N5ImageLoader$SetupImgLoader.getVolatileImage(N5ImageLoader.java:221) at bdv.VolatileSpimSource.getImage(VolatileSpimSource.java:71) at bdv.AbstractSpimSource.lambda$new$0(AbstractSpimSource.java:163) at net.imglib2.cache.ref.WeakRefLoaderCache.get(WeakRefLoaderCache.java:102) ... 15 more [ERROR] Module threw exception java.lang.RuntimeException: java.util.concurrent.ExecutionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:45) at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:230) at bdv.AbstractSpimSource.getSource(AbstractSpimSource.java:222) at bdv.tools.transformation.TransformedSource.getSource(TransformedSource.java:218) at de.embl.cba.bdv.utils.sources.LazySpimSource.getSource(LazySpimSource.java:119) at bdv.tools.transformation.TransformedSource.getSource(TransformedSource.java:218) at bdv.tools.InitializeViewerState.initTransform(InitializeViewerState.java:118) at bdv.tools.InitializeViewerState.initTransform(InitializeViewerState.java:79) at bdv.util.BdvHandle.tryInitTransform(BdvHandle.java:195) at bdv.util.BdvHandle.add(BdvHandle.java:179) at bdv.util.BdvFunctions.addSource(BdvFunctions.java:585) at bdv.util.BdvFunctions.show(BdvFunctions.java:196) at de.embl.cba.mobie.ui.viewer.SourcesPanel.showIntensitySource(SourcesPanel.java:387) at de.embl.cba.mobie.ui.viewer.SourcesPanel.addSourceToViewer(SourcesPanel.java:364) at de.embl.cba.mobie.ui.viewer.SourcesPanel.addSourceToPanelAndViewer(SourcesPanel.java:339) at de.embl.cba.mobie.ui.viewer.SourcesPanel.addSourceToPanelAndViewer(SourcesPanel.java:296) at de.embl.cba.mobie.bookmark.BookmarksManager.addSourcesToPanelAndViewer(BookmarksManager.java:53) at de.embl.cba.mobie.bookmark.BookmarksManager.setView(BookmarksManager.java:35) at de.embl.cba.mobie.ui.viewer.MoBIEViewer.(MoBIEViewer.java:99) at de.embl.cba.mobie.ui.viewer.MoBIEViewer.(MoBIEViewer.java:50) at de.embl.cba.mobie.ui.command.OpenPlatyBrowserCommand.run(OpenPlatyBrowserCommand.java:16) at org.scijava.command.CommandModule.run(CommandModule.java:196) at org.scijava.module.ModuleRunner.run(ModuleRunner.java:165) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:124) at org.scijava.module.ModuleRunner.call(ModuleRunner.java:63) at org.scijava.thread.DefaultThreadService.lambda$wrap$2(DefaultThreadService.java:225) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748) Caused by: java.util.concurrent.ExecutionException: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at net.imglib2.cache.ref.WeakRefLoaderCache.get(WeakRefLoaderCache.java:112) at net.imglib2.cache.ref.BoundedSoftRefLoaderCache.get(BoundedSoftRefLoaderCache.java:54) at net.imglib2.cache.util.LoaderCacheAsCacheAdapter.get(LoaderCacheAsCacheAdapter.java:43) at net.imglib2.cache.util.CacheAsUncheckedCacheAdapter.get(CacheAsUncheckedCacheAdapter.java:41) ... 29 more Caused by: com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.Gson.fromJson(Gson.java:944) at com.google.gson.Gson.fromJson(Gson.java:897) at org.janelia.saalfeldlab.n5.GsonAttributesParser.readAttributes(GsonAttributesParser.java:115) at org.janelia.saalfeldlab.n5.s3.N5AmazonS3Reader.getAttributes(N5AmazonS3Reader.java:237) at org.janelia.saalfeldlab.n5.AbstractGsonReader.getDatasetAttributes(AbstractGsonReader.java:81) at de.embl.cba.mobie.n5.N5ImageLoader$SetupImgLoader.prepareCachedImage(N5ImageLoader.java:277) at de.embl.cba.mobie.n5.N5ImageLoader$SetupImgLoader.getVolatileImage(N5ImageLoader.java:221) at bdv.VolatileSpimSource.getImage(VolatileSpimSource.java:71) at bdv.AbstractSpimSource.lambda$new$0(AbstractSpimSource.java:163) at net.imglib2.cache.ref.WeakRefLoaderCache.get(WeakRefLoaderCache.java:102) ... 32 more Caused by: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was STRING at line 1 column 1 path $ at com.google.gson.stream.JsonReader.beginObject(JsonReader.java:386) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:183) at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) at com.google.gson.Gson.fromJson(Gson.java:932) ... 41 more

constantinpape commented 4 years ago

It looks like there are again some issues with the S3 server; maybe that explains these errors.

constantinpape commented 4 years ago

This was indeed due to issues with the S3 server and should be fixed now. @HernandoMV I am closing this, if you run into more issues just reopen this.