igniteui-angular icon indicating copy to clipboard operation
igniteui-angular copied to clipboard

Filtering Error. You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.

Open ivanovla opened this issue 7 years ago • 11 comments

Hello. I use angular 8.0.x and igniteui-angular 8.0.x. If i use default filter mode, i get error:

TypeError: You provided an invalid object where a stream was expected. You can provide an Observable, Promise, Array, or Iterable. at subscribeTo (subscribeTo.js:27) at subscribeToResult (subscribeToResult.js:11) at TakeUntilOperator.call (takeUntil.js:12) at AnonymousSubject.subscribe (Observable.js:23) at igniteui-angular.js:27059 at DefaultIterableDiffer.forEachAddedItem (core.js:23952) at IgxChipsAreaComponent.ngDoCheck (igniteui-angular.js:27058) at checkAndUpdateDirectiveInline (core.js:27779) at checkAndUpdateNodeInline (core.js:38466) at checkAndUpdateNode (core.js:38405)

but if i use filter mode = 'excelStyleFilter' error doesn't appear.

Thanks in advanced

ivanovla avatar Jul 24 '19 07:07 ivanovla

@ivanovla Do you have any custom filtering operand on the column, or do you get this error with the default filtering configuration. Also does it happen on every column, or only on a specific column type?

kdinev avatar Jul 24 '19 07:07 kdinev

No, i hurried. This error still appears. This is my template. I use default configurations. It happen on every column

image image

ivanovla avatar Jul 24 '19 07:07 ivanovla

@ivanovla Changing the severity of this then and making it high priority.

kdinev avatar Jul 24 '19 08:07 kdinev

@ivanovla This seems like a duplicate of #5209 which leads me to believe there maybe some version mismatch in your package.json file. Can you share it?

I've tried to reproduce the error with the 8.0.2 version of our package and the 8.0.0 version of Angular but it seems to work.

rkaraivanov avatar Jul 24 '19 09:07 rkaraivanov

@ivanovla This seems like a duplicate of #5209 which leads me to believe there maybe some version mismatch in your package.json file. Can you share it?

I've tried to reproduce the error with the 8.0.2 version of our package and the 8.0.0 version of Angular but it seems to work.

Its my package.json file.

image

ivanovla avatar Jul 24 '19 09:07 ivanovla

@ivanovla

I've also tested and cannot reproduce that behavior. Here is a small sample which you can test - https://stackblitz.com/edit/angular-ovujnn. It's using [email protected] and [email protected]. Can you please share the whole content of the package.json, in order to see what version of rxjs you are using?

astaev avatar Jul 25 '19 05:07 astaev

@astaev

RxJs always was 6.5.2. Today i updated package.json. Error remained.

"dependencies": { "@angular-redux/store": "^9.0.0", "@angular/animations": "^8.0.3", "@angular/cdk": "^8.0.1", "@angular/cli": "^8.1.0", "@angular/common": "^8.0.3", "@angular/compiler": "^8.0.3", "@angular/core": "^8.0.3", "@angular/forms": "^8.0.3", "@angular/material": "^8.0.1", "@angular/material-moment-adapter": "^8.0.1", "@angular/platform-browser": "^8.0.3", "@angular/platform-browser-dynamic": "^8.0.3", "@angular/pwa": "^0.800.4", "@angular/router": "^8.0.3", "@angular/service-worker": "^8.0.3", "@ng-bootstrap/ng-bootstrap": "4.0.1", "@types/jquery": "^3.3.29", "@types/lodash": "^4.14.123", "angular-resizable-element": "^3.2.4", "animate.css": "^3.7.0", "bootstrap": "^4.3.1", "core-js": "^2.6.5", "echarts": "^4.2.1", "font-awesome": "^4.7.0", "hammerjs": "^2.0.8", "html2canvas": "^1.0.0-alpha.12", "igniteui-angular": "^8.1.0", "jquery": "^3.4.1", "js-sha512": "^0.8.0", "jspdf": "^1.5.3", "lodash": "4.17.11", "material-design-icons": "^3.0.1", "moment": "^2.24.0", "ng2-img-cropper": "^0.9.0", "ng2-odometer": "^1.1.3", "ng2-pdfjs-viewer": "^3.2.9", "ng5-slider": "^1.1.14", "ngx-color-picker": "^7.4.0", "ngx-mask": "^7.8.5", "ngx-swiper-wrapper": "^7.2.1", "npm": "^6.9.0", "pdf-annotate": "0.0.0", "pdfjs-dist": "^2.0.943", "primeicons": "^1.0.0", "primeng": "8.0.0", "redux": "^4.0.1", "rxjs": "6.5.2", "rxjs-tslint": "0.1.5", "stacktrace-js": "^2.0.0", "sweetalert2": "^7.33.1", "tesseract.js": "^1.0.19", "ts-md5": "^1.2.4", "tslib": "^1.9.0", "uuidv4": "^2.0.0", "xlsx": "^0.14.1", "ymaps": "^0.1.1", "zone.js": "~0.9.1" },

ivanovla avatar Jul 25 '19 07:07 ivanovla

@ivanovla, Could you try to delete the node_modules folder manually and re-install the npm packages? If this doesn't help, could you send us a sample application where the issue is reproducible?

DiyanDimitrov avatar Jul 25 '19 10:07 DiyanDimitrov

I brought everything to a separate repository my example, there this error does not crash. Reinstalled the modules and cleared the cache, this error does not disappear anywhere. With excel filters it is not. image

package.json

{ "name": "weldbook", "version": "0.8.16", "license": "MIT", "scripts": { "ng": "ng", "start": "node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng serve --open", "startEnvProd": "node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng serve --open -c envProd", "startProd": "node --max_old_space_size=4096 node_modules/@angular/cli/bin/ng serve --prod", "newProdBuild": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --aot --prod --base-href=/new/ --output-path=D:/OSPanel/domains/php-weldbook.ru/new", "macProdBuild": "node --max_old_space_size=8000 ./node_modules/@angular/cli/bin/ng build --aot --prod --base-href=/new/ --deleteOutputPath=false --outputPath=../build-angular-weldbook.ru", "build": "ng build", "test": "ng test", "lint": "ng lint", "e2e": "ng e2e" }, "private": true, "dependencies": { "@angular-redux/store": "^9.0.0", "@angular/animations": "^8.0.3", "@angular/cdk": "^8.0.1", "@angular/cli": "^8.1.0", "@angular/common": "^8.0.3", "@angular/compiler": "^8.0.3", "@angular/core": "^8.0.3", "@angular/forms": "^8.0.3", "@angular/material": "^8.0.1", "@angular/material-moment-adapter": "^8.0.1", "@angular/platform-browser": "^8.0.3", "@angular/platform-browser-dynamic": "^8.0.3", "@angular/pwa": "^0.800.4", "@angular/router": "^8.0.3", "@angular/service-worker": "^8.0.3", "@ng-bootstrap/ng-bootstrap": "4.0.1", "@types/jquery": "^3.3.29", "@types/lodash": "^4.14.123", "angular-resizable-element": "^3.2.4", "animate.css": "^3.7.0", "bootstrap": "^4.3.1", "core-js": "^2.6.5", "echarts": "^4.2.1", "font-awesome": "^4.7.0", "hammerjs": "^2.0.8", "html2canvas": "^1.0.0-alpha.12", "jquery": "^3.4.1", "js-sha512": "^0.8.0", "jspdf": "^1.5.3", "lodash": "4.17.11", "igniteui-angular": "^8.1.0", "material-design-icons": "^3.0.1", "moment": "^2.24.0", "ng2-img-cropper": "^0.9.0", "ng2-odometer": "^1.1.3", "ng2-pdfjs-viewer": "^3.2.9", "ng5-slider": "^1.1.14", "ngx-color-picker": "^7.4.0", "ngx-mask": "^7.8.5", "ngx-swiper-wrapper": "^7.2.1", "npm": "^6.9.0", "pdf-annotate": "0.0.0", "pdfjs-dist": "^2.0.943", "primeicons": "^1.0.0", "primeng": "8.0.0", "redux": "^4.0.1", "rxjs": "6.5.2", "rxjs-tslint": "0.1.5", "stacktrace-js": "^2.0.0", "sweetalert2": "^7.33.1", "tesseract.js": "^1.0.19", "ts-md5": "^1.2.4", "tslib": "^1.9.0", "uuidv4": "^2.0.0", "xlsx": "^0.14.1", "ymaps": "^0.1.1", "zone.js": "~0.9.1" }, "devDependencies": { "@angular-devkit/build-angular": "~0.800.0", "@angular/compiler-cli": "^8.0.0", "@angular/language-service": "^8.0.0", "@types/html2canvas": "0.0.35", "@types/jasmine": "^3.3.12", "@types/jasminewd2": "^2.0.6", "@types/jspdf": "^1.2.2", "@types/node": "10.12.17", "autoprefixer": "^9.5.0", "codelyzer": "^5.0.1", "jasmine-core": "^3.3.0", "jasmine-spec-reporter": "^4.2.1", "karma": "^4.0.1", "karma-chrome-launcher": "^2.2.0", "karma-cli": "^2.0.0", "karma-coverage-istanbul-reporter": "^2.0.5", "karma-jasmine": "^2.0.1", "karma-jasmine-html-reporter": "^1.4.0", "node-sass": "^4.12.0", "postcss": "^7.0.14", "postcss-cli": "^6.1.2", "prettier": "^1.16.4", "protractor": "^5.4.2", "ts-node": "^7.0.1", "tslint": "^5.14.0", "tslint-config-prettier": "^1.18.0", "typescript": "~3.4.5" } }

ivanovla avatar Jul 26 '19 11:07 ivanovla

@ivanovla As a last resort, if you haven't done so already, then try the following:

rm -rf node_modules && rm package-lock.json && npm install

This should completely refresh everything, because if package-lock is not deleted, then depth 2 and more dependencies don't always update correctly.

If this issue still persists, then I suggest that you go to our case system on infragistics.com and submit a ticket there. From there we can work on scheduling a session to debug this.

kdinev avatar Jul 29 '19 13:07 kdinev

Thanks of support. I create custom filters and i got remote data from server with using filterMode = 'excelStyleFiltering'. It decision my ploblem.

ivanovla avatar Jul 31 '19 14:07 ivanovla