Troubleshooting Response Errors

Viewing the logs

App Engine may take a few minutes to respond successfully to requests. If you send a request and get back an HTTP 502, 503, or some other server error, wait a minute and try the request again.

If you do not get a successful response after waiting a few minutes, or if you got some other response error, use the Stackdriver logs to help troubleshoot.

  1. Go to the Stackdriver > Logging page in the GCP Console:

    Go to the Logs Viewer page

  2. Select the GCP project at the top of the page.

  3. Select GAE Application and request_log from the drop-down menus.

  4. Adjust the time range until you see a row that shows your response error.

  5. Click Expand All to see the entire log for the response error.

  6. If you are unable to fix the issue, copy one of the log entries that shows the error and paste it in a text file. Include the log in any communication that you have with Google.

See the following for more information:

Issues with the example Invoke-WebRequest

In some versions of Windows PowerShell, the example Invoke-WebRequest in the tutorials fails. We have also received a report that the response contained a list of unsigned bytes that had to be converted to characters. If the example Invoke-WebRequest didn't return the expected result, try sending the request using another application. Following are a few suggestions:

  • Start Cloud Shell, and follow the Linux steps in the tutorial that you were using to send the request.
  • Use a third-party application such as the Chrome browser extension Postman (offered by www.getpostman.com). When creating the request in Postman:

    • Select POST as the HTTP verb.
    • For the header, select the key content-type and the value application/json.
    • For the body, enter one of the following depending on which tutorial you are using:

      • For the Java tutorial: {"message":"hello world"}
      • For the Python tutorial: {"content":"hello world"}
    • Enter the URL to the sample application. For example:

      https://example-project-12345.appspot.com/_ah/api/echo/v1/echo
      
  • Download and install curl, which you run in the Command Prompt. Because Windows does not handle double quotation marks nested inside single quotation marks, you have to change the --data option in the example, as follows:

    • For the Java tutorial: --data "{\"message\":\"hello world\"}"
    • For the Python tutorial: --data "{\"content\":\"hello world\"}"
Was this page helpful? Let us know how we did:

Send feedback about...

Cloud Endpoints Frameworks for App Engine
Need help? Visit our support page.