Getting 500 Error in Sandbox


(Joe Nova) #1

Is the sandbox down? Debugging the request/response returns this:

2016-01-16 10:06:06 DwollaPHP: An error has occurred during a POST request.
Request Body:
2016-01-16 10:06:06 GET /error/servererror?aspxerrorpath=%2Foauth%2Fv2%2Ftoken HTTP/1.1
Host: uat.dwolla.com
Content-Type: application/json
User-Agent: dwolla-php/2
2016-01-16 10:06:06 Server Response:
2016-01-16 10:06:06 HTTP/1.1 500 Internal Server Error
Server: cloudflare-nginx
Date: Sat, 16 Jan 2016 15:06:06 GMT
Content-Type: text/html; charset=utf-8
Content-Length: 1929
Connection: keep-alive
Set-Cookie: __cfduid=d4fd7e1b2d78df9edd64d0b5d6ce8b0641452956765; expires=Sun, 15-Jan-17 15:06:05 GMT; path=/; domain=.dwolla.com; HttpOnly, dtid=52483749-6942-44be-b248-1828a0f73340; expires=Fri, 16-Jan-2026 15:06:06 GMT; path=/; secure; HttpOnly
Cache-Control: private
p3p: CP="CAO PSA OUR"
Strict-Transport-Security: max-age=31536000
CF-RAY: 265ab8eaded006a9-EWR


(DrewBaker) #2

I haven’t been able to register a sandbox account for a week now, keep getting the Koala of death after the register/business information form.


(Spencer Hunter) #3

@drewbaker, Thanks for reporting this and apologies for the inconvenience. I have passed this along to the team to look into. Can you attempt to register for an account by navigating here? https://uat.dwolla.com/Sandbox

I am curious which link are you clicking on to create an account in UAT? We shouldn’t be navigating to /register/business


(Spencer Hunter) #4

@novawebllc, Which endpoint are you calling when you encounter this error? Are you using dwolla-php to refresh OAuth authorization?


(DrewBaker) #5

Spencer, that is the URL I use. But I seem to be stuck in this “email exists”, but company isn’t registered loop. So I can’t “sign-up”, I have to “login”. Can you just delete my Sandbox account all together and I’ll start again?


(Spencer Hunter) #6

@drewbaker, Your email should be freed up now. Can you give the signup another shot and post back if you run into issues?


(DrewBaker) #7

Thanks Spencer, finally worked for me!

But now I’m getting the same 500 error Joe was seeing. I’m trying to refresh a token by doing a POST to https://uat.dwolla.com/oauth/v2/token, and I get the below response. I’m just doing a straight CURL request.

I also tried this in Postman, and got the same Koala of Death screen.

array(5) {
  ["headers"]=>
  array(9) {
    ["server"]=>
    string(16) "cloudflare-nginx"
    ["date"]=>
    string(29) "Sun, 17 Jan 2016 07:58:03 GMT"
    ["content-type"]=>
    string(24) "text/html; charset=utf-8"
    ["content-length"]=>
    string(4) "1929"
    ["connection"]=>
    string(5) "close"
    ["cache-control"]=>
    string(7) "private"
    ["p3p"]=>
    string(16) "CP="CAO PSA OUR""
    ["strict-transport-security"]=>
    string(16) "max-age=31536000"
    ["cf-ray"]=>
    string(20) "266083471fee217a-EWR"
  }
  ["body"]=>
  string(1929) "

THIS IS THE HTML FOR THE KOALA OF DEATH, I CAN'T PASTE IT IN OR IT BREAKS

"
  ["response"]=>
  array(2) {
    ["code"]=>
    int(500)
    ["message"]=>
    string(21) "Internal Server Error"
  }
  ["cookies"]=>
  array(2) {
    [0]=>
    object(WP_Http_Cookie)#83 (6) {
      ["name"]=>
      string(8) "__cfduid"
      ["value"]=>
      string(43) "d6ed880857cbae425614317ff1a7a16df1453017483"
      ["expires"]=>
      int(1484553483)
      ["path"]=>
      string(1) "/"
      ["domain"]=>
      string(11) ".dwolla.com"
      ["httponly"]=>
      string(0) ""
    }
    [1]=>
    object(WP_Http_Cookie)#82 (6) {
      ["name"]=>
      string(4) "dtid"
      ["value"]=>
      string(36) "aebe4572-ae86-458b-bd06-9886231b84dd"
      ["expires"]=>
      int(1768636683)
      ["path"]=>
      string(1) "/"
      ["domain"]=>
      string(14) "uat.dwolla.com"
      ["httponly"]=>
      string(0) ""
    }
  }
  ["filename"]=>
  NULL
}


(Jam2z9) #8

I’m getting the same exact error on the endpoint. The flow was working until yesterday and now it’s returning:

stdClass Object
(

[error] => missing schema

[code] => -1002
[redirect_code] => 302
[redirect_url] => /error/servererror?aspxerrorpath=/oauth/v2/token
)

I hit it with postman as well and am getting a 500 for koala of death.


(DrewBaker) #9

Still getting it this morning, and also at https://www.dwolla.com/oauth/v2/token. Seems like UAT and production are down.


(DrewBaker) #10

Not sure if any of this is relevant, just me trying to check things out.

Whats super strange, is if you just go to https://www.dwolla.com/oauth/v2/token in your browser, you get the correct JSON {"error":"access_denied","error_description":"Invalid application credentials."} response. Which is strange, because that would be a GET request to an endpoint that should only be a POST.

But then if you do a GET to https://api.dwolla.com/customers you get a file not found displayed.


(Spencer Hunter) #11

@drewbaker, Apologies for the issues surrounding the token endpoint in UAT. We’re working on a fix and should be back up and running shortly. I’ll post back to this thread with updates…


(DrewBaker) #12

I also ran into an issue where the oAuth endpoints wouldn’t work if you had Content-Type: application/vnd.dwolla.v1.hal+json headers set. It needed to be Content-Type: application/json which is super confusing because all the other endpoints use your Dwolla header.


(Spencer Hunter) #13

@drewbaker, The fix has been deployed to UAT. You should now be able to exchange an OAuth authorization code or refresh token for a new token set.

I understand the confusion and appreciate this feedback. I’ll work on updating the documentation to add clarity on this topic. Right now, API v1 and API v2 share the same token endpoint which exists in UAT as https://uat.dwolla.com/oauth/v2/token and prod as https://www.dwolla.com/oauth/v2/token.


(Joe Nova) #14

Wow. I have to apologize for the lack of communication here. I had created an account a few months back which I tried logging into on the 16th but that didn’t seem to work so I ended up creating a new account using my Gmail account which I never check, ha. At least this situation has caused me to enable mail forwarding!

Anyway, I haven’t checked UAT since the issue occurred. I ended up writing in some override code to bypass the Dwolla auth altogether (I was testing another feature of my application in which a Dwolla auth was not required for testing purposes).

When I get a chance I will let you know and update this thread though I assume it’s been fixed based on the earlier replies.

Also, @spencer , yes I was using the PHP library. Thanks for the fast replies even though I didn’t get to utilize them due to my own negligence, haha.


(Harsh Doug) #15

I tried to create some test accounts today, and I kept getting errors.


(Spencer Hunter) #16

@HarshDoug, Thank you for reporting this issue, and apologies for the inconvenience. I have relayed this on to the team to investigate further. I’ll reply back to this thread with any updates.


(Spencer Hunter) #17

@HarshDoug, This issue should now be fixed! Can you give the test account creation another shot and post back if you run into issues?


(Harsh Doug) #18

@spencer, yes, it worked! Thanks for the help.


(Jam2z9) #19

@spencer – Getting a 500 again in UAT on the /token endpoint.

The response I’m getting back from PHP :

Array
(
    [error] => missing schema
    [code] => -1002
)

(Spencer Hunter) #20

@jam2z9, I was not able to reproduce the issue, and there are no reported issues in UAT at this time. Reply back to this thread if you run into a 500 in UAT again and we can debug further!