toonvanstrijp / nestjs-i18n

The i18n module for nestjs.
https://nestjs-i18n.com
Other
646 stars 111 forks source link

Update to 10.4.0 breaks apollo subscriptions #604

Open apss-pohl opened 9 months ago

apss-pohl commented 9 months ago

Describe the bug

I care fully tracked down package by package and (surprisingly!) the error disappears / appears once this is updated or reverted. The error is thrown as soon as a WS subscription is made.

[+] Error       12/13/2023, 5:04:06 PM [ExceptionsHandler] You provided an invalid object where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable. - {
  stack: [
    'TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.\n' +
      '    at Object.createInvalidObservableTypeError (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/util/throwUnobservableError.js:5:12)\n' +
      '    at Object.innerFrom (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js:93:36)\n' +
      '    at doInnerSub (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:22:21)\n' +
      '    at outerNext (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/operators/mergeInternals.js:17:70)\n' +
      '    at OperatorSubscriber._this._next (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/operators/OperatorSubscriber.js:33:21)\n' +
      '    at Subscriber.next (/mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/Subscriber.js:51:18)\n' +
      '    at /mnt/share/dev/code/poc-ts-boilerplate/node_modules/rxjs/dist/cjs/internal/observable/innerFrom.js:120:28\n' +
      '    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)'
  ]
} +0ms

Reproduction

Sorry this is not doable we need client and server

System Info

npx -y @nestjs/cli info

 _   _             _      ___  _____  _____  _     _____
| \ | |           | |    |_  |/  ___|/  __ \| |   |_   _|
|  \| |  ___  ___ | |_     | |\ `--. | /  \/| |     | |
| . ` | / _ \/ __|| __|    | | `--. \| |    | |     | |
| |\  ||  __/\__ \| |_ /\__/ //\__/ /| \__/\| |_____| |_
\_| \_/ \___||___/ \__|\____/ \____/  \____/\_____/\___/

[System Information]
OS Version     : Linux 6.2
NodeJS Version : v18.18.0
NPM Version    : 10.2.5 

[Nest CLI]
Nest CLI Version : 10.2.1 

[Nest Platform Information]
platform-express version : 10.2.8
cache-manager version    : 2.1.1
microservices version    : 10.2.8
mapped-types version     : 2.0.4
passport version         : 10.0.2
graphql version          : 12.0.10
swagger version          : 7.1.15
testing version          : 10.2.8
apollo version           : 12.0.10
common version           : 10.2.8
config version           : 3.1.1
axios version            : 3.0.1
core version             : 10.2.8
jwt version              : 10.2.0
❯ npx envinfo --system --binaries --browsers
Need to install the following packages:
envinfo@7.11.0
Ok to proceed? (y) y

  System:
    OS: Linux 6.2 Ubuntu 22.04.3 LTS 22.04.3 LTS (Jammy Jellyfish)
    CPU: (16) x64 AMD Ryzen 7 PRO 5850U with Radeon Graphics
    Memory: 7.66 GB / 29.18 GB
    Container: Yes
    Shell: 5.8.1 - /usr/bin/zsh
  Binaries:
    Node: 18.18.0 - ~/.nvm/versions/node/v18.18.0/bin/node
    Yarn: 3.3.1 - ~/.yarn/bin/yarn
    npm: 10.2.5 - ~/.nvm/versions/node/v18.18.0/bin/npm
  Browsers:
    Chrome: 119.0.6045.199

Used Package Manager

yarn

Validations