googlemaps / googlemaps/google-maps-services-java

encountered JAVA com.google.apphosting.api.ApiProxy$CallNotFoundException when using geocoding in GCP app-engine

未關閉
#682 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
triage me type: bug
主要語言
Java
星號
1.8k
分支
973
PR 合併指標
30 天內沒有已合併 PR

描述

I need to call GeocodingApi.reverseGeocode from with a java app running in an GCP app-engine. My code looks like:

context = new GeoApiContext.Builder(new GaeRequestHandler.Builder())
.apiKey("").build();

LatLng location = new LatLng(posLat, posLong);
GeocodingApiRequest request = GeocodingApi.reverseGeocode(context, location);
GeocodingResult[] results = request.await();

Running this code gives the exception:

A 2020-05-14T17:42:52.557941036Z com.google.maps.errors.UnknownErrorException: Unexpected exception from com.google.apphosting.api.ApiProxy$CallNotFoundException: Can't make API call urlfetch.Fetch in a thread that is neither the original request thread nor a thread created by ThreadManager

A 2020-05-14T17:42:52.559374731Z at com.google.maps.internal.GaePendingResult.await(GaePendingResult.java:128)

A 2020-05-14T17:42:52.559425995Z at com.google.maps.PendingResultBase.await(PendingResultBase.java:58)

A 2020-05-14T17:42:52.559438799Z at de.bit.daimler.vehicletripanalyzer.geocoding.VTA_GeoCode.getCityName(VTA_GeoCode.java:42)

A 2020-05-14T17:42:52.559526039Z at de.bit.daimler.vehicletripanalyzer.analyzer.TripAnalyzer.buildResponse(TripAnalyzer.java:50)

A 2020-05-14T17:42:52.559550842Z at de.bit.daimler.vehicletripanalyzer.analyzer.TripAnalyzer.analyseTrip(TripAnalyzer.java:43)

A 2020-05-14T17:42:52.559557289Z at de.bit.daimler.vehicletripanalyzer.rest.VTA_RestController.analyzeTrip(VTA_RestController.java:32)

A 2020-05-14T17:42:52.561769118Z at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

A 2020-05-14T17:42:52.561810065Z at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

A 2020-05-14T17:42:52.561891356Z at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

A 2020-05-14T17:42:52.561902134Z at java.lang.reflect.Method.invoke(Method.java:498)

I updated all my recources (especially google-dependencies) to the latest available versions. I also use the latest image for the GCP app engine. But still the error persists.

I guess that this issue is related to https://github.com/googlemaps/google-maps-services-java/issues/672, but there another language and API-call is used. Therefor I'm raising a new issue.

Help is urgently appreciated... Thanks a lot!

貢獻指南

開啟貢獻指南

研究方向

Start with GaePendingResult.await in the stack trace and the GaeRequestHandler.Builder usage shown in the report. Reproduce the reverse-geocoding call in the stated App Engine environment, then compare the behavior and guidance from issue 672. Done means establishing whether this usage is supported and documenting or correcting the relevant client-library behavior.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
gcp, java
領域
api, backend, cloud
Issue 類型
缺陷
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
需要釐清
新手友好度
20/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。