Skip to content
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

gapi.client.load() failed .. 404 (Not Found) #147

Closed
wonderfly opened this issue Jan 7, 2015 · 66 comments
Closed

gapi.client.load() failed .. 404 (Not Found) #147

wonderfly opened this issue Jan 7, 2015 · 66 comments

Comments

@wonderfly
Copy link
Contributor

From vegaquem...@gmail.com on May 22, 2014 21:24:42

it seems trying to access an url with double '/_ah/api' paths: https://xxxxx.appspot.com/_ah/api/_ah/api/discovery/v1/apis/..... .

Original issue: http://code.google.com/p/google-api-javascript-client/issues/detail?id=147

@wonderfly
Copy link
Contributor Author

From renw...@google.com on May 22, 2014 21:41:21

I'm deving right now and seeing the same issue on dev_appserver.py. Was there a client.js rollout in the last 30 minutes?

My url looks like:
GET http://localhost:8080/_ah/api/_ah/api/discovery/v1/apis/xxxxxx/v1.0/rpc?fields=methods%2F*%2Fid&pp=0 404 (OK)

@wonderfly wonderfly self-assigned this Jan 7, 2015
@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 22, 2014 21:43:28

What do the parameters of the gapi.client.load call look like?

@wonderfly
Copy link
Contributor Author

From vegaquem...@gmail.com on May 22, 2014 21:46:11

this is my code:
var ROOT = '//'+window.location.host +'/_ah/api';
gapi.client.load('testService', 'v1', function() {
....
}, ROOT);

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 22, 2014 22:03:05

The problem you're seeing is real and we're investigating. Thank you for your report.

@wonderfly
Copy link
Contributor Author

From jorge.sa...@gmail.com on May 22, 2014 22:03:14

Same here, just stop working minutes ago, it gives me 404, then tries again and load the url, but the gapi.client does not have the api so it gives me an error "Cannot read property 'photos' of undefined at null.listPhotos"

@wonderfly
Copy link
Contributor Author

From m...@marcmouallem.com on May 22, 2014 22:03:53

Same issue as well. Was working one minute and not the next, with no changes.

@wonderfly
Copy link
Contributor Author

From m...@marcmouallem.com on May 22, 2014 22:05:51

If it helps the API explore seems to be unaffected.

@wonderfly
Copy link
Contributor Author

From Jairo.Vasquez on May 22, 2014 22:10:29

Same problem here.

@wonderfly
Copy link
Contributor Author

From m...@marcmouallem.com on May 22, 2014 22:22:18

Where can we find an older version so we can get our websites back up?

@wonderfly
Copy link
Contributor Author

From help.dj...@gmail.com on May 22, 2014 22:54:20

API_URL = 'https://' + window.location.host + '/_ah/api';
...
gapi.client.load('xxxxEndpoint', 'v1', loadcb, API_URL);

I tried removing '_ah/api', but then loading /static/proxy.html fails!
I thought it was something I broke!
Is there a work around while it is being looked into?

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 22, 2014 23:17:19

I'm not aware of a workaround yet, but I will update this page if one comes to my attention.

@wonderfly
Copy link
Contributor Author

From sh...@thinkbridge.in on May 22, 2014 23:26:10

We are facing the same issue, can you please at least suggest a workaround ?

@wonderfly
Copy link
Contributor Author

From jer...@collabspot.com on May 22, 2014 23:40:08

We are having the same issue.
To make it easier to test, I deployed the sample code from : https://github.com/GoogleCloudPlatform/appengine-endpoints-helloendpoints-python to : https://tesgaeendpoints.appspot.com/ You will see the error on this page.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 23, 2014 00:03:37

We are treating this as a high priority issue. We have identified the problem and will rollback as soon as possible. Please note, however, that we do not have an ETA right now for the fix to take effect.

@wonderfly
Copy link
Contributor Author

From t.tierce...@gmail.com on May 23, 2014 00:04:26

same problem here, google api javascript client is not reliable at all, every couple of month there is a break-everything-update which leads to a rollback hours later :(

@wonderfly
Copy link
Contributor Author

From vegaquem...@gmail.com on May 23, 2014 00:09:18

this is my temporary solution...
it works on devserver, but not on AppEngine server.

// add a filter to redirect the correct uri:
if (requestURI.startsWith("/_ah/api/_ah/api")) {
((HttpServletResponse)res).sendRedirect(requestURI.substring(8));
return;
}

@wonderfly
Copy link
Contributor Author

From shan...@vedantu.com on May 23, 2014 01:05:31

I am facing the same issue.
Please let us know ASAP whenever this issue is resolved
common Google we don't expect these kind of things

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 23, 2014 01:46:36

Things should start to work again as users reach rolled back versions, so things will fix gradually within the next three hours.

@wonderfly
Copy link
Contributor Author

From vegaquem...@gmail.com on May 23, 2014 02:50:05

Yes, it works now!

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 23, 2014 03:21:36

This issue should now be completely resolved.

@wonderfly
Copy link
Contributor Author

From durgesh....@paconsulting.com on May 23, 2014 03:46:12

Issue still exists however the error I am getting is different now.

500 (Could not fetch URL: https://webapis-discovery.appspot.com/_ah/api/discovery/v1/apis/generate/rest )

It was working all fine till yesterday.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 23, 2014 03:55:46

The 500 could be an unrelated issue. Please report it so we can track it separately from this /_ah/api/_ah/api issue.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 23, 2014 10:36:23

Status: Accepted
Owner: bsittler@google.com
Cc: j...@google.com fa...@google.com
Labels: -Priority-Medium Priority-Critical

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on May 23, 2014 10:37:14

Status: Fixed

@wonderfly
Copy link
Contributor Author

From aks.gupt...@gmail.com on August 28, 2014 05:00:29

gapi.client.load is not working..

function init() {
makeRequest();
}

function makeRequest() {
gapi.client.setApiKey('myapikey');
gapi.client.load('plus', 'v1', function () {
var request = gapi.client.plus.activities.list({
'userId': 'myid',
'maxResults': '100',
'collection': 'public'
});

    request.execute(function (data) {
        var div = document.getElementById('results');           
        for (var i = 0; i \< data.items.length; i++) {
            var activity = data.items[i];
            div.appendChild(document.createElement('P'));
            div.appendChild(document.createTextNode(activity.title));
        }
    });
});

}

@wonderfly
Copy link
Contributor Author

From shan...@vedantu.com on September 23, 2014 03:07:02

#bsittler@google.com #35
any update on the issue?

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on September 23, 2014 03:51:21

A new issue matching the original description is confirmed and currently being investigated.

Status: Accepted
Owner: j...@google.com
Cc: -j...@google.com bsittler@google.com

@wonderfly
Copy link
Contributor Author

From hir3npa...@gmail.com on September 23, 2014 06:14:58

This is currently affecting us as well, using cloud endpoints js library in a phonegap app. Please provide an ETA for a fix..

@wonderfly
Copy link
Contributor Author

From shan...@vedantu.com on September 23, 2014 07:40:53

#44 Follow below link for the google official update about this issue. https://groups.google.com/forum/#!topic/google-appengine-downtime-notify/t9GElAJwj8U

@wonderfly
Copy link
Contributor Author

From j...@google.com on September 23, 2014 08:38:18

Hi, the rollback is complete and you should no longer be seeing errors. Please empty cache and reload if you continue to see problems. Thanks.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on September 23, 2014 08:40:17

I believe a fix for this issue should now be completely rolled out. If anyone still sees the problem after clearing the browser cache and reloading we need to reopen the investigation.

Status: Fixed

@wonderfly
Copy link
Contributor Author

From m...@marcmouallem.com on September 23, 2014 12:09:47

I am just confused. We all want our code to be perfect, but that being said bugs get through to release. How does something like an entire function is broken get through? Is there any type of testing before release? I think since this is not the first time this has happened, people might want to know what the Endpoints team does to ensure such events to not continue, so that we can decide if we might migrate to another technology.

@wonderfly
Copy link
Contributor Author

From shan...@vedantu.com on December 05, 2014 00:16:01

Guys we are facing this original issues again since yesterday, is there any update on google client endpoint js library in last 2 days.
The issues is
when we are running the app in devmode as mvn appengine:devserver, all the endpoint request are getting fired to https://my-app-id.appspot.com/_ah/api/ instead of
http://localhost:8080/_ah/api/
anyone else facing the similar issue?

@wonderfly
Copy link
Contributor Author

From har...@anagram.at on December 05, 2014 02:32:36

Same problem here!

@wonderfly
Copy link
Contributor Author

From har...@anagram.at on December 05, 2014 02:34:15

<script type="text/javascript"> var init = function() { console.log("loading endpoints"); var url = '//localhost:8080/_ah/api'; gapi.client.load("myendpoint", "v1", function() { console.log("loaded url"); gapi.client.ourtab.version().then(function(resp) { console.log(JSON.stringify(resp, null, " ")); }) }, url); } </script> <script type="text/javascript" src=" https://apis.google.com/js/client.js?onload=init"></script>

This little snippet is loading and interacting with the production endpoint! That can become dangerous!

@wonderfly
Copy link
Contributor Author

From har...@anagram.at on December 05, 2014 02:52:07

i have opened a separate issue on that: https://code.google.com/p/google-api-javascript-client/issues/detail?id=175

@wonderfly
Copy link
Contributor Author

From shan...@vedantu.com on December 05, 2014 03:10:44

Seem like google people are not looking into our issues.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on December 05, 2014 10:49:40

Sorry about the inconvenience, I am investigating this issue now.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on December 05, 2014 10:55:38

As a temporary fix, you can download the API discovery document from

http://localhost:8080/_ah/api/discovery/v1/apis///rest

and modify the "rootUrl" values to point to http://localhost:8080 rather than to production servers. Then pass the resulting Discovery response as a JS object in place of the API name in the first parameter of gapi.client.load.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on December 05, 2014 11:03:13

See issue #175 https://code.google.com/p/google-api-javascript-client/issues/detail?id=175 which I believe is actually what you're seeing.

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on December 05, 2014 11:12:30

Also: Are you using Python SDK or Java SDK? Are you using the latest SDK release?

@wonderfly
Copy link
Contributor Author

From bsittler@google.com on December 05, 2014 11:13:38

In the Discovery document fetched in #55 what value do you see for rootUrl?

@alpocr
Copy link

alpocr commented Feb 27, 2015

I have same problem. I can't load my endpoint api. I'm getting a 404 error.

Here my index.html in frontend project.

<script>
function loadGapi(){
gapi.client.setApiKey('AIzaSyBvg9bSWGUHhAO-TPIww3KuK_XXXXX');
gapi.client.load('myCustomApi', 'v1', function() {
    gapi.client.myCustomApi.list().execute(function(resp) {
        console.log(resp);
    });
}, 'https://my-backend-project.appspot.com/_ah/api');
}
 </script>

<script src="https://apis.google.com/js/client.js?onload=loadGapi"> </script>

Please check I'm using two differents projects in appengine (backend and frontend project). Here I putted full description: http://stackoverflow.com/questions/28770370/load-my-custom-google-api-from-javascript-library-remote-projects

@alpocr
Copy link

alpocr commented Feb 27, 2015

Anyone from Google is watching this repo? Any update?

@smaheshbhat
Copy link

Hi,

The following call doesnt end up in this._driveApiLoaded
gapi.client.load('drive', 'v2', this._driveApiLoaded.bind(this)

Can some one please suggest any workaround if I don't want to create a back end project ?

Any pointers would be great.

@bsittler
Copy link
Contributor

bsittler commented Mar 8, 2016

Is this issue still occurring?

@CrandellWS
Copy link

+1 reviewing #175

@smaheshbhat
Copy link

Thanks for getting back to this qn. It no more occurs now. This was due to the older version of json.js loaded by my browser. However there is another question I have now for which if I get an answer, would be helpful.
In IE11, even after adding to the list of trusted sites in Google developer console for the specific key, attempt to open file picker ends up with the 401 error. Please note that in Chrome, Firefox, it works fine.

@PedroDava
Copy link

PedroDava commented Apr 20, 2016

@bsittler
Copy link
Contributor

I think that API name might be spelled wrong, can you check the spelling? I know about an "oauth" API but not "oath".

@PedroDava
Copy link

@bsittler it was that thank you...

@pupster90
Copy link

I believe I am have the same glitch that is described above. On deployment the api appears in the api explorer, but it is causing a 404 error when trying to be loaded by javascript. It works fine on the local host.

Any solutions yet?

Another person with the same problem: http://stackoverflow.com/questions/39682799/google-cloud-endpoints-api-gets-404/39692404#39692404

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

No branches or pull requests

7 participants