Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

Feature request: Browser support #1883

Open

Description

@shaffeeullah

This client library is not currently supported in the browser. We have received many requests for this feature and are working toward supporting this. We'll keep this issue updated with any progress we're able to share.

Existing requests: https://github.com/googleapis/nodejs-storage/issues?q=is%3Aissue+label%3Aweb

Activity

  1. added
    type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on Apr 20, 2022
  2. FossPrime commented on Apr 20, 2022

    @FossPrime

    I've made a sample sandbox with both a WebContainer and a browser implemation that will currently fail but should start working once fixes are implemented and published to npm under the latest tag

    https://stackblitz.com/edit/public-bug-gcs-uploader

    Dependencies that would need to be upgraded or made optional:

    • jws (deprecated safe-buffer dependency)
      • The browser version on jws should work in Node.js
    • Pumpify (Also has a safe-buffer dependency)

    Screenshot 2022-04-20 12 09 12

    WebContainers

    Wrapping this in WebContainers might work quickly if the deprecated Node Crypto dependencies were dropped in favor of the Node 16 WHATWG WebCrypto api. The following error is what I got in my attempt to work around the lack of Chrome support.

    TypeError: this[D].init is not a function
        at new Sign (https://vitejs-vite-tgnfu8.w.staticblitz.com/blitz.49c6d2ee58ce7c1528881cc6d46ebf056b3b42bf.js:6:1135213)
        at Object.createSign (https://vitejs-vite-tgnfu8.w.staticblitz.com/blitz.49c6d2ee58ce7c1528881cc6d46ebf056b3b42bf.js:6:808195)
        at Object.sign (/home/projects/vitejs-vite-tgnfu8/node_modules/jwa/index.js:151:25)
        at Object.jwsSign [as sign] (/home/projects/vitejs-vite-tgnfu8/node_modules/jws/lib/sign-stream.js:32:24)
        at GoogleToken.requestToken (/home/projects/vitejs-vite-tgnfu8/node_modules/gtoken/build/src/index.js:225:31)
        at GoogleToken.getTokenAsyncInner (/home/projects/vitejs-vite-tgnfu8/node_modules/gtoken/build/src/index.js:163:21)
        at GoogleToken.getTokenAsync (/home/projects/vitejs-vite-tgnfu8/node_modules/gtoken/build/src/index.js:142:55)
        at GoogleToken.getToken (/home/projects/vitejs-vite-tgnfu8/node_modules/gtoken/build/src/index.js:94:21)
        at JWT.refreshTokenNoCache (/home/projects/vitejs-vite-tgnfu8/node_modules/google-auth-library/build/src/auth/jwtclient.js:171:36)
        at JWT.refreshToken (/home/projects/vitejs-vite-tgnfu8/node_modules/google-auth-library/build/src/auth/oauth2client.js:152:24)
    
  3. removed their assignment
    on Apr 26, 2022
  4. FossPrime commented on Jun 15, 2022

    @FossPrime
  5. removed
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    alt runtimesQuestions / issues for non-Node runtimesapi: storageIssues related to the googleapis/nodejs-storage API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.web

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions