cancel
Showing results for 
Search instead for 
Did you mean: 

Google Drive API automation using Drive API V3 skills, Getting error as Internal : Unexpected error Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection

PradeepPadashet
Level 3
Hi Team,
On a high priority basis, I am working on a project involving Google drive automation using the API method in Blu prism.  I have created the Project, Application credentials, like Client Id, Client secret in the GCP console to get the primary resources to automate the same.
 
Upon configuring the same credentials in BP-Credentials Manager and calling the "Drive API v3" object from the process studio, I am getting the below error 
"Internal: Unexpected error Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."
  • Blue Prism version number: V 6.10
  • Summary of issue:  Getting Error as " Internal: Unexpected error Offset and length were out of bounds for the array or count is greater than the number of elements from index to the end of the source collection."
  • Severity: Very High (S1)
  • Steps to Reproduce: Create credentials on GCP Console, "https://console.cloud.google.com/apis/credentials/oauthclient" Get Client ID and Client secret code.
  • Install/Import the "https://digitalexchange.blueprism.com/dx/entry/9648/solution/drive-api-v3-2" asset and Configure the GCP Client ID and Client secret in credential manager. ( Pass Client Secret as "-----BEGIN PRIVATE KEY-----Client Secret-----END PRIVATE KEY-----")
  • Call action stage for creating a file in drive or Getting the list of files, pass the inputs and execute the same.
  • Logs and Screenshot: Please refer to the attachments.
Kindly help us by providing the documentation for automating the G Drive, and resolutions for the same.
 
Thanks and Regards
Pradeep Padashetty


------------------------------
Pradeep Padashetty
------------------------------
12 REPLIES 12

SergioBentim
Staff
Staff
Hello, Pradeep.
There is already a ticket open in Support, and the support team will reply to you shortly.
Is this issue affecting production?

------------------------------
Sergio Bentim
Customer Engineer
Technical Support
America/Mexico_City
------------------------------

Hi Sergio,

We haven't got any response from the support ticket. It's been 4 days, we are anticipating the response as it is urgent and affecting the delivery date. Kindly help and guide us on automating the Google Drive using G-Drive Skills (V3) or any effective API invocation method.

Thanks and Regards
Pradeep Padashetty

------------------------------
Pradeep Padashetty
------------------------------

ewilson
Staff
Staff
Hi Pradeep,

Couple questions.

1) What kind of credential did you create in Credential Manager? Is it a OAuth JWT Bearer or OAuth Client Credential? It should be a OAuth JWT Bearer as shown below.

5778.png
​2) Does the Common Authentication section of your Web API Service definition for the Drive API look like this?

5779.png 
Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric,

Please find the response below,

a) Is it an OAuth JWT Bearer in Cred manager. ( I have passed the client ID and Client Secret as mentioned in the attached screenshot)
Note: Assigned the Client Secret as "-----BEGIN PRIVATE KEY-----Client Secret-----END PRIVATE KEY-----"
b) Common Authentication exactly looks like, as mentioned by you.

Kindly let me know if you need further information.

Thanks and Regards
Pradeep Padashetty


------------------------------
Pradeep Padashetty
------------------------------

Pradeep,

According to your screenshot you've defined your credential in the Google Console as being for a Web App. I'm not sure if this makes a difference, but the only options I've used are Service Account, as mentioned in the documentation for the integration, and Desktop App.

Did you manually add the "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" portions when you set the value?

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric,

I have also tried with the service account but not succeeded and achieved the expected.

Did you manually add the "-----BEGIN PRIVATE KEY-----" and "-----END PRIVATE KEY-----" portions when you set the value?- Yes

Kindly share the complete document to simulate google drive Automation and as well google sheet automation.

Thanks and Regards
Pradeep Padashetty

------------------------------
Pradeep Padashetty
------------------------------

Pradeep,

I'm not sure what's going on with your implementation, but I've attached a doc I just put together that's as close to a step-by-step configuration as I can get at the moment. It starts with the actual enablement of the API. Please go through and verify every step even if you know you've already performed them.

Once you've verified every step, try the skill again, but start with the most basic action which is drive.about.get.

5789.png
Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Hi Eric,

Thanks for the feed, I was able to configure and get the result from the drive.about.get. action. But the major intention to automate the file upload/download and find/search for files from the drive. Please share the knowledge base and steps by step details to reproduce.

Most of the parameters which we need to pass are not in an understandable format. I have taken the reference from G drive official API reference but didn't get much feed as I am new to the GCP platform.

https://developers.google.com/drive/api/v3/reference

Kindly share the documentation to follow the google drive file upload and Download procedure, either with Google Drive API V3 (Skills) or Using HTTP methods.

Thanks and regards
Pradeep padashetty


------------------------------
Pradeep Padashetty
------------------------------

Hi @PradeepPadashet did you solve this problem uploading files?​​

------------------------------
Agustin Rodolfo Catalano
Computing Engineering
Santander Argentina
America/Argentina/Buenos_Aires
------------------------------