Fixed
Status Update
Comments
ya...@google.com <ya...@google.com>
ya...@google.com <ya...@google.com> #2
Thank you for this defect report. I will attempt to reproduce your issue. Could you possibly give me the imports you use for running this code snippet, and any other information required to reproduce your code exactly?
ni...@noovle.com <ni...@noovle.com> #3
Hello,
here are all the information I think will be useful to you.
1) I'm running on Eclipse IDE
2) On Eclipse I installed "Google Cloud Tools for Eclipse" version 1.2.0.201706082053
3) My GCloud installation is version 161.0.0 (you can find the "gcloud info" output attached)
4) I configured the Applicatio Default Credentials:https://developers.google.com/identity/protocols/application-default-credentials#toolcloudsdk
5) I attached you a full working project which can be used to reproduce the issue (urlfetch.zip)
6) If I run the dev-server using CT4E I'm getting the errore already reported (which I attached on eclipse_cloud_tools.log)
7) If I run the dev-server bypassing Eclipse and using directly Maven CLI (mvn clean appengine:run) I'm still getting an error, but is a different one (see attached mvn_gcloud.log)
8) My Maven installation, which I used for step 7, is Apache Maven 3.5.0
Hoping all those infos can help you reproduce the problem.
here are all the information I think will be useful to you.
1) I'm running on Eclipse IDE
2) On Eclipse I installed "Google Cloud Tools for Eclipse" version 1.2.0.201706082053
3) My GCloud installation is version 161.0.0 (you can find the "gcloud info" output attached)
4) I configured the Applicatio Default Credentials:
5) I attached you a full working project which can be used to reproduce the issue (urlfetch.zip)
6) If I run the dev-server using CT4E I'm getting the errore already reported (which I attached on eclipse_cloud_tools.log)
7) If I run the dev-server bypassing Eclipse and using directly Maven CLI (mvn clean appengine:run) I'm still getting an error, but is a different one (see attached mvn_gcloud.log)
8) My Maven installation, which I used for step 7, is Apache Maven 3.5.0
Hoping all those infos can help you reproduce the problem.
ya...@google.com <ya...@google.com> #4
Thank you for all these details. I ran your code and found that while it does produce an error running on the local development server, it is an entirely different error related to the application default credentials (and I from your mvn_gcloud.log that you are also getting this separate issue with the submitted sample), which would ideally be dealt with in a separate issue thread (though I believe the product team might already be working on that one).
Furthermore, when deployed onto App Engine the code ran entirely without errors and I verified that "postRequest.execute()" does receive a HttpResponse with status 200.
So that code on its own does not appear to produce the UrlFetch issue, or did you get the reported issue running on the development server while the same code worked fine deployed on App Engine?
Furthermore, when deployed onto App Engine the code ran entirely without errors and I verified that "postRequest.execute()" does receive a HttpResponse with status 200.
So that code on its own does not appear to produce the UrlFetch issue, or did you get the reported issue running on the development server while the same code worked fine deployed on App Engine?
ni...@noovle.com <ni...@noovle.com> #5
I didn't even tried deploying the code online.
My tests are limited to the local environment because until it does not work there I can't move to the online environment.
I deployed the [urlfetch.zip] project online with
---------------
mvn appengine:deploy "-Dapp.deploy.project=xxxxx "-Dapp.deploy.version=yyyy"
---------------
And I got positive 200 status code, so I can confirm your test that online this code works.
At this point the error seems to be only on local environment
My tests are limited to the local environment because until it does not work there I can't move to the online environment.
I deployed the [urlfetch.zip] project online with
---------------
mvn appengine:deploy "-Dapp.deploy.project=xxxxx "-Dapp.deploy.version=yyyy"
---------------
And I got positive 200 status code, so I can confirm your test that online this code works.
At this point the error seems to be only on local environment
ya...@google.com <ya...@google.com> #6
I was able to reproduce of your issue and will be forwarding this information to engineering so they may investigate it. Future updates on your issue will be posted here.
ya...@google.com <ya...@google.com> #7
Small additional note: this issue also appears to only occur on Cloud SDK version 161.0.0 and to work fine on version 158.0.0.
ni...@noovle.com <ni...@noovle.com> #8
It seems that GCloud 161 has different problems, see this other issue I reported always related to the version 161
https://issuetracker.google.com/issues/63417794
ni...@noovle.com <ni...@noovle.com> #9
But in other hands, I'm forced to use GCloud 161 because of another problem which is already been fixed
https://issuetracker.google.com/issues/63122500
So.. I'm do not have a GCloud version at the moment which has all this problems fixed.
So.. I'm do not have a GCloud version at the moment which has all this problems fixed.
ni...@noovle.com <ni...@noovle.com> #10
Any update on this matter?
ya...@google.com <ya...@google.com> #11
It is still being worked on but I do not have an ETA to share.
[Deleted User] <[Deleted User]> #12
We can't work. This issue is blocking us. What is the root cause and how can we overcome this problem ?
[Deleted User] <[Deleted User]> #13
We find it strange that anyone else can develop for Google App Engine at all -- the bug has been open for a month and blocks any development at all. Has anyone here been able to work around it?
[Deleted User] <[Deleted User]> #14
Here is our log.
[Deleted User] <[Deleted User]> #15
Although the discussion above mentions credentials, note that *llegalAccessError* is not a Google authentication issue -- rather, it occurs, for example, when a class tries to access a package-protected method from outside that class.
lu...@google.com <lu...@google.com> #16
Working on a fix.
For now, I think this would be a workaround:
remove google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/impl/appengine-api-labs.jar which is not needed (labs is not supported for Java8, it is an unstable library as its name indicate.)
For now, I think this would be a workaround:
remove google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/impl/appengine-api-labs.jar which is not needed (labs is not supported for Java8, it is an unstable library as its name indicate.)
lu...@google.com <lu...@google.com> #17
Sorry, wrong workaround...
For now, To make it work, either move to 159.0.0 Cloud SDK,
gcloud components update --version 159.0.0
or delete this jar:
google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/shared/appengine-remote-api.jar
For now, To make it work, either move to 159.0.0 Cloud SDK,
gcloud components update --version 159.0.0
or delete this jar:
google-cloud-sdk/platform/google_appengine/google/appengine/tools/java/lib/shared/appengine-remote-api.jar
ni...@noovle.com <ni...@noovle.com> #18
Due to another issue (#63417794), my GCloud SDK directory is with the space removed
-- C:\Users\Nicola\AppData\Local\Google\CloudSDK\google-cloud-sdk\bin --
(note there is not space between "Cloud" and "SDK" in the path
I removed the JAR as you suggested and the error seems to be solved.
My GCloud version is now 165.0.0 (I was forced to update from 158, see other issue for additional details) because the Cloud Tools 4 Eclipse was giving error due to older GCloud version.
-- C:\Users\Nicola\AppData\Local\Google\CloudSDK\google-cloud-sdk\bin --
(note there is not space between "Cloud" and "SDK" in the path
I removed the JAR as you suggested and the error seems to be solved.
My GCloud version is now 165.0.0 (I was forced to update from 158, see other issue for additional details) because the Cloud Tools 4 Eclipse was giving error due to older GCloud version.
pr...@docpulse.com <pr...@docpulse.com> #19
Encountered the same exception while running firebase samples from the appengine sample repository. Spent almost a day figuring out what I was doing wrong, and not much is out there about this issue. Moving to 159 version helped resolve.
lu...@google.com <lu...@google.com> #20
Should be fixed now. Can you update to latest Cloud SDK or Mave/Gradle plugins?
ni...@noovle.com <ni...@noovle.com> #21
Hi,
here is my current configuration
> gcloud version
-------------------
Google Cloud SDK 171.0.0
app-engine-java 1.9.55
app-engine-python 1.9.60
beta 2017.03.24
bq 2.0.25
core 2017.09.11
gcloud
gsutil 4.27
-------------------
> where gcloud
-------------------
C:\Users\Nicola\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud
-------------------
Note that I restored the space in the folder path
The file "appengine-remote-api.jar" has been restored.
Maven plugin version 1.3.1
I tried a sample code which use the Application Default Credentials and now is working fine
here is my current configuration
> gcloud version
-------------------
Google Cloud SDK 171.0.0
app-engine-java 1.9.55
app-engine-python 1.9.60
beta 2017.03.24
bq 2.0.25
core 2017.09.11
gcloud
gsutil 4.27
-------------------
> where gcloud
-------------------
C:\Users\Nicola\AppData\Local\Google\Cloud SDK\google-cloud-sdk\bin\gcloud
-------------------
Note that I restored the space in the folder path
The file "appengine-remote-api.jar" has been restored.
Maven plugin version 1.3.1
I tried a sample code which use the Application Default Credentials and now is working fine
Description
--------------------------------------------------------------
<dependency>
<groupId>com.google.http-client</groupId>
<artifactId>google-http-client-appengine</artifactId>
<version>1.22.0</version>
</dependency>
--------------------------------------------------------------
And a code like follow:
--------------------------------------------------------------
GoogleCredential credential = GoogleCredential.getApplicationDefault();
if (credential.createScopedRequired()) {
credential = credential.createScoped(Arrays.asList("
}
HttpRequestFactory factory = UrlFetchTransport.getDefaultInstance().createRequestFactory(credential);
// Create the url
GenericUrl url = new GenericUrl("....my url.....");
LOG.log(Level.INFO, "Fetching url: {0}", new Object[] {url});
// Create the payload
JsonObject payload = new JsonObject();
// ... compiling the payload ...
// Create the request
HttpContent content = new ByteArrayContent("application/json", payload.toString().getBytes("UTF-8"));
HttpRequest postRequest = factory.buildPostRequest(url, content);
// Execute the request
HttpResponse execute = postRequest.execute();
String response = IOUtils.toString(execute.getContent());
--------------------------------------------------------------
I'm using Eclipse with Cloud Tools 4 Eclipse version 1.2.0
My GCloud installation is version 161.0.0
When the "postRequest.execute()" method is hit, I'm getting this error
--------------------------------------------------------------
java.lang.IllegalAccessError: com/google/appengine/repackaged/com/google/common/base/Platform
at com.google.appengine.repackaged.com.google.common.base.Ticker$1.read(Ticker.java:69)
at com.google.appengine.repackaged.com.google.common.base.Stopwatch.elapsedNanos(Stopwatch.java:181)
at com.google.appengine.repackaged.com.google.common.base.Stopwatch.elapsed(Stopwatch.java:194)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$LoadingValueReference.elapsedNanos(LocalCache.java:3665)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.getAndRecordStats(LocalCache.java:2381)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2336)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2294)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2207)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache.get(LocalCache.java:4062)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4066)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4995)
at com.google.appengine.repackaged.com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5001)
at com.google.appengine.api.appidentity.AppIdentityServiceImpl.getAccessToken(AppIdentityServiceImpl.java:272)
at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential.intercept(AppIdentityCredential.java:98)
at com.google.api.client.googleapis.extensions.appengine.auth.oauth2.AppIdentityCredential$AppEngineCredentialWrapper.intercept(AppIdentityCredential.java:243)
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:868)
<my project classes stack>
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
at com.google.appengine.api.socket.dev.DevSocketFilter.doFilter(DevSocketFilter.java:74)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.ResponseRewriterFilter.doFilter(ResponseRewriterFilter.java:134)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:34)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:63)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:48)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectRequest(DevAppServerModulesFilter.java:366)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doDirectModuleRequest(DevAppServerModulesFilter.java:349)
at com.google.appengine.tools.development.DevAppServerModulesFilter.doFilter(DevAppServerModulesFilter.java:116)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
at com.google.appengine.tools.development.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:95)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:508)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
--------------------------------------------------------------