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.

t.buffer is not a function

See original GitHub issue

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 !

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
greg-dbcommented, Mar 16, 2018

@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

1reaction
elsighcommented, Mar 11, 2018

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to fix 'TypeError: Buffer.from is not a function'?
While trying to use ipfs-api in my application, I am getting below error: ERROR TypeError: Buffer. from is not a function at varintEncode...
Read more >
react native t.buffer is not a function · Issue #178 - GitHub
Hi, I'm using this module in a react native environment. All seems to work well, except when I attempt to download a file...
Read more >
Node.js Buffer Module - W3Schools
The buffers module provides a way of handling streams of binary data. The Buffer object is a global object in Node.js, and it...
Read more >
Response.arrayBuffer() - Web APIs - MDN Web Docs
The arrayBuffer() method of the Response interface takes a Response stream and reads it to completion. It returns a promise that resolves ...
Read more >
Api v2 for filesGetThumbnail gives t.buffer not a function error
Solved: Hi, when i try to get thumbnail for any file inside my folder i have the same error for different types os...
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