googleapis/google-api-java-client

version 2.2.0 works on Android API 21, version 2.3.0 crashes

Closed this issue · 2 comments

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please include as much information as possible:

Environment details

  1. Specify the API at the beginning of the title. For example, "BigQuery: ...").
    General, Core, and Other are also allowed as types
  2. OS type and version: Android API 21 and 22
  3. Java version:
  4. version(s): version 2.3.0 (com.google.api-client:google-api-client:2.3.0 and com.google.api-client:google-api-client-android)

Stack trace

Fatal Exception: java.lang.NoSuchMethodError: No virtual method getAndSetObject(Ljava/lang/Object;JLjava/lang/Object;)Ljava/lang/Object; in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-libart.jar)
       at com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper.gasWaiters(AbstractFuture.java)
       at com.google.common.util.concurrent.AbstractFuture.releaseWaiters(AbstractFuture.java:1126)
       at com.google.common.util.concurrent.AbstractFuture.complete(AbstractFuture.java:1005)
       at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:807)
       at com.google.auth.oauth2.OAuth2Credentials$RefreshTask.access$500(OAuth2Credentials.java:601)
       at com.google.auth.oauth2.OAuth2Credentials$RefreshTask$1.onFailure(OAuth2Credentials.java:623)
       at com.google.common.util.concurrent.Futures$CallbackListener.run(Futures.java:1127)
       at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java)
       at com.google.common.util.concurrent.ExecutionList.executeListener(ExecutionList.java:145)
       at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:134)
       at com.google.common.util.concurrent.ListenableFutureTask.done(ListenableFutureTask.java:113)
       at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
       at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
       at java.util.concurrent.FutureTask.run(FutureTask.java:242)
       at com.google.auth.oauth2.OAuth2Credentials$RefreshTask.run(OAuth2Credentials.java)
       at com.google.common.util.concurrent.DirectExecutor.execute(DirectExecutor.java:31)
       at com.google.auth.oauth2.OAuth2Credentials$AsyncRefreshResult.executeIfNew(OAuth2Credentials.java:582)
       at com.google.auth.oauth2.OAuth2Credentials.refresh(OAuth2Credentials.java:193)
       at com.google.auth.http.HttpCredentialsAdapter.handleResponse(HttpCredentialsAdapter.java:144)
       at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1059)```

#### External references such as API reference guides

- ?

#### Any additional information below


Following these steps guarantees the quickest resolution possible.

Thanks!

Hello @ashishb , is there a simplified reproducer you can provide that demonstrates the exception you're seeing, or a set of reproducer steps that results in the exception?

@burkedavison sorry, seeing this just now.
I can still reproduce this with 2.3.0 but not with 2.4.0, so, this is resolved.