Repository navigation
Description
Only testet on iOS @nativescript/ios": "7.0.0".
Please, provide the following version numbers that your issue occurs with:
- CLI: 7.0.4
- Cross-platform modules: 7.0.0
- Runtime(s): @nativescript/ios": "7.0.0"
When I upload a file, I get the error below. The file gets uploaded correct though.
***** Fatal JavaScript exception - application has been terminated. *****
NativeScript encountered a fatal error: Uncaught Error: -[NSInvocation getArgument:atIndex:]: NULL address argument
at
readProp(file: node_modules/@nativescript/background-http/index.ios.js:218:0)
at get upload(file: node_modules/@nativescript/background-http/index.ios.js:235:0)
at onProgress(file: node_modules/@nativescript/background-http/index.ios.js:7:0)
at (file: node_modules/@nativescript/background-http/index.ios.js:78:0)
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught Error: -[NSInvocation getArgument:atIndex:]: NULL address argument
at
readProp(file: node_modules/@nativescript/background-http/index.ios.js:218:0)
at get upload(file: node_modules/@nativescript/background-http/index.ios.js:235:0)
at onProgress(file: node_modules/@nativescript/background-http/index.ios.js:7:0)
at (file: node_modules/@nativescript/background-http/index.ios.js:78:0)
', reason: '(null)'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2043a11e __exceptionPreprocess + 242
1 libobjc.A.dylib 0x00007fff20177f78 objc_exception_throw + 48
2 NativeScript 0x00000001054802b4 _ZN3tns21NativeScriptException15OnUncaughtErrorEN2v85LocalINS1_7MessageEEENS2_INS1_5ValueEEE + 882
3 NativeScript 0x00000001058ad668 _ZN2v88internal14MessageHandler25ReportMessageNoExceptionsEPNS0_7IsolateEPKNS0_15MessageLocationENS0_6HandleINS0_6ObjectEEENS_5LocalINS_5ValueEEE + 344
4 NativeScript 0x00000001058ad4c9 _ZN2v88internal14MessageHandl<…>
Activity
[-]Nativescript 7 support[/-][+]Nativescript 7 Error[/+]msaravitz commentedon Sep 19, 2020
I'm having the same issue, have you found any workaround for now?
mreall commentedon Sep 23, 2020
Has anyone figured out a workaround?
msaravitz commentedon Sep 23, 2020
I commented out the offending code in the readProp function and that has been working so far. Though I believe you will lose the upload progress tracking.
3rror404 commentedon Sep 26, 2020
Commenting line 254 of index.ios.ts / line 220 of index.ios.js prevents the crash:
invocation.getReturnValue(ret);I'm still receiving the
progressandcompleteevents with the line removed on iOS 14. I haven't tested elsewhere yet.mreall commentedon Sep 28, 2020
Thanks @3rror404, that worked for me. For anyone else fairly new to manually updating plugins and wants to fix this while waiting for the official update, here's what I did. Let me know if there's a better process.
npm setupto initialize the packages.npm startand selected@nativescript.background-http.buildto build the package.ns plugin add ../ns-plugins/plugins/dist/packages/background-httpto add the modified plugin to my app (of course you'll need to replace the path with the path on your local machine).[Fixed] NativeScript/nativescript-background-http#270
3rror404 commentedon Sep 28, 2020
A major problem with this change is that you lose the ability to monitor progress with
task.uploadandtask.totalUpload.andreasteffanoni commentedon Sep 29, 2020
Same issue. Thanks @3rror404, your workaround worked for me as well.
benediktveith commentedon Sep 29, 2020
+1
3rror404 commentedon Sep 30, 2020
There is a PR that is working great for me on iOS.
NativeScript/plugins#16
JWiseCoder commentedon Nov 2, 2020
I'm also having this issue.
luiguild commentedon Nov 18, 2020
For me in Android and iOS, using NS7 and 5.0.1 version and not working at all