google-ar / arcore-android-sdk

ARCore SDK for Android Studio
https://developers.google.com/ar
Other
4.96k stars 1.22k forks source link

Difficulty with ARCore Anchor Demo for Android #415

Closed econiglio closed 6 years ago

econiglio commented 6 years ago

I was getting an error message and now I'm not. I'm not sure what I did wrong. I created a new API key.

MainActivity.txt

AndroidManifest.txt (link removed)

inio commented 6 years ago

I deleted the link to the manifest that contained your API key, but you should probably still revoke it and generate a new one.

I can't help debug this without more information. What error message were you seeing? Please provide a logcat capture for at least ~1 second prior to the error/exception being generated.

econiglio commented 6 years ago

The error message said something along the lines of "Error hosting anchor."

econiglio commented 6 years ago

06-05 09:58:54.772 17738-17816/com.google.ar.core.codelab.cloudanchor E/native: filter_update_base.cc:83 Mapped visual feature update failed when computing its residual and Jacobian. 06-05 09:58:54.984 17738-17815/com.google.ar.core.codelab.cloudanchor E/native: filter_update_base.cc:83 Mapped visual feature update failed when computing its residual and Jacobian. 06-05 09:58:55.077 17738-17816/com.google.ar.core.codelab.cloudanchor E/native: filter_update_base.cc:83 Mapped visual feature update failed when computing its residual and Jacobian. 06-05 09:58:55.369 17738-17829/com.google.ar.core.codelab.cloudanchor E/AnchorServiceClient: AnchorServiceClient Exception aua: DEADLINE_EXCEEDED: deadline exceeded after 4999130693ns at bhd.a(PG:58) at bhd.a(PG:29) at com.google.ar.persistence.AnchorServiceClient.a(PG:17) at com.google.ar.persistence.AnchorServiceClient.createAnchors(PG:26)

asadullahnaweed commented 6 years ago

This means that you are unable to communicate with the server. Please make sure that your device is connected to the internet and communication with Google's servers is not being blocked by any firewalls.

econiglio commented 6 years ago

Okay thank you. How do I prevent the firewall block?

inio commented 6 years ago

@econiglio Sorry about letting this one fall through the cracks.

Are you in a country with restricted global internet access or on a corporate or academic network with agressive filtering? If so, Cloud Anchors will not work.

econiglio commented 6 years ago

I believe my work's server is blocking the API request. I am based in the USA

inio commented 6 years ago

Try loading https://arcorecloudanchor.googleapis.com/ on the device. If you get a 404, then network blocking is not the problem. If it never loads or you get a network error, you'll need a firewall exception.

inio commented 6 years ago

Closing for inactivity.