-
Notifications
You must be signed in to change notification settings - Fork 351
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
t.buffer is not a function #172
Comments
|
The stack you provided does not seem to include any Dropbox library file. Can you double check that this is the right code and right stack? We don't have any specific support for Framework 7/vue.js in particular, but if this is happening in Dropbox code, if you can supply a sample project that reproduces the issue we can take a look. |
|
Hi, the error is triggered inside dropbox-sdk.min-js, which is embed by webpack in a file autogenerated name 41382e06b346faf19af6.main.js in the stack provided, in the following code : |
|
Thanks! I think I see what's going on here. It sounds like you're including the Dropbox library as node dependency in your project, which is getting bundled up for use in the browser by webpack. The library isn't meant to run to run like this though, so it's failing on that Instead, you can include the Dropbox library via a normal I'll send this along as a request for better support for this though. |
|
Hi, I tried your way but it is not working in my project (or maybe I did it the wrong way). It is strange since this is the only method that doesn't work. Like it was suggested in another post, I managed to download a file previoulsy uploaded however by using a combination of filesGetTemporaryLink and cordova fileTransfer.download . |
|
What error do you get with that technique? I was able to reproduce the original |
|
Hi, Do you have any idea why it is not working through webpack ? |
|
What error are you getting? I can't offer support for webpack, but I can take a look in case it's related to Dropbox in particular. |
|
It was a webpack error, I have modified the project so I can't produce it quickly, but since I have a workaround for now It is not a problem anymore. Thanks for your help |
|
just an update : I tried to debug without the minified version : the error occurs on this line in Dropbox-sdk.js:
isWindowOrWorker returns false, but on res blobl() returns my blob, buffer is undefined. In function : typeof WorkerGlobalScope -> undefined if i modify it to return true like the following, it works, but I don't know if there is any other impact . |
|
The problem with the above fix is that it won't work on nodejs since |
|
The fact that the code doesn't also try to detect the existence of |
|
Are there any workarounds on this issue? |
|
@ponkin This may depend on the particular environment you're running in. Please refer to my earlier comment here for a potential solution: |
|
Loading in a |
|
The original |
|
I can confirm that this version (4.0.3) works in I had to fix references to |
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 :
The trace of the error
Am I missing something ? I am new to this environment .
Thanks !
The text was updated successfully, but these errors were encountered: