question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Warning: .then() only accepts functions but was passed: [object Null], [object Null]

See original GitHub issue

Hi 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:closed
  • Created 8 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

0reactions
Rushcommented, Aug 15, 2015

Sounds like there should be some way to disable this warning.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found