cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Share your feedback on the Document Scanning Experience in the Dropbox App right here.

Discuss Dropbox Developer & API

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Batch Upload session in Mobile Browser Error

Batch Upload session in Mobile Browser Error

feltj16
Explorer | Level 4
Go to solution

Hi, I have build an dropbox uploader in the web using the  await dbx.filesUploadSessionStart and it works great in the desktop and mobile.

However It causes an error in the mobile browser if we select the files only from google drive. This error happens only in the mobile browser. There is a TypeError, Failed to fetch error, which I guess it might be cors issue ?

 

May I know how I can fix this ?

Thank you.

1 Accepted Solution

Accepted Solutions

Greg-DB
Dropbox Staff
Go to solution

Thanks! It looks like this is a bug in Chrome Android/Google Drive. There's a post about this here: https://stackoverflow.com/questions/62714319/attached-from-google-drivecloud-storage-in-android-file...

View solution in original post

7 Replies 7

Greg-DB
Dropbox Staff
Go to solution

I'll be happy to help with any issues you're having with the Dropbox API, but I'll need some more information. Please reply with:

 

  • the name and version number of the browser you are using
  • the version number of the Dropbox SDK you are using
  • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
  • the full text of any error or unexpected output

feltj16
Explorer | Level 4
Go to solution
  • the name and version number of the browser you are using
    • Chrome in Mobile Android
    • Chrome 110.0.5481.65
    • Android 10
  • the version number of the Dropbox SDK you are using
  • the steps to reproduce the issue, including relevant code snippet(s), but don't include any access or refresh token(s)
    • It got error in the filesUploadSessionStart.

      .........
      var file = fileInput.files[i];
      var filename = fileInput.files[i].name;


      try {
      let res = await dbx.filesUploadSessionStart({
      contents: file,
      close: true,
      });
       
      }
      catch(err) {
            document.getElementById("v1").value += "error "+err+" : ";
      }
      var obj = res;
      var str = JSON.stringify(obj);
      ...
  • the full text of any error or unexpected output
    • Since its in mobile, there is no console for me to debug, but here is the error I can get -> TypeError: Failed to fetch

Greg-DB
Dropbox Staff
Go to solution

Thanks for the additional information. I don't see anything clearly wrong in your code, and since it only happens with files from Google Drive, it sounds like there's something unique to how the files are returned from Google Drive.

 

Can you try using Chrome Remote Debugging to see if you can get a more specific error?

feltj16
Explorer | Level 4
Go to solution

Attached is the error -> ss1.pngss2.png

Greg-DB
Dropbox Staff
Go to solution

Thanks! It looks like this is a bug in Chrome Android/Google Drive. There's a post about this here: https://stackoverflow.com/questions/62714319/attached-from-google-drivecloud-storage-in-android-file...

feltj16
Explorer | Level 4
Go to solution

I see. So I believe we can't do anything about it then right..Thank you..

Greg-DB
Dropbox Staff
Go to solution

Unfortunately that's not a bug that Dropbox can fix ourselves, as we don't own those products. There are some potential workarounds mentioned there that you may want to try though.

Need more support?