Warning: .then() only accepts functions but was passed: [object Null], [object Null]
See original GitHub issueHi
I use angular with bluebird for promises. Decorating default angular’s $q: $provide.decorator("$q", function(){...});
When i call the service Upload.upload()
then a warning is issued in the console:
Warning: .then() only accepts functions but was passed: [object Null], [object Null]
at Promise.ngFileUpload.service.promise.progress (webpack:///./src/main/webapp/bower_components/ng-file-upload/ng-file-upload.js?:92:15)
at uploadFile (webpack:///./src/main/webapp/app/scripts/orm/lib/ui/field/objects/objects.js?:277:12)
at Scope.angular.module.controller.$scope.upload (webpack:///./src/main/webapp/app/scripts/orm/lib/ui/field/objects/objects.js?:258:13)
at Object.eval [as fn] (webpack:///./src/main/webapp/app/scripts/orm/lib/ui/field/objects/objects.js?:324:16)
at Scope.$get.Scope.$digest (webpack:///./src/main/webapp/bower_components/angular/dist/angular.js?./~/exports-loader?window.angular:14537:29)
at Scope.$get.Scope.$apply (webpack:///./src/main/webapp/bower_components/angular/dist/angular.js?./~/exports-loader?window.angular:14800:24)
at eval (webpack:///./src/main/webapp/bower_components/angular/dist/angular.js?./~/exports-loader?window.angular:16537:36)
at completeOutstandingRequest (webpack:///./src/main/webapp/bower_components/angular/dist/angular.js?./~/exports-loader?window.angular:5153:10)
at eval (webpack:///./src/main/webapp/bower_components/angular/dist/angular.js?./~/exports-loader?window.angular:5541:7)
Everything is normal or not? ngFileUpload version 5.0.6
Issue Analytics
- State:
- Created 8 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Bluebird Promise Warning: .then only accepts functions but ...
The getPromise2() call immediately creates the promise; it then is ignored being passed to then instead of a callback.
Read more >Warning: .then() only accepts functions but was passed
Trying to call this chain: yup .reach(schema, path) .label(label) .validate();. I got this error when using the promise:
Read more >Warning Explanations - Bluebird.js
Warning : .then() only accepts functions; Warning: a promise was rejected with a non-error; Warning: a promise was created in a handler but...
Read more >Avoid Check for Null Statement in Java - Baeldung
Learn about the Null Object Pattern and how to implement it in Java ... The print() method call would just print “null” but...
Read more >Understanding null safety - Dart programming language
Most existing Dart code is dynamically correct and does not throw null ... If a function accepts String? then passing a String is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Rush
BLUEBIRD_WARNINGS = 0
https://github.com/petkaantonov/bluebird/blob/aefda6abbda2e7f146b51c18daaa45dc0f17d89b/src/debuggability.js#L21Sounds like there should be some way to disable this warning.