6

I use the google cloud endpoints configuration as

https://cloud.google.com/appengine/docs/python/endpoints/test_deploy

exactly, I run google chrome with flag

--user-data-dir=temp --unsafely-treat-insecure-origin-as-secure=http://localhost:8080

as

https://developers.google.com/explorer-help/#hitting_local_api

then, Google Chrome say me

You are using an unsupported command-line (--unsafely-treat-insecure-origin-as-secure) flag. Stability and security will suffer

If I visit

_http://localhost:8080/_ah/api/explorer

then I get the error:

The API you are exploring is hosted over HTTP, which can cause problems. Learn how to use Explorer with a local HTTP API .

I try to add --test-type flag as

_http://stackoverflow.com/questions/32042187/chrome-error-you-are-using-an-unsupported-command-line-flag-ignore-certifcat

then google chrome dont say anything, but when I visit

_http://localhost:8080/_ah/api/explorer

I get the same error.

my app works fine in localhost except the endpoints part, and all works fine in appspot.com (endpoints too)

I use the last version of:

  • Python 2.7.11
  • App Engine SDK 1.9.35
  • Google Chrome 49.0.2623.110

thank you and sorry for my english

3 Answers3

5
  1. Click the shield button in Chrome's url bar.

Chrome Google Cloud Endpoints API Explorer: load scripts

  1. Click "Load unsafe scripts".
  2. Click services (on the left bar) to reload the page.
Alex
  • 18,484
  • 8
  • 60
  • 80
1

I tried troubleshooting this issue when it first started happening for me. I quickly gave up and decided to just use another browser for the API explorer on localhost. IE 11 works for me. This isn't a great answer, but if you have other browsers installed, give them a try.

Eric Simonton
  • 5,702
  • 2
  • 37
  • 54
  • Unfortunatelly, IE11 on W10 shows the same error. I tried also Firefox 47.0 result is the same, Microsoft Edge shows nothing. – Grzegorz Bielański Jul 19 '16 at 18:17
  • Just to clarify, I still see the red banner than says `The API you are exploring is hosted over HTTP, which can cause problems` in IE. But unlike in Chrome, after I click past a warning or two, it still works. – Eric Simonton Jul 19 '16 at 23:59
  • It works for me. I have warning window displayed on the bottom with something like "It is shown only secure content". I have to press button "Show all content" and then works. There is also described solution for Chrome by @Alex but your tip is also good workaround. – Grzegorz Bielański Jul 20 '16 at 10:33
0

While Alex has the best answer, I'd just like to point out that this is only a problem with the API Explorer (which can definitely be handy).

But it doesn't affect direct calls to the API itself. So the URL below works fine without having to open a special sandbox chrome app or changing the script settings

localhost:8080/_ah/api/greeting/v1/greetings/1
Plasty Grove
  • 2,807
  • 5
  • 31
  • 42