rxjs icon indicating copy to clipboard operation
rxjs copied to clipboard

TypeError: You provided an invalid object where a stream was expected.

Open Aidar-Frontend-Developer opened this issue 2 years ago • 7 comments

Describe the bug

After updating Chrome on 97.0.4692.71, I have got some interesting bugs, when I import method 'from' like import { from } from 'rxjs' i have TypeError: You provided an invalid object where a stream was expected. But on Firefox and Safari, it works, and when I try to import method 'from' like import { from } from 'rxjs/internal/observable/from' it works on Google Chrome but not working for Firefox and Safari. I am using "rxjs": "^6.5.5", all this problem cause when i try to do next const $store = from(store); store - is Redux store.

Expected behavior

I am expected the method 'from' should work on all browsers equally.

Reproduction code

import { from } from 'rxjs';
const $store = from(store);

Reproduction URL

No response

Version

6.5.5

Environment

No response

Additional context

No response

It was caused by redux dev tools plugin

I caught a similar issue and landed here. for anyone following this up now or in the future, here is the rest of the conversation https://github.com/reduxjs/redux-devtools/issues/1028

naticaceres avatar Jan 31 '22 21:01 naticaceres

this was not an rxJs error to begin with, and it was fixed and closed by redux-devtools recently too. 👉 https://github.com/reduxjs/redux-devtools/issues/1028#issuecomment-1032050160

This issue should be closed here as well.

naticaceres avatar Feb 21 '22 22:02 naticaceres

I am getting this error too. And not using redux. It happens when I upgrade above 7.5.2. I can repeatedly upgrade/downgrade to provoke/get rid of this error. This is the project: https://github.com/barbalex/vermehrung

barbalex avatar Mar 11 '22 16:03 barbalex

I am still getting this on ANY attempt to upgrade rxjs. Seems like my project has arrived at a dead end. The only solution will be to replace rxjs with a different tool.

barbalex avatar Apr 12 '22 19:04 barbalex

I am getting this error too. And not using redux. It happens when I upgrade above 7.5.2. I can repeatedly upgrade/downgrade to provoke/get rid of this error. This is the project: https://github.com/barbalex/vermehrung

Could you please provide with a codesandbox/stackblitz demo that reproduces this issue, or if you want me to try to debug it in your own project, could you please at least provide the exact steps to reproduce the issue?

josepot avatar Apr 12 '22 20:04 josepot

I have no idea how to break this down to a simple reproducible demo. Sorry. I would if I knew.

With my own project:

  • clone
  • yarn;yarn dev;
  • watch it build successfully (and then break because backend is missing)
  • update rxjs
  • watch the error appear while building (the app would not run correctly without a backend but the build breaks earlier anyway)

Actually: I have not been able to update ANY dependency any more. Anything that changes yarn.lock seems to provoke this error, even if it was not rxjs itself that was changed. It feels like my yarn.lock file contains some combination of rxjs and it's dependencies that works. But any small difference makes it blow up.

I have decided to migrate to a different architecture though. It will be a lot of work. But I used it in a different App and am very happy with it while using rxjs seemed rather verbose. So this problem just pushed me far enough to decide on the painful migration.

So though this might be a chance to find a bug that might help others, for me you do not need to spend to much time on it (you owe me nothing anyway - and thanks for working on such great tools!).

barbalex avatar Apr 12 '22 20:04 barbalex