Closed AklsKiu closed 4 years ago
I have the same with " Cannot convert object to Ljava/lang/String; at index 0". Did you find a solution @AquilesOliveira
I think that this problem happen when you try to pass a non string value in parameter.
const params = [ { name: 1, value: 1 }, { name: "fileToUpload", filename: this.file, mimeType: 'image/jpeg' }];
I will test more to make sure that this is the problem.
I have the same with " Cannot convert object to Ljava/lang/String; at index 0". Did you find a solution @AquilesOliveira
The quickest and simplest solution is to form the string variable as @romulowspp said and until the correction comes out, I'm using it this way.
Thanks @romulowspp!!!!
The fix is released in nativescript-background-http@4.2.1
JS: ERROR Error: Uncaught (in promise): Error: Cannot convert number to Ljava/lang/String; at index 1 JS: Error: Cannot convert number to Ljava/lang/String; at index 1 JS: at getMultipartRequest (file:///node_modules/nativescript-background-http/background-http.js:261:0) JS: at Function.push.../node_modules/nativescript-background-http/background-http.js.Task.createMultiPart (file:///node_modules/nativescript-background-http/background-http.js:162:0) JS: at Session.push.../node_modules/nativescript-background-http/background-http.js.Session.multipartUpload (file:///node_modules/nativescript-background-http/background-http.js:132:0) JS: at file:///src/app/services/rest/rest.service.ts:232:25 JS: at new ZoneAwarePromise (file:///node_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:902:0)