GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — getSignedUrl called synchronously ? · Issue #251 · googleapis/google-cloud-node

getSignedUrl called synchronously ? #251

New issue
Copy link
New issue
Copy link
Closed
Closed
getSignedUrl called synchronously ?#251
Copy link
Assignees
stephenplusplus
Labels
api: storageIssues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.
Milestone
Storage Stable

Description

@andreij
andreij
opened on Oct 9, 2014
Issue body actions

I have a simple functions that returns a signed url :

  var   options = config.gs
    ,   expires = Math.round(Date.now() / 1000) + (60 * 60 * 24 * 14)
    ,   bucket  = project.storage.bucket({bucketName: config.gs.bucket, credentials: config.gs })

  options.action  = 'read'
  options.expires =  expires// 2 weeks.
  options.resource= url

  signed_url = bucket.getSignedUrl(options, function(err, url_signed) {})
  return signed_url

I cannot understand how to call it synchronously.

The signed_url is always undefined but inside the callback the url_signed is correctly set.

So if I log the signed_url and the url_signed i get:

signed_url: undefined
url_signed: http://.......

Activity

Next
  1. stephenplusplus commented on Oct 9, 2014

    @stephenplusplus
    stephenplusplus
    on Oct 9, 2014
    Contributor
    More actions

    I think this is the fault of our documentation. http://googlecloudplatform.github.io/gcloud-node/#/docs/v0.8.0/storage?method=getSignedUrl shows that it's returned synchronously, but that's actually not the case. You have to use it asynchronously as you've discovered.

    Internally, a connection is required in order to generate a signed url, which is why it must be async. Sorry for the confusion and thanks for bringing attention to this-- I'll go and update the example.

  2. stephenplusplus
    closed this as completedon Oct 9, 2014
  3. stephenplusplus commented on Oct 9, 2014

    @stephenplusplus
    stephenplusplus
    on Oct 9, 2014
    Contributor
    More actions

    Fixed here: 5def8e7

  4. jgeewax
    added
    api: datastoreIssues related to the Datastore API.
    api: storageIssues related to the Cloud Storage API.
    type: questionRequest for information or clarification. Not an issue.
    and removed
    api: datastoreIssues related to the Datastore API.
    on Feb 2, 2015
  5. jgeewax
    added this to the Storage Stable milestone on Feb 2, 2015
  6. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  7. sofisl
    added a commit that references this issue on Sep 15, 2022

    chore(deps): update dependency eslint-plugin-node to v11 (#251)

    d6a3f99
  8. sofisl
    added a commit that references this issue on Oct 13, 2022

    chore: update v2.14.2 gapic-generator-typescript (#251)

    edf28ae
  9. sofisl
    added 4 commits that reference this issue on Nov 10, 2022

    chore: release 1.1.3 (#251)

    9ca467e

    chore: release 1.1.2 (#251)

    c9bb02c

    build: add new kokoro config for coverage and release-please (#251)

    153d1d8

    refactor: improve the sample tests (#251)

    e013f02
  10. 13 remaining items

  11. miguelvelezsa
    added a commit that references this issue on Jul 23, 2025

    fix: enable new gax.lro() (#251)

    88f0215
  12. miguelvelezsa
    added 2 commits that reference this issue on Jan 14, 2026

    fix: remove deep dependency into auth-library (#251)

    7fed69b

    fix: remove deep dependency into auth-library (#251)

    5e047ef
  13. sofisl
    added 2 commits that reference this issue on Jan 27, 2026

    chore: use --trace-warnings flag when calling node in e2e test (#251)

    2b4007c

    chore: use --trace-warnings flag when calling node in e2e test (#251)

    6c0650d
  14. miguelvelezsa
    added a commit that references this issue on Jan 29, 2026

    chore(deps): update dependency @types/sinon to v10 (#251)

    268c1a7
  15. GautamSharda
    added 2 commits that reference this issue on Feb 2, 2026

    build: ignore googleapis.com in doc link check (#251)

    f2e8b1b

    build: ignore googleapis.com in doc link check (#251)

    2f0784b
  16. sofisl
    added a commit that references this issue on Feb 4, 2026

    fix: remove deep dependency into auth-library (#251)

    8de4e12
  17. sofisl
    added a commit that references this issue on Feb 24, 2026

    Adding TypeScript dev dependencies (#251)

    a337c4e
  18. sofisl
    added a commit that references this issue on Mar 5, 2026

    chore: migrate code from googleapis/gcp-metadata (#53)

    fa9a454
  19. codyoss
    added a commit that references this issue on Mar 12, 2026

    chore(deps): update dependency sinon to v18 (#251)

    ed4733d
  20. GautamSharda
    added 2 commits that reference this issue on Mar 12, 2026

    chore(deps): update dependency @types/sinon to v10 (#251)

    aee02ee

    chore(deps): update dependency @types/sinon to v10 (#251)

    80f1358
  21. feywind
    added a commit that references this issue on Mar 27, 2026

    fix: System tests were using get() incorrectly. (#251)

    d787c22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

api: storageIssues related to the Cloud Storage API.type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

    Milestone

    • Storage Stable

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.