You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2021/06/04 11:37:44 UTC

[GitHub] [cordova-plugin-file-transfer] usamasharif opened a new issue #304: Getting http-status="401", code = 3 when uploading file in iOS. In Android it works fine.

usamasharif opened a new issue #304:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/304


   # Bug Report
   
   ## Problem
   Getting http-status="401", code = 3 when uploading file in iOS.
   
   ### What is expected to happen?
   It should submit the file to server as it is working in Android.
   
   
   ### What does actually happen?
   It gives the error below when submitted in iOS.
   FileTransferError {
       body = "[]";
       code = 3;
       "http_status" = 401;
       source = "file:///var/mobile/Containers/Data/Application/9A7C2CF0-6DF7-4878-B0A9-5DEE99047652/Documents/637584019181140096_question.png";
       target = "https://acceptance-nl.castoredc.org/api/study/F43BFEEC-588F-4E8A-BC26-6A974B83D08B/record/000842/data-point/survey/85E4F1D1-6219-4CAC-A248-7AEE91023221/9C245F0C-5573-45BC-80EB-BF97D17F7F73";
   }
   
   
   ## Information
        const fileTransfer = this.fileTransfer.create();
       const options: FileUploadOptions = {
         fileKey: 'upload_file',
         fileName: 'image.jpeg',
         httpMethod: 'POST',
         mimeType: 'image/jpeg',
         headers: {
           Accept: '*/*',
           ...(secure && { Authorization: `Bearer ${await this.storageSvc.get<string>(STORAGE_TOKEN, true)}` }),
         },
         params: { ...params },
       };
       return fileTransfer.upload(filePath, `${this._apiRoot}api/${uri}`, options);
   
   
   ### Environment, Platform, Device
   Ionic:
   
      Ionic CLI                     : 6.14.1 (/Users/usama/.nvm/versions/node/v14.15.4/lib/node_modules/@ionic/cli)
      Ionic Framework               : @ionic/angular 5.5.4
      @angular-devkit/build-angular : 0.901.14
      @angular-devkit/schematics    : 11.2.1
      @angular/cli                  : 9.1.14
      @ionic/angular-toolkit        : 2.3.3
   
   Cordova:
   
      Cordova CLI       : 10.0.0
      Cordova Platforms : android 9.0.0, ios 6.2.0
      Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, cordova-plugin-ionic 5.4.7, (and 16 other plugins)
   
   Utility:
   
      cordova-res : 0.15.3
      native-run  : 1.3.0
   
   System:
   
      Android SDK Tools : 26.1.1 (/Users/usama/Library/Android/sdk/)
      ios-deploy        : 1.11.4
      ios-sim           : 8.0.2
      NodeJS            : v14.15.4 (/Users/usama/.nvm/versions/node/v14.15.4/bin/node)
      npm               : 6.14.10
      OS                : macOS Big Sur
      Xcode             : Xcode 12.5 Build version 12E262
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] sKuD51 commented on issue #304: Getting http-status="401", code = 3 when uploading file in iOS. In Android it works fine.

Posted by GitBox <gi...@apache.org>.
sKuD51 commented on issue #304:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/304#issuecomment-888564739


   Hi, same bug. do you find a solution ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] sKuD51 commented on issue #304: Getting http-status="401", code = 3 when uploading file in iOS. In Android it works fine.

Posted by GitBox <gi...@apache.org>.
sKuD51 commented on issue #304:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/304#issuecomment-897135625


   Hi,
   
   I change my uploading method in using FormData and it works.
   
   Le mer. 11 août 2021 à 19:20, Ramiro Díaz Ramos ***@***.***>
   a écrit :
   
   > Hi, i get the same bug, in my case i got this bug in IOS 14.6
   >
   > —
   > You are receiving this because you commented.
   > Reply to this email directly, view it on GitHub
   > <https://github.com/apache/cordova-plugin-file-transfer/issues/304#issuecomment-897007477>,
   > or unsubscribe
   > <https://github.com/notifications/unsubscribe-auth/ACKKAPHIPFEAPY5GCR2UNUDT4KWNVANCNFSM46CUITSQ>
   > .
   > Triage notifications on the go with GitHub Mobile for iOS
   > <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
   > or Android
   > <https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
   > .
   >
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] sKuD51 edited a comment on issue #304: Getting http-status="401", code = 3 when uploading file in iOS. In Android it works fine.

Posted by GitBox <gi...@apache.org>.
sKuD51 edited a comment on issue #304:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/304#issuecomment-888564739


   Hi, same bug. The appear on production environment only, in local dev, all works fine. Do you find a solution ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] sKuD51 edited a comment on issue #304: Getting http-status="401", code = 3 when uploading file in iOS. In Android it works fine.

Posted by GitBox <gi...@apache.org>.
sKuD51 edited a comment on issue #304:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/304#issuecomment-888564739


   Hi, same bug. It appears on production environment only, in local dev, all works fine. Do you find a solution ?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


[GitHub] [cordova-plugin-file-transfer] RamiserjTankian commented on issue #304: Getting http-status="401", code = 3 when uploading file in iOS. In Android it works fine.

Posted by GitBox <gi...@apache.org>.
RamiserjTankian commented on issue #304:
URL: https://github.com/apache/cordova-plugin-file-transfer/issues/304#issuecomment-897007477


   Hi, i get the same bug, in my case i got this bug in IOS 14.6


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org