Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript Bug Requesting Uint8Array on Publishing Message but will result in error and still needs Buffer #1988

Open
passsionforprogramming opened this issue Oct 20, 2024 · 0 comments
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@passsionforprogramming
Copy link

  1. Is this a client library issue or a product issue?
    Client Library

  2. Did someone already solve this?
    no

  3. Do you have a support contract?
    No

Environment details

  • OS:
  • Node.js version:
  • npm version:
  • @google-cloud/pubsub version: 4.8.0

Steps to reproduce

  1. Use typescript version 5.6.3
  2. Notice that for the pubSubClient.publishMessage method it asks for a Uint8Array and says that a buffer is not assignable to type Uint8Array or string or blah blah.
  3. Convert the buffer to a Uint8Array and process.
Screenshot 2024-10-19 at 6 59 31 PM
  1. Notice that an error will be thrown with the error message "TypeError: Data must be in the form of a Buffer."

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

@passsionforprogramming passsionforprogramming added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Oct 20, 2024
@product-auto-label product-auto-label bot added the api: pubsub Issues related to the googleapis/nodejs-pubsub API. label Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the googleapis/nodejs-pubsub API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

1 participant