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 — configStore.get(that.name) returns undefined causes uncaught exception · Issue #437 · googleapis/google-cloud-node

configStore.get(that.name) returns undefined causes uncaught exception #437

New issue
Copy link
New issue
Copy link
Closed
#447
Closed
configStore.get(that.name) returns undefined causes uncaught exception#437
#447
Copy link
Assignees
stephenplusplus
Labels
🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
Milestone
Storage Stable

Description

@teddybearz
teddybearz
opened on Mar 10, 2015
Issue body actions
[31merror 2015-03-10T18:05:24.806Z: 5c00c7dd3ce2 pid:560 uncaughtExceptionHandler (requirements/uncaughtExceptionHandler.js:15) Aborting on uncaught top-level exception:  TypeError: Cannot read property 'firstChunk' of undefined
    at DestroyableTransform._transform (/opt/bb/experiments/build/node_modules/gcloud/lib/storage/file.js:866:58)
    at DestroyableTransform.Transform._read (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:184:10)
    at DestroyableTransform.Transform._write (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:172:12)
    at doWrite (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at DestroyableTransform.Writable.write (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at write (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:623:24)
    at flow (/opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:632:7)
    at /opt/bb/experiments/build/node_modules/gcloud/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:600:7
    at process._tickCallback (node.js:419:13)�[39m
�```

Activity

Next
  1. teddybearz commented on Mar 11, 2015

    @teddybearz
    teddybearz
    on Mar 11, 2015
    Author
    More actions

    One possible cause is that the startupUpload()->makeAuthorizedRequest()'s error handler is handleError(), which can call setTimeout(resumeUpload) if the err.code is between > 499 and < 600. And skip the configStore.set(that.name).

    One fix is: if handleError() is triggered by the startupUpload(), it should never trigger resumeUpload().

  2. teddybearz commented on Mar 11, 2015

    @teddybearz
    teddybearz
    on Mar 11, 2015
    Author
    More actions

    I think I know the cause. The file.js use configure store ('gcloud-node') to keep track of the object upload process. If there are multiple node processes running at the same time, they may overwrite others' config file and cause problems. This effectively prohibit multiple node process running (under one user) to access the GCS at the same time. This is a serious limitation and is not documented anywhere.

    I don't understand this design. Why do you need to use persist configure store to keep track every object's upload process? Why cannot you use a simple in-memory-only object to do that? Resumable upload is nice to have, but do you really need to think resumable-upload cross node process restart (at a such high expense)?

  3. teddybearz commented on Mar 12, 2015

    @teddybearz
    teddybearz
    on Mar 12, 2015
    Author
    More actions

    I make some changes like below and my stress test that uses multiple node processes is now happy.

    diff --git a/node_modules/gcloud/lib/storage/file.js b/node_modules/gcloud/lib/storage/file.js
    index 7c04437..adfdf35 100644
    --- a/node_modules/gcloud/lib/storage/file.js
    +++ b/node_modules/gcloud/lib/storage/file.js
    @@ -21,7 +21,14 @@
     'use strict';
    
     var bufferEqual = require('buffer-equal');
    -var ConfigStore = require('configstore');
    +//var ConfigStore = require('configstore');
    +var all = {};
    +var configStore = {
    +   all: {},
    +   get: function(key) { return all[key]; },
    +   del: function(key) { delete all[key]; },
    +   set: function(key, value) { all[key] = value; },
    +};
     var crc = require('fast-crc32c');
     var crypto = require('crypto');
     var duplexify = require('duplexify');
    @@ -766,7 +773,7 @@ File.prototype.startResumableUpload_ = function(stream, metadata) {
       metadata = metadata || {};
    
       var that = this;
    -  var configStore = new ConfigStore('gcloud-node');
    +  //var configStore = new ConfigStore('gcloud-node');
       var config = configStore.get(that.name);
       var makeAuthorizedRequest = that.bucket.storage.makeAuthorizedRequest_;
  4. ryanseys commented on Mar 16, 2015

    @ryanseys
    ryanseys
    on Mar 16, 2015
    Contributor
    More actions

    I suppose the real important question here is: Do we really need to support resumable across node process restarts? I'm going to assume yes, so we just likely need better error checking to ensure that the value exists at the time we need to use it, otherwise resumable will not be used.

  5. stephenplusplus
    closed this as completedin #447on Mar 23, 2015
  6. jgeewax
    added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    api: storageIssues related to the Cloud Storage API.
    on May 14, 2015
  7. jgeewax
    added this to the Storage Stable milestone on May 14, 2015
  8. yoshi-automation
    added
    🚨This issue needs some love.
    triage meI really want to be triaged.
    on Apr 6, 2020
  9. JustinBeckwith
    assigned
    stephenplusplus
    on Feb 1, 2021
  10. chingor13
    added a commit that references this issue on Aug 22, 2022

    chore: release 3.10.0 (#437)

    199e2ab
  11. sofisl
    added a commit that references this issue on Sep 15, 2022

    chore(deps): update dependency webpack to v5 (#437)

    4104834
  12. sofisl
    added a commit that references this issue on Oct 12, 2022

    chore(main): release 3.1.0 (#437)

    8015dfc
  13. sofisl
    added a commit that references this issue on Nov 10, 2022

    chore: remove header check ignore and clang (#437)

    07a1930
  14. 11 remaining items

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

    Release v0.25.4 (#437)

    4966d15
  16. sofisl
    added 3 commits that reference this issue on Jan 27, 2026

    v1.0.2 (#437)

    f7d18ee

    v1.0.2 (#437)

    e1deb91

    v1.0.2 (#437)

    f144a13
  17. miguelvelezsa
    added a commit that references this issue on Jan 28, 2026

    fix(docs): move to new client docs URL (#437)

    66eaefd
  18. sofisl
    added a commit that references this issue on Feb 5, 2026

    fix(docs): move to new client docs URL (#437)

    bf922f5
  19. sofisl
    added a commit that references this issue on Feb 17, 2026

    fix(docs): move to new client docs URL (#437)

    deb404c
  20. sofisl
    added a commit that references this issue on Feb 24, 2026

    fix(deps): update dependency through2 to v3 (#437)

    1c915fa
  21. GautamSharda
    added a commit that references this issue on Feb 25, 2026

    feat: add support for RANGE type with Write API and adapt pkg (#437)

    7e755b2
  22. sofisl
    added a commit that references this issue on Mar 5, 2026

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

    fa9a454
  23. GautamSharda
    added a commit that references this issue on Mar 12, 2026

    chore: release 2.0.1 (#437)

    b3447a2
  24. GautamSharda
    added 2 commits that reference this issue on Mar 23, 2026

    fix(deps): update dependency @google-cloud/paginator to ^0.2.0

    c4bfeef

    fix(deps): update dependency @google-cloud/paginator to ^0.2.0

    91f066e
  25. shivanee-p
    added a commit that references this issue on Mar 27, 2026

    fix(deps): update dependency @google-cloud/paginator to ^0.2.0

    60c0ecc
  26. thiyaguk09
    added a commit that references this issue on May 5, 2026

    fix(deps): update dependency @google-cloud/paginator to ^0.2.0

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

Metadata

Metadata

Assignees

  • @stephenplusplus
    stephenplusplus

Labels

🚨This issue needs some love.api: storageIssues related to the Cloud Storage API.triage meI really want to be triaged.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

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.