conveyal / analysis-backend

Server component of Conveyal Analysis
http://conveyal.com/analysis
MIT License
23 stars 12 forks source link

Aggregation areas upload error #249

Closed javandres closed 4 years ago

javandres commented 4 years ago

Hello, congratulations for this great tool, I have successfully configured and installed the backend and ui and it is working fine until the analysis is done, I have created the region, project, opportunities, modifications and run the analysis and regional analysis without problem.

However, when I try to load aggregation areas I get the error shown below,

I have tried with version 5.7 and the master branch and I have the same resultsdo, I use ui version v4.12.0

The file I am trying to load is a shape file of polygons with crs 4326 that complies with what the documentation specifies.

Please advice me on this.

The error is:

java.lang.NullPointerException at com.conveyal.taui.controllers.AggregationAreaController.createAggregationArea(AggregationAreaController.java:65) at spark.ResponseTransformerRouteImpl$1.handle(ResponseTransformerRouteImpl.java:47) at spark.http.matching.Routes.execute(Routes.java:61) at spark.http.matching.MatcherFilter.doFilter(MatcherFilter.java:130) at spark.embeddedserver.jetty.JettyHandler.doHandle(JettyHandler.java:50) at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1568) at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132) at org.eclipse.jetty.server.Server.handle(Server.java:564) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:358) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:110) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124) at org.eclipse.jetty.util.thread.Invocable.invokePreferred(Invocable.java:128) at org.eclipse.jetty.util.thread.Invocable$InvocableExecutor.invoke(Invocable.java:222) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:294) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:199) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:673) at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:591) at java.lang.Thread.run(Thread.java:748)

ansoncfit commented 4 years ago

Thanks for the report, @javandres. We're looking into this now.

ansoncfit commented 4 years ago

Another aggregation area upload error:

Access to fetch at 'https://staging-api.conveyal.com/api/region/.../aggregationArea' from origin 'https://analysis-staging.conveyal.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

ansoncfit commented 4 years ago

I can't reproduce the NPE using analysis-backend v5.9.0, so I'm closing this for now. The issue in my previous comment is being tracked at https://github.com/conveyal/analysis-ui/issues/1059

javandres commented 4 years ago

I've changed the line 137 in AggregationAreaController S3Util.s3.putObject(AnalysisServerConfig.gridBucket, aggregationArea.getS3Key(), is, metadata); by s3.putObject(AnalysisServerConfig.gridBucket, aggregationArea.getS3Key(), is, metadata); and worked for me