New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image Uploads do not work on Heroku #211

Closed
pkarjala opened this Issue May 7, 2015 · 5 comments

Comments

Projects
None yet
3 participants
@pkarjala
Copy link
Contributor

pkarjala commented May 7, 2015

It returns an error which we'll have to check the Heroku logs for.

@marknelsonengineer

This comment has been minimized.

Copy link
Contributor

marknelsonengineer commented May 7, 2015

Here's the Heroku log for an image upload into Magician via https

2015-05-07T06:38:27.290466+00:00 heroku[router]: at=info method=POST path="/editMagician" host=www.playwithmagic.org request_id=f9c0fedc-922d-4c54-aa25-455adb58a009 fwd="72.234.172.107" dyno=web.1 connect=4ms service=1064ms status=500 bytes=2060
2015-05-07T06:38:27.228212+00:00 app[web.1]: [debug] application - postMagician Raw Magician Form Data
2015-05-07T06:38:27.228880+00:00 app[web.1]: [debug] application -   firstName = [Mark]
2015-05-07T06:38:27.276095+00:00 app[web.1]: [debug] application - postMagician Magician Form Data
2015-05-07T06:38:27.286195+00:00 app[web.1]: [error] application -
2015-05-07T06:38:27.286198+00:00 app[web.1]:
2015-05-07T06:38:27.286200+00:00 app[web.1]: ! @6m46p6lkp - Internal server error, for (POST) [/editMagician] ->
2015-05-07T06:38:27.286201+00:00 app[web.1]:
2015-05-07T06:38:27.286202+00:00 app[web.1]: play.api.Application$$anon$1: Execution exception[[NullPointerException: null]]
2015-05-07T06:38:27.286204+00:00 app[web.1]:    at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:38:27.228584+00:00 app[web.1]: [debug] application -   id = [1]
2015-05-07T06:38:27.229111+00:00 app[web.1]: [debug] application -   magicianType = [Semi-Professional]
2015-05-07T06:38:27.276245+00:00 app[web.1]: [debug] application -   id = [1]
2015-05-07T06:38:27.276320+00:00 app[web.1]: [debug] application -   firstName = [Mark]
2015-05-07T06:38:27.276359+00:00 app[web.1]: [debug] application -   magicianType = [Semi-Professional]
2015-05-07T06:38:27.276412+00:00 app[web.1]: [debug] application -   imageId = [21]
2015-05-07T06:38:27.284711+00:00 app[web.1]: [error] play - Cannot invoke the action, eventually got an error: java.lang.NullPointerException
2015-05-07T06:38:27.286205+00:00 app[web.1]:    at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:38:27.286208+00:00 app[web.1]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:38:27.286209+00:00 app[web.1]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:38:27.286211+00:00 app[web.1]:    at scala.Option.map(Option.scala:145) [org.scala-lang.scala-library-2.11.1.jar:na]
2015-05-07T06:38:27.286212+00:00 app[web.1]: Caused by: java.lang.NullPointerException: null
2015-05-07T06:38:27.286213+00:00 app[web.1]:    at models.Magician.createMagicianFromForm(Magician.java:681) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]
2015-05-07T06:38:27.286215+00:00 app[web.1]:    at controllers.Application.postMagician(Application.java:358) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]
2015-05-07T06:38:27.286217+00:00 app[web.1]:    at Routes$$anonfun$routes$1$$anonfun$applyOrElse$17$$anonfun$apply$17.apply(routes_routing.scala:404) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:na]
2015-05-07T06:38:27.286218+00:00 app[web.1]:    at Routes$$anonfun$routes$1$$anonfun$applyOrElse$17$$anonfun$apply$17.apply(routes_routing.scala:404) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:na]
2015-05-07T06:38:27.286220+00:00 app[web.1]:    at play.core.Router$HandlerInvokerFactory$$anon$4.resultCall(Router.scala:264) ~[com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
@pkarjala

This comment has been minimized.

Copy link
Contributor

pkarjala commented May 7, 2015

There's the pertinent lines:

at models.Magician.createMagicianFromForm(Magician.java:681) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]

at controllers.Application.postMagician(Application.java:358) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]

@marknelsonengineer

This comment has been minimized.

Copy link
Contributor

marknelsonengineer commented May 7, 2015

...and here's the same operation in http (so it's not the crypto).

2015-05-07T06:42:47.204300+00:00 app[web.1]: [debug] application - postMagician Raw Magician Form Data
2015-05-07T06:42:47.204827+00:00 app[web.1]: [debug] application -   firstName = [Mark]
2015-05-07T06:42:47.204960+00:00 app[web.1]: [debug] application -   magicianType = [Semi-Professional]
2015-05-07T06:42:47.222019+00:00 app[web.1]: [debug] application - postMagician Magician Form Data
2015-05-07T06:42:47.230430+00:00 app[web.1]: [error] application -
2015-05-07T06:42:47.230432+00:00 app[web.1]:
2015-05-07T06:42:47.230434+00:00 app[web.1]: ! @6m46plg8m - Internal server error, for (POST) [/editMagician] ->
2015-05-07T06:42:47.230435+00:00 app[web.1]:
2015-05-07T06:42:47.230436+00:00 app[web.1]: play.api.Application$$anon$1: Execution exception[[NullPointerException: null]]
2015-05-07T06:42:47.230439+00:00 app[web.1]:    at play.api.Application$class.handleError(Application.scala:296) ~[com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:42:47.230441+00:00 app[web.1]:    at play.api.DefaultApplication.handleError(Application.scala:402) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:42:47.230442+00:00 app[web.1]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:42:47.230444+00:00 app[web.1]:    at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:42:47.230445+00:00 app[web.1]:    at scala.Option.map(Option.scala:145) [org.scala-lang.scala-library-2.11.1.jar:na]
2015-05-07T06:42:47.230446+00:00 app[web.1]: Caused by: java.lang.NullPointerException: null
2015-05-07T06:42:47.230448+00:00 app[web.1]:    at models.Magician.createMagicianFromForm(Magician.java:681) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]
2015-05-07T06:42:47.230449+00:00 app[web.1]:    at controllers.Application.postMagician(Application.java:358) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]
2015-05-07T06:42:47.230451+00:00 app[web.1]:    at Routes$$anonfun$routes$1$$anonfun$applyOrElse$17$$anonfun$apply$17.apply(routes_routing.scala:404) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:na]
2015-05-07T06:42:47.230452+00:00 app[web.1]:    at Routes$$anonfun$routes$1$$anonfun$applyOrElse$17$$anonfun$apply$17.apply(routes_routing.scala:404) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:na]
2015-05-07T06:42:47.230453+00:00 app[web.1]:    at play.core.Router$HandlerInvokerFactory$$anon$4.resultCall(Router.scala:264) ~[com.typesafe.play.play_2.11-2.3.8.jar:2.3.8]
2015-05-07T06:42:47.204595+00:00 app[web.1]: [debug] application -   id = [1]
2015-05-07T06:42:47.222196+00:00 app[web.1]: [debug] application -   id = [1]
2015-05-07T06:42:47.222271+00:00 app[web.1]: [debug] application -   firstName = [Mark]
2015-05-07T06:42:47.222309+00:00 app[web.1]: [debug] application -   magicianType = [Semi-Professional]
2015-05-07T06:42:47.222348+00:00 app[web.1]: [debug] application -   imageId = [22]
2015-05-07T06:42:47.229400+00:00 app[web.1]: [error] play - Cannot invoke the action, eventually got an error: java.lang.NullPointerException
2015-05-07T06:42:47.225446+00:00 heroku[router]: at=info method=POST path="/editMagician" host=www.playwithmagic.org request_id=0151753b-d5ce-4196-85f2-3ee300075e18 fwd="72.234.172.107" dyno=web.1 connect=0ms service=945ms status=500 bytes=2060
@pkarjala

This comment has been minimized.

Copy link
Contributor

pkarjala commented May 7, 2015

Yea, same two lines:

at models.Magician.createMagicianFromForm(Magician.java:681) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]

at controllers.Application.postMagician(Application.java:358) ~[playwithmagic.playwithmagic-1.0-SNAPSHOT.jar:2.3.8]

At least we know where to hunt!

@davidkneely davidkneely changed the title Image Uploads to not work on Heroku Image Uploads do not work on Heroku May 9, 2015

davidkneely added a commit that referenced this issue May 9, 2015

@marknelsonengineer

This comment has been minimized.

Copy link
Contributor

marknelsonengineer commented May 10, 2015

Deployed to Heroku. Tested in all three locations of images: Magicians, Routines and Material. Looks good. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment