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

[AbortError: Aborted] while listing files #67

Closed RoshanNepal closed 2 years ago

RoshanNepal commented 2 years ago

I am trying to list files stored in the google drive. Sometimes it works but most of the time I get [AbortError: Aborted] error.

try{ gdrive.accessToken = (await GoogleSignin.getTokens()).accessToken; let data = await gdrive.files.list({ q: new ListQueryBuilder() .e('name', 'fileName') .and() .e('mimeType', 'application/octet-stream'), }); } catch(e){ console.log(e) }

anferrat commented 2 years ago

It's probably time-out for your fetch request. set gdrive.fetchTimeout = -1 for infinite time out. Check docs for more

RoshanNepal commented 2 years ago

It works. Thank you