dropbox-sdk-js: t.buffer is not a function

Hi all,

I am trying to evaluate dropbox sdk in a cordova project (base on Framework 7 template / vue.js). Uploading files works fine, but I get an error in download it
My code that cause an error is the following :

dbxt
          .filesDownload({
            path: "/easysubstest.data"
          })
          .then(function(data) {
            console.log(data);
            /*var reader = new FileReader();
            reader.readAsText(response.fileBlob);
            reader.onloadend = function() {
              alert("data restored successfully!");
              updateImage(this.result);
            };*/
          })
          .catch(function(error) {
            console.error(error.message);
          });

The trace of the error

[Error] t.buffer is not a function. (In ‘t.buffer()’, ‘t.buffer’ is undefined) (fonction anonyme) (cordova.js:1731) (fonction anonyme) (41382e06b346faf19af6.main.js:34467) promiseReactionJob

Am I missing something ? I am new to this environment .

Thanks !

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 1
  • Comments: 16 (13 by maintainers)

Commits related to this issue

Most upvoted comments

@ponkin This may depend on the particular environment you’re running in. Please refer to my earlier comment here for a potential solution:

https://github.com/dropbox/dropbox-sdk-js/issues/172#issuecomment-361650716

The fact that the code doesn’t also try to detect the existence of t.buffer feels like a bug.