Closed Zhongjie-Lin closed 1 year ago
Try increasing fetch timeout. Looks like your internet connection isn't perfect.
Same error for me also.. It is working fine in some cases but in most cases it is given Abort error
@RobinBobin Your comment gives me some idea. I was using the android simulator to test the app and it always gives the AbortError, but when I switch to my cell phone, everything seems working fine at least for now.
const gdrv = new GDrive() gdrv.fetchTimeout = 3000 // or more //actually the default is 1500 and this can be a bit small time for timeout so, always increase the fetchtimout according to //your use case.
Thanks @sam-uraii for your comment! However, in my last trial on the simulator, I set this value to 300000 and it still yields a AbortError for me.
ohhhh!!! then the AbortError should be more explanatory...
Thanks @sam-uraii my error solved by giving gdrive.fetchTimeout = 3000
@manikanta700 welcome...
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({})
andgdrive.about.get('*')
), I always get the "Error-> [AbortError: Aborted]" with the "LOG" tag due to timeout.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:
Google Drive API Setup:
Enabled APIs: