google-cloud-node icon indicating copy to clipboard operation
google-cloud-node copied to clipboard

Dataflow - aggregatedListJobsAsync - The caller does not have permission

Open akumar-99 opened this issue 8 months ago • 3 comments

Please make sure you have searched for information in the following guides.

  • [x] Search the issues already opened: https://github.com/GoogleCloudPlatform/google-cloud-node/issues
  • [x] Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+node.js
  • [x] Check our Troubleshooting guide: https://github.com/googleapis/google-cloud-node/blob/main/docs/troubleshooting.md
  • [x] Check our FAQ: https://github.com/googleapis/google-cloud-node/blob/main/docs/faq.md
  • [x] Check our libraries HOW-TO: https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md
  • [x] Check out our authentication guide: https://github.com/googleapis/google-auth-library-nodejs
  • [x] Check out handwritten samples for many of our APIs: https://github.com/GoogleCloudPlatform/nodejs-docs-samples
  • [x] Check the API's issue tracker: https://cloud.google.com/support/docs/issue-trackers

A screenshot that you have tested with "Try this API".

Image

Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

https://gist.github.com/akumar-99/cf336fa80ecbe534271aa5c1aaabf64a

A step-by-step description of how to reproduce the issue, based on the linked reproduction.

Run the function provided above with some tweaks or run this code

FYI - listJobsAsync works fine.

The permission assigned to role is dataflow.jobs.list

A clear and concise description of what the bug is, and what you expected to happen.

ERROR

Fetching DataFlow Jobs
(node:86497) AutopaginateTrueWarning: Autopaginate will always be set to false in Async paging methods. See more info at https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#auto-pagination for more information on how to configure paging calls
Error: 7 PERMISSION_DENIED: The caller does not have permission
    at callErrorFromStatus (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/call.js:32:19)
    at Object.onReceiveStatus (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/client.js:193:76)
    at Object.onReceiveStatus (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:361:141)
    at Object.onReceiveStatus (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/client-interceptors.js:324:181)
    at /Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/resolving-call.js:135:78
    at process.processTicksAndRejections (node:internal/process/task_queues:85:11)
for call at
    at ServiceClientImpl.makeUnaryRequest (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/client.js:161:32)
    at ServiceClientImpl.<anonymous> (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@grpc/grpc-js/build/src/make-client.js:105:19)
    at /Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/@google-cloud/dataflow/build/src/v1beta3/jobs_v1_beta3_client.js:220:29
    at wrappedCall (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/google-gax/build/src/paginationCalls/pagedApiCaller.js:88:20)
    at /Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/google-gax/build/src/normalCalls/timeout.js:44:16
    at OngoingCallPromise.call (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/google-gax/build/src/call.js:70:27)
    at PagedApiCaller.call (/Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/google-gax/build/src/paginationCalls/pagedApiCaller.js:120:25)
    at /Users/ashish/asecurecloud/gcp_assessment_engine/scan_engine/node_modules/google-gax/build/src/createApiCall.js:110:30 {
  code: 7,
  details: 'The caller does not have permission',
  metadata: Metadata { internalRepr: Map(0) {}, options: {} }
}

A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

It should return a list of but instead gives permission error.

Documentation points to this behavior.

akumar-99 avatar Apr 21 '25 07:04 akumar-99

In the original reproduction the fetchListData method isn't defined. That function is necessary for the script.

danieljbruce avatar Apr 23 '25 17:04 danieljbruce

I ran the code from the sample and I get the same error:

(node:92255) AutopaginateTrueWarning: Autopaginate will always be set to false in Async paging methods. See more info at https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#auto-pagination for more information on how to configure paging calls
(Use `node --trace-warnings ...` to show where the warning was created)
7 PERMISSION_DENIED: The caller does not have permission

Process finished with exit code 1

danieljbruce avatar Apr 23 '25 17:04 danieljbruce

Is this issue being worked upon with any updates or ETA?

akumar-99 avatar Jun 28 '25 08:06 akumar-99