Skip to content

this.fetch is not a function error received #1132

@soybeins

Description

@soybeins

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:
image
image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions