Closed firumon closed 3 years ago
I suspect changing to compilerOptions.target
in tsconfig.json
to "es6"
might already help.
I suspect changing to
compilerOptions.target
intsconfig.json
to"es6"
might already help.
Yest but then there is a crash after downloading a file when you close the window on iOS.
@triniwiz any news on this plugin migration please ?
@triniwiz any news on this plugin migration please ?
@triniwiz any news on this plugin migration please ?
@firumon @sfrcnayds FYI:
https://github.com/triniwiz/nativescript-plugins/issues/15 https://twitter.com/triniwiz/status/1343501788851425281
Next Youtube (almost ready), Downloader & WebRTC
The following error is being thrown TypeError: Class constructor Observable cannot be invoked without 'new'
when I call new Downloader()
. Is this one of the issues related to migration to NS7? Is there a workaround for it please?
Also what's the status update regarding this plugin please?
any updates on this? My app upgrade to NS 7 is blocked because of this plugin only. Are there other options?
Change in file src/tsconfig.json: "target": "es5" to "target": "es6" then use the pack.sh script to rebuild the package. You can download the package from here Install the plugin from file (tns plugin add nativescript-downloader-2.1.5.tgz) and error goes away!
Hi @mdigas,
Unfortunately I'm getting this error after downloading the package and running plugin add nativescript-downloader-2.1.5.tgz
.
(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught Error: -[NSInvocation getArgument:atIndex:]: NULL address argument
If anyone knows of a solution I'd really appreciate it. It's got to the point where I can no longer provide updates to my app.
Hi @mdigas, Unfortunately I'm getting this error after downloading the package and running
plugin add nativescript-downloader-2.1.5.tgz
.(CoreFoundation) *** Terminating app due to uncaught exception 'NativeScript encountered a fatal error: Uncaught Error: -[NSInvocation getArgument:atIndex:]: NULL address argument
Hi I think that this error is in background-http: https://github.com/NativeScript/nativescript-background-http/issues/270 and 3rror404 propose a fix in that post: https://github.com/NativeScript/nativescript-background-http/issues/270#issuecomment-699504159
I think that is in ios platform. You can try 3rror404 workaround but you lose the ability to monitor progress with task.upload and task.totalUpload.
Apparently things are more complicated than just updating the target
in tsconfig.json
, otherwise I think (hope?) we'd already have gotten a new package.
Searching the bug, i found that the problem is at downloader.ios.ts line: 291 invocation.getReturnValue(ret);
And for background-http has already fix it with this patch: https://github.com/NativeScript/plugins/pull/16/files/4d28dfa34af72200aade9455bf5dd98505c7c73c
We must follow the above patch for nativescript-downloader
Btw for android platform the above plugin (https://github.com/triniwiz/nativescript-downloader/issues/54#issuecomment-802071979) works ok.
I followed the guidlines of the above fix for background-http, compiled the nativescript-downloader plugin, test it from here and let me know @7ammer....
Changes in downloader.ios.ts :
remove line 13 tasksReader = new NativePropertyReader();
remove lines 270 - end class NativePropertyReader{}
change line 87 & 164 from "const state = this.tasksReader.readProp(task, "state", interop.types.int32);" to "const state = task.state;"
Hope its working!
That's amazing! Thanks @mdigas I'll take a look soon :)
Should this really be closed without a new release?
@triniwiz/nativescript-downloader
@triniwiz/nativescript-downloader
Thank you. A link to the new source location from this repository would be nice I think...
Added to the readme @ray007
After migrating to NS7, this plugin throws errors...