FileUploaderPlugin icon indicating copy to clipboard operation
FileUploaderPlugin copied to clipboard

iOS - Error uploading image

Open JasonSa1993 opened this issue 5 years ago • 2 comments

Object reference not set to an instance of an object at Plugin.FileUploader.FileUploadManager.DidCompleteWithError (Foundation.NSUrlSession session, Foundation.NSUrlSessionTask task, Foundation.NSError error) [0x0016a] in <70253a076b8d47719b69a44e035ed031>:0 at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr) at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.10.0.17/src/Xamarin.iOS/UIKit/UIApplication.cs:86

at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x0000e] in /Library/Frameworks/Xamarin.iOS.framework/Versions/13.10.0.17/src/Xamarin.iOS/UIKit/UIApplication.cs:65

at Ecopropiedad.iOS.Application.Main (System.String[] args) [0x00001] in /Users/jasonsa/Desktop/Proyectos_Xamarin/Ecopropiedad_iOS/Ecopropiedad/Ecopropiedad.iOS/Main.cs:17

Version Number of Plugin: 1.4.0 Device Tested On: iPhone 8 Plus Simulator Tested On: - Version of VS: Visual Studio for Mac COMMUNITY Versión 8.4.4 (build 91) Version of Xamarin: 4.4.0.991640 Versions of other things you are using:

Steps to reproduce the Behavior

You choose an image either taken with the camera or the gallery, it is sent to the await function CrossFileUploader.Current.UploadFileAsync with its respective url of and fails taking me immediately to the Main.cs and does not fall into any error method or success of the plugin

Expected Behavior

That the image is sent and follow the Current_FileUploadCompleted function

Actual Behavior

It is broken by sending the error in the Main.cs Object reference not set to an instance of an object

Code snippet

Screenshotst

fileUploader_error

JasonSa1993 avatar Feb 08 '20 23:02 JasonSa1993

i have the same problem.

ufukhawk avatar May 07 '20 14:05 ufukhawk

Hi guys, Here you can find the "fix" for this issue: https://forums.xamarin.com/discussion/170847/an-error-occurred-on-the-xpc-connection-to-setup-the-background-session

andreiionita avatar Jan 21 '21 11:01 andreiionita