-
Notifications
You must be signed in to change notification settings - Fork 410
java.util.concurrent.ExecutionException: com.google.android.gms.common.api.ApiException: 17: API: Drive.API_CONNECTIONLESS is not available on this device. at #75
Comments
Hey @TonyTangAndroid Did you find out how to fix it? Thanks |
Nope, unfortunately. I eventually was forced to upgrade to the latest Google Play Service 12.0.1 and used the deprecated API to support the functionality. I have been watching the repository. @asrivas has been actually following up with issues here. Hopefully, this issue will soon be addressed or advised. |
Hey @TonyTangAndroid , yep that's weird and I can't find much about that online. I'll probably need to do the same here to work that around :/ |
No. I could not find any place to raise such issue. Hence I posted it here and stackoverflow and keeps my fingers crossed ever since. |
Yep, I saw your issue there. No worries, we'll find that out soon. |
Are you getting that error on a device or emulator and does it have the updated Google Play Services? Please do not use the deprecated API, please see the deprecation note and updated instructions: You may follow the code in BaseDemoActivity for creating the Drive client: Full authentication instructions available here: Can you provide the code that throws this exception? |
@asrivas Thank you very very much for getting back to this issue. I am so excited to receive the email notification about your message. I am using the Pixel 2 running Android 8.1.0. I could confirm that I have setup everything correctly. I would be more than happy to provide the sample code to reproduce this issue in next 12 hours. |
Hi @asrivas, I am afraid that it is really inconvenient for me to provide the whole code base with release key and API Key. However, this issue could only be reproduced with my legacy Google Drive API key. If I use a newer version, everything is okay. But I need to keep the backwards compatibility. So I had to use the deprecated API. By any chance, you could investigate this issue based on the error code? Why such message will be shown? |
I was looking for the API call that threw that exception. Please note though that we do not provide support for deprecated APIs. |
Hi @asrivas, Any help would be very much appreciated 🙂 |
I was also having this problem, and I just managed to fix it. The cause for me:
Solution: If you don't find that incorrect permission for your app, make sure to check ALL of your android apps. If you ask for full scope in one Android app, it will cause this error for all your apps, on any device where you are logged into the same account. Hope this helps! |
Yeah @Mjweathe, I found that too. I've replied to @TonyTangAndroid on his question here explaining that: At least my problem was with the scope too. |
same problem |
create firebase project and import firebase service resolve my issue |
Hey everyone,
Google Drive API is enabled for the project as well. I have ran out of ideas at this point. Does anyone know a solution for this problem or possible errors I could have made? Thanks |
@Panzki you need GoogleSignClient(getContext()).revokeAccess(); |
@kbboss Thanks for the suggestion, unfortunately this did not resolve the issue. |
I am also having this same issue. I tried the same app with no change on 2 other devices and it worked well but not working on mine. By the way, I have installed custom rom in my device with SELinux permissive. |
I found the solution to my problem. When we build
These scopes do not appear in consent screen. In fact, Consent screen doesn't appear so, your app doesn't get drive permissions at all.
You will see 3 drive permission in consent screen and then you can create folders which is visible to user also. Make sure you revoke the permission of your app from here |
I'm also encountering the same Is there a suggested path forward for how to upgrade without breaking my existing OAuth keys? There's not a simple upgrade path for me otherwise, since I cannot deploy this to production without breaking the experience for everyone that is currently using the deprecated APIs. |
After all the feedback in this thread, it seems that any unexpected exception will trigger API_CONNECTIONLESS exception with little and misleading information. And engineer from Google Drive team possibly feel powerless on fixing this issue as they also could not gather any valid hint to help them. This is a good example to demonstrate that how bad it could be if the SDK Error handling logic is not designed properly. |
I had the same problem. My app worked fine on 4 different devices when connected to the network. When offline (airplane mode), 3 of my devices failed the drive requestSync() with error 7 - device is offline. This error is handled by the app because cached metadata from a subsequent query() was available even though the device was offline. The 4th device failed with error code 17 on both the requestSync() AND query() which was unexpected and caused application failure. If airplane mode was turned off, no errors were returned but they would occur again if airplane mode was turned on. Signing out of the drive account and signing in again solved the problem. I have not been able to recreate the problem and have no idea of the root cause. |
Here is the story. I had integrated Google Drive Android SDK (8.1.0) into my app (AnyCopy) around three years ago. And I followed the tutorial to set up properly including adding credentials and api key. Everything worked okay. I could backup and restore my data without any problem. Even today it works okay if I download it from Google Play.
Recently I have been trying to refactor AnyCopy and integrate the newest Google Drive Android SDK (Google Play Service Version number 12.0.1 )into my app and experiencing a strange error with message
However, if I create a new credential on Google Console with a different signing key. And the problem is resolved. I realize that the problem rooted from the credential configuration. However, I could not figure out how to resolve it as it might be a Google Drive SDK backwards compatibility bug. Anyone else has ever run into this issue? Any suggestion will he highly appreciated.
I also created a stackoverflow question here for anyone who is interested in answering there.
The text was updated successfully, but these errors were encountered: