You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The bug occurs upon calling a next.js api which uses the filesUpload() or filesCreateFolderV2() function. It will automatically close the request returning this.fetch is not a function error.
Regarding when the error occurs during the api call, it seems to occur within the instance/import itself since it is the only thing logged during the request which means it did not proceed into the middlewares/services.
The bug seems to only occur on the deployed application. It cannot be replicated in local. We also have updated the environment variables (Client Secret, Refresh Token, Access Token) but to no avail.
Dropbox Instance:
import { Dropbox } from 'dropbox';
const dbx = new Dropbox({
refreshToken: process.env.DROPBOX_REFRESH_TOKEN,
clientId: process.env.DROPBOX_CLIENT_ID,
clientSecret: process.env.DROPBOX_CLIENT_SECRET,
});
Screenshots:
Versions
What version of the SDK are you using? 10.34.0
What version of the language are you using? Node 18.x.0 , Next.js 14.0.4
Are you using Javascript or Typescript? Javascript
What platform are you using? (if applicable) Vercel
The text was updated successfully, but these errors were encountered:
The Dropbox JavaScript SDK uses this.fetch to perform the network requests to the Dropbox API servers for the Dropbox API calls. In a Node environment, that is supposed to get set from node-fetch. Is there some reason that may not be working (for instance, is node-fetch not properly installed?) or may be overwritten by something else in your deployed application?
Thanks for following up. I'm glad to hear you got this working.
It sounds like this is related to something in that particular environment, but if you find there's something in the Dropbox SDK itself that needs to be addressed, please let us know so we can look into it.
The bug occurs upon calling a next.js api which uses the
filesUpload()
orfilesCreateFolderV2()
function. It will automatically close the request returningthis.fetch is not a function
error.Regarding when the error occurs during the api call, it seems to occur within the instance/import itself since it is the only thing logged during the request which means it did not proceed into the middlewares/services.
The bug seems to only occur on the deployed application. It cannot be replicated in local. We also have updated the environment variables (Client Secret, Refresh Token, Access Token) but to no avail.
Dropbox Instance:
Screenshots:
Versions
The text was updated successfully, but these errors were encountered: