Skip to content

ERROR TypeError: You provided an invalid object where a stream was expected #37

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

Open
Adam-Michalski opened this issue Mar 1, 2019 · 5 comments

Comments

@Adam-Michalski
Copy link

Adam-Michalski commented Mar 1, 2019

I have this error after adding angular-material-fileupload to my app. Funny thing is I cannot reproduce this error in https://stackblitz.com/edit/angular-materia-file-upload. But I don't think this is fault of my error in my code cause error is pointing to matFileUpload.esm.js.MergeMapOperator and I don't use this one.

aaa

"dependencies": {
"@angular/animations": "^7.0.3",
"@angular/cdk": "^7.0.2",
"@angular/common": "^7.0.3",
"@angular/compiler": "^7.0.3",
"@angular/core": "^7.0.3",
"@angular/forms": "^7.0.3",
"@angular/http": "^7.0.3",
"@angular/material": "^7.0.2",
"@angular/platform-browser": "^7.0.3",
"@angular/platform-browser-dynamic": "^7.0.3",
"@angular/router": "^7.0.3",
"@fortawesome/angular-fontawesome": "^0.3.0",
"@fortawesome/fontawesome-free": "^5.5.0",
"@fortawesome/fontawesome-svg-core": "^1.2.8",
"@fortawesome/free-brands-svg-icons": "^5.5.0",
"@fortawesome/free-solid-svg-icons": "^5.5.0",
"@ngrx/effects": "^7.0.0-beta.0",
"@ngrx/entity": "^7.0.0-beta.0",
"@ngrx/router-store": "^7.0.0-beta.0",
"@ngrx/store": "^7.0.0-beta.0",
"@ngrx/store-devtools": "^7.0.0-beta.0",
"@ngx-translate/core": "^11.0.0",
"@ngx-translate/http-loader": "^4.0.0",
"angular-material-fileupload": "^2.0.0",
"bootstrap": "^4.1.3",
"browser-detect": "^0.2.28",
"core-js": "^2.5.4",
"hammerjs": "^2.0.8",
"ngx-pipes": "^2.3.10",
"rxjs": "^6.3.3",
"uuid": "^3.3.2",
"web-animations-js": "^2.2.5",
"zone.js": "^0.8.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.13.2",
"@angular-extensions/testing-library": "^3.0.3",
"@angular/cli": "^7.0.4",
"@angular/compiler-cli": "^7.0.3",
"@angular/language-service": "^7.0.3",
"@commitlint/cli": "^7.2.1",
"@commitlint/config-conventional": "^7.1.2",
"@compodoc/compodoc": "^1.1.7",
"@types/jasmine": "~3.3.9",
"@types/jasminewd2": "^2.0.5",
"@types/node": "^11.9.4",
"all-contributors-cli": "^6.1.1",
"codelyzer": "~4.5.0",
"express": "^4.16.4",
"husky": "~1.1.3",
"jasmine-core": "~3.3.0",
"jasmine-marbles": "^0.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.0.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.4",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "~1.4.0",
"karma-spec-reporter": "~0.0.32",
"lint-staged": "^8.1.4",
"ngrx-store-freeze": "^0.2.4",
"npm-run-all": "^4.1.5",
"pa11y-ci": "^2.1.1",
"prettier": "^1.14.3",
"protractor": "^5.4.1",
"puppeteer": "^1.9.0",
"rimraf": "^2.6.2",
"standard-version": "5.0.0",
"ts-node": "~8.0.2",
"tslint": "~5.12.1",
"typescript": "~3.2.4",
"webpack-bundle-analyzer": "^3.0.3"
}

@nishantmc
Copy link
Owner

Please share the deps in package.json.

@Adam-Michalski
Copy link
Author

Adam-Michalski commented Mar 7, 2019

I also see now that upload and remove buttons doesnt work after this error cause in this StackBlitz without error works fine

@nishantmc
Copy link
Owner

@Adam-Michalski, Was trying these deps on my side, couldn't replicate the error.
Can you please provide the command which you were trying? Also when i was trying the stackblitz link you posted, the only error i get is

OPTIONS http://localhost:8180/jax-rs-jersey-application-sample net::ERR_CONNECTION_REFUSED
Since i don't have a service running. So did you make sure that the upload service is running?

@idshdx
Copy link

idshdx commented Jun 17, 2019

I have the same issue, I ll come back if I figure it out or have additional details.

I can confirm it has nothing to do with the backend, the upload is up and running.

I get the error during the component initialization. Everything works though...I can post the file.

I am using it like this:

@Component({
  selector: 'formly-field-file',
  template: `
    <input type="file" id="singleFile" [formlyAttributes]="field" [fileUploadInputFor]= "fileUploadQueue"/>
    <mat-file-upload-queue #fileUploadQueue
                           [fileAlias]="'file'"
                           [httpUrl]="'http://localhost:8000/api/song'">

      <mat-file-upload [file]="file" [id]="i" *ngFor="let file of fileUploadQueue.files; let i = index"></mat-file-upload>
    </mat-file-upload-queue>
  `,
})
export class FormlyFieldFile extends FieldType {}

If im using it HTML, not in a component template, everything is fine.

"@angular/core": "7.2.4",

@lukeintilery
Copy link

Same issue here - same as @idzer0lis. Any fix?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants