Closed nicHoch closed 6 years ago
that would be awesome.
@nicHoch it's done 😄 both has a default of 60s now also you can now set the timeout with the static method setTimeout()
all request will use the same timeout
@triniwiz Thaks for the update - very mush appreciated! the extended default timeout on Android is working very well. But if i use the static setTimeout method as shown in the readme
Downloader.init();
Downloader.setTimeout(90);
i got following error:
System.err: com.tns.NativeScriptException:
System.err: Calling js method run failed
System.err: TypeError: manager.setTimeout is not a function
System.err: File: "file:///data/data/com.thecrag.thecragapp/files/app/tns_modules/nativescript-downloader/downloader.js, line: 21, column: 16
System.err: StackTrace:
System.err: Frame: function:'Downloader.setTimeout', file:'file:///data/data/com.thecrag.thecragapp/files/app/tns_modules/nativescript-downloader/downloader.js', line: 21, column: 17
System.err: Frame: function:'', file:'file:///data/data/com.thecrag.thecragapp/files/app/pages/init/init.js', line: 138, column: 62
any ideas?
i already cleaned the platform/android and tempPlugin folder.
@nicHoch try nuking the platforms it should pull in the new lib the plugin uses 😄
@triniwiz hmmm i nuked everything but still the same error.
@triniwiz I have the same error as @nicHoch when using Downloader.setTimeout() - nuked everything before
Can you try calling the after the app has started app.on('launch',function(){ .Downloader.setTimeout() })
@triniwiz It still shows Error (different app): ERROR TypeError: manager.setTimeout is not a function
I know this issue is closed, but using version 2.1.0 I am seeing the same behavior. It doesn't matter at what point in the app lifecycle it is called, the error "manager.SetTimeout is not a function" happens every way that I've tried it.
I have the same problem. 😓
JS: ERROR Error: Uncaught (in promise): TypeError: manager.setTimeout is not a function
JS: TypeError: manager.setTimeout is not a function
JS: at Function.Downloader.setTimeout (file:///data/data/app.xplatform.downloadmanager/files/app/tns_modules/nativescript-downloader/downloader.js:21:17)
JS: at Object.<anonymous> (file:///data/data/app.xplatform.downloadmanager/files/app/app/home/home.component.js:7:38)
JS: at require (<anonymous>:1:266)
JS: at Object.<anonymous> (file:///data/data/app.xplatform.downloadmanager/files/app/app/home/home-routing.module.js:5:24)
JS: at require (<anonymous>:1:266)
JS: at Object.<anonymous> (file:///data/data/app.xplatform.downloadmanager/files/app/app/home/home.module.js:6:29)
JS: at require (<anonymous>:1:266)
JS: at file:///data/data/app.xplatform.downloadmanager/files/app/tns_modules/tns-core-modules/globals/globals.js:81:32
JS: at new ZoneAwarePromise (file:///data/data/app.xplatform.downloadmanager/files/app/tns_modules/nativescript-angular/zone-js/dist/zone-nativescript.js:902:...
√ Getting NativeScript components versions information...
‼ Update available for component nativescript. Your current version is 5.2.0 and the latest available version is 5.2.1.
√ Component tns-core-modules has 5.2.2 version and is up to date.
√ Component tns-android has 5.2.1 version and is up to date.
√ Component tns-ios has 5.2.0 version and is up to date.
also seeing the same issue
Same here, TypeError: manager.setTimeout is not a function for android
Hi i using the plugin to download large JSON data from an API endpoint. It is working well. But some endpoints are very computational intensive and I get a timeOut message before any data arrived.
is there a way how to configure the timeout for the Time to first byte?
Which platform(s) does your issue occur on?