I'm using the @robinbobin/react-native-google-drive-api-wrapper for GDrive file access. I can sign in with the @react-native-google-signin/google-signin to get the access token. But when I try to access the google drive (tried gdrive.files.list({}) and gdrive.about.get('*')), I always get the "Error-> [AbortError: Aborted]" with the "LOG" tag due to timeout.
LOG Error-> [AbortError: Aborted]
I've also tried the RobinBobin/gdrivetest project from https://github.com/RobinBobin/gdrivetest. Still got the same "Error-> [AbortError: Aborted]" message.
Any help is appreciated!
Related Code:
// Signin configure
GoogleSignin.configure({
scopes: [
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
'https://www.googleapis.com/auth/drive.appfolder',
'https://www.googleapis.com/auth/drive.readonly',
],
});
// GDrive access
const gdrive = new GDrive();
gdrive.accessToken = (await GoogleSignin.getTokens()).accessToken;
gdrive.fetchCoercesTypes = true
gdrive.fetchRejectsOnHttpErrors = true
gdrive.fetchTimeout = 30000
console.log(await gdrive.about.get('*'));
// Tried this as well
let data = await gdrive.files.list({
q: new ListQueryBuilder()
.e('folderId', '1cU1OKC9K20DivHcdMeIhwMWGThIudLEB')
.in('root', 'parents'),
})
Google Drive API Setup:
Enabled APIs:
Google Drive API
App Engine Admin API
BigQuery API
BigQuery Migration API
BigQuery Storage API
Cloud Datastore API
Cloud Debugger API
Cloud Logging API
Cloud Monitoring API
Cloud Pub/Sub API
Cloud Resource Manager API
Cloud Runtime Configuration API
Cloud SQL
Cloud Storage
Cloud Storage API
Cloud Testing API
Cloud Trace API
FCM Registration API
Firebase App Distribution API
Firebase Cloud Messaging API
Firebase Dynamic Links API
Firebase Hosting API
Firebase Installations API
Firebase Management API
Firebase Remote Config API
Firebase Rules API
Google Cloud APIs
Google Cloud Storage JSON API
Identity Toolkit API
Mobile Crash Reporting API
Service Management API
Service Usage API
Token Service API