RobinBobin / react-native-google-drive-api-wrapper

This wrapper facilitates the use of the Google Drive API in React Native projects.
110 stars 43 forks source link

DOMException: Aborted while getting bigger size file from google drive #71

Closed NTJ3 closed 2 years ago

NTJ3 commented 2 years ago

@RobinBobin getting this error while getting binary for bigger file. I'm trying with file size almost 20mb

     gdrive.files
      .getBinary(item.id, undefined, '2').then((resGetMetadata) => {
        console.log(resGetMetadata);
      }).catch((err) => {
        console.log(err);
      });
RobinBobin commented 2 years ago

Getting what error? Copy/Paste the error text.

My wild guess, it's a timeout issue, though. Search for fetchTimeout in the docs.

NTJ3 commented 2 years ago

DOMException: Aborted Exact this is the error

ThreeHAN commented 2 years ago

I routinely get an "abort" error when I try to upload files. It works though, probably 80% of the time. @NTJ3 did you find any solution? {message: 'Aborted' name: 'AbortError'}

ThreeHAN commented 2 years ago

Tyring to set fetchTimeout to 10 seconds to see if that helps.

That seems to do the trick. I can force the error by setting the timeout super low.

gdrive.fetchTimeout = 10000 is working for me now.

RobinBobin commented 2 years ago

I'll close it, since it's been inactive for a while.