[ 
https://issues.apache.org/jira/browse/NIFI-15105?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Pierre Villard resolved NIFI-15105.
-----------------------------------
    Fix Version/s: 2.7.0
       Resolution: Fixed

> List/FetchGoogleDrive processors fail when the user lacks access to the 
> Shared Drive root
> -----------------------------------------------------------------------------------------
>
>                 Key: NIFI-15105
>                 URL: https://issues.apache.org/jira/browse/NIFI-15105
>             Project: Apache NiFi
>          Issue Type: Bug
>            Reporter: Peter Turcsanyi
>            Assignee: Peter Turcsanyi
>            Priority: Major
>             Fix For: 2.7.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> In NIFI-14554, support was added to include the Shared Drive name as a 
> FlowFile attribute in the ListGoogleDrive and FetchGoogleDrive processors.
> However, if the user has access only to a subfolder within a Shared Drive — 
> but not to the Shared Drive root — the processor fails to retrieve the Shared 
> Drive name. As a result, the entire list or fetch operation fails.
> If the Shared Drive name cannot be retrieved due to insufficient permissions, 
> the processor should omit the Shared Drive name attribute and continue the 
> operation successfully.
> Stack trace:
> {code:java}
> 2025-10-15 22:51:09,280 ERROR [Timer-Driven Process Thread-1] 
> o.a.n.p.gcp.drive.FetchGoogleDrive 
> FetchGoogleDrive[id=21d03387-02cc-3380-e338-e30a31574fb1] Fetching File 
> [1zCTJRDoqOE7ojNpgvdklyArwyE6WMyOQGEBSfnRFGyw] failed
> org.apache.nifi.processor.exception.ProcessException: Error while retrieving 
> folder metadata
>         at 
> org.apache.nifi.processors.gcp.drive.GoogleDriveTrait.getFolderDetails(GoogleDriveTrait.java:161)
>         at 
> org.apache.nifi.processors.gcp.drive.FetchGoogleDrive.lambda$onTrigger$2(FetchGoogleDrive.java:339)
>         at java.base/java.util.Optional.map(Optional.java:260)
>         at 
> org.apache.nifi.processors.gcp.drive.FetchGoogleDrive.onTrigger(FetchGoogleDrive.java:339)
>         at 
> org.apache.nifi.processor.AbstractProcessor.onTrigger(AbstractProcessor.java:27)
>         at 
> org.apache.nifi.controller.StandardProcessorNode.onTrigger(StandardProcessorNode.java:1274)
>         at 
> org.apache.nifi.controller.tasks.ConnectableTask.invoke(ConnectableTask.java:229)
>         at 
> org.apache.nifi.controller.scheduling.AbstractTimeBasedSchedulingAgent.lambda$doScheduleOnce$0(AbstractTimeBasedSchedulingAgent.java:59)
>         at 
> org.apache.nifi.engine.FlowEngine.lambda$wrap$1(FlowEngine.java:105)
>         at 
> java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
>         at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
>         at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
>         at 
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
>         at 
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
>         at java.base/java.lang.Thread.run(Thread.java:1583)
> Caused by: com.google.api.client.googleapis.json.GoogleJsonResponseException: 
> 404 Not Found
> GET https://www.googleapis.com/drive/v3/drives/0AOpW2TTJ-IhOUk9PVA?fields=name
> {
>   "code": 404,
>   "errors": [
>     {
>       "domain": "global",
>       "location": "driveId",
>       "locationType": "parameter",
>       "message": "Shared drive not found: 0AOpW2TTJ-IhOUk9PVA",
>       "reason": "notFound"
>     }
>   ],
>   "message": "Shared drive not found: 0AOpW2TTJ-IhOUk9PVA"
> }
>         at 
> com.google.api.client.googleapis.json.GoogleJsonResponseException.from(GoogleJsonResponseException.java:145)
>         at 
> com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:118)
>         at 
> com.google.api.client.googleapis.services.json.AbstractGoogleJsonClientRequest.newExceptionOnError(AbstractGoogleJsonClientRequest.java:37)
>         at 
> com.google.api.client.googleapis.services.AbstractGoogleClientRequest$3.interceptResponse(AbstractGoogleClientRequest.java:479)
>         at 
> com.google.api.client.http.HttpRequest.execute(HttpRequest.java:1111)
>         at 
> com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:565)
>         at 
> com.google.api.client.googleapis.services.AbstractGoogleClientRequest.executeUnparsed(AbstractGoogleClientRequest.java:506)
>         at 
> com.google.api.client.googleapis.services.AbstractGoogleClientRequest.execute(AbstractGoogleClientRequest.java:616)
>         at 
> org.apache.nifi.processors.gcp.drive.GoogleDriveTrait.getFolderDetails(GoogleDriveTrait.java:145)
>         ... 14 common frames omitted
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to