dwyl / github-backup

:octocat: :back: 🆙 Backup your GitHub Issues so you can still work when (they/you are) offline.
https://github-backup.herokuapp.com
GNU General Public License v2.0
31 stars 3 forks source link

500 Error when attempting to POST /event/new #114

Closed nelsonic closed 6 years ago

nelsonic commented 6 years ago

Followed the instructions in the README.md ... When I got to the point of authorising the App on my repo (dwyl/hits-elixir) I see a the following error in Terminal: image

[info] Sent 500 in 4226ms
[error] #PID<0.484.0> running AppWeb.Endpoint terminated
Server: 38e239f0.ngrok.io:80 (http)
Request: POST /event/new
** (exit) an exception was raised:
    ** (ArgumentError) argument error
        (stdlib) binary.erl:275: :binary.replace/4
        (ex_aws) lib/ex_aws/auth/utils.ex:7: ExAws.Auth.Utils.uri_encode/1
        (ex_aws) lib/ex_aws/auth.ex:85: ExAws.Auth.auth_header/7
        (ex_aws) lib/ex_aws/auth.ex:39: ExAws.Auth.headers/6
        (ex_aws) lib/ex_aws/request.ex:27: ExAws.Request.request_and_retry/7
        (ex_aws) lib/ex_aws/operation/s3.ex:40: ExAws.Operation.ExAws.Operation.S3.perform/2
        (elixir) lib/enum.ex:737: Enum."-each/2-lists^foreach/1-0-"/2
        (elixir) lib/enum.ex:737: Enum.each/2
        (app) lib/app_web/controllers/event_type_handlers.ex:91: AppWeb.EventTypeHandlers.new_installation/2
        (app) lib/app_web/controllers/event_controller.ex:1: AppWeb.EventController.action/2
        (app) lib/app_web/controllers/event_controller.ex:1: AppWeb.EventController.phoenix_controller_pipeline/2
        (app) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.instrument/4
        (phoenix) lib/phoenix/router.ex:278: Phoenix.Router.__call__/1
        (app) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.plug_builder_call/2
        (app) lib/plug/debugger.ex:99: AppWeb.Endpoint."call (overridable 3)"/2
        (app) lib/app_web/endpoint.ex:1: AppWeb.Endpoint.call/2
        (plug) lib/plug/adapters/cowboy/handler.ex:15: Plug.Adapters.Cowboy.Handler.upgrade/4
        (cowboy) /code/github-backup/deps/cowboy/src/cowboy_protocol.erl:442: :cowboy_protocol.execute/4

Have either of you come across this error? I think it's because I have /event/new defined as my User authorization callback URL ... what should I have instead for this?

nelsonic commented 6 years ago

Figured it out. didn't have S3_BUCKET_NAME env var configured properly. 😸