Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6313] Ti.urlSession outdated

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules
Labelsmodule, urlsession
ReporterAlexander
AssigneeShak Hossain
Created2019-07-19T10:32:38.000+0000
Updated2019-11-14T15:46:51.000+0000

Description

my app uses ti.urlsession v2.2.0 and it crashes while downloading in the background after a short period (30s) with this log: Forcing crash report with description: APPNAME:500 has active assertions beyond permitted time: (owner: nsurlsessiond:111) the method "backgroundSessionConfiguration" is deprecated according to: https://developer.apple.com/documentation/foundation/urlsessionconfiguration is the module ti.urlSession still up to date?

Attachments

FileDateSize
testurlsession2.zip2019-08-22T10:48:21.000+00008644111

Comments

  1. Rakhi Mitro 2019-07-22

    Hello [~Alexander Baars], Thanks for reaching out to us. It would be great if you can share a sample test code and complete console logs which will be helpful reproduce the issue on our end.
  2. Rakhi Mitro 2019-08-08

    Hello! Hope you are doing fine today. Would you please reply us regarding previous reviews? We are looking forward to your response.
  3. Alexander 2019-08-22

    Hello, I created a test app with the sample from the urlsession module. (added) The sample is slightly unfinished. Some logging renders undefined, the localnotification registration is missing. I changed the images downloads for (larger) audio files for test purposes. Steps to reproduce: If a download is started from the rightnav button and the app is pushed to the background subsequently, before de download finishes, this happens: The app finishes the download and saves the file. Afterwards the app is killed by the OS after a background permission expiration warning. Besides that, I never get a backgroundfetch trigger. If I use xCode to fake one the app continues working. The "Simulate Background Fetch" in Xcode triggers a backgroundTransfer event (not backgroundFetch). The background permission expiration warning is followed by: Active assertions exist beyond permitted time, but process is being debugged; Logging: 12:42:58.098141 +0200 0 [testurlsession2:14622] Sending background permission expiration warning! 62 com.apple.assertiond assertiond 12:43:03.095284 +0200 0 [testurlsession2:14622] Forcing crash report with description: testurlsession2:14622 has active assertions beyond permitted time: (owner: nsurlsessiond:94) 62 com.apple.assertiond assertiond 12:43:03.099421 +0200 0 [testurlsession2:14622] Finished crash reporting. 62 com.apple.assertiond assertiond 12:43:03.107254 +0200 0 Connection removed: IOHIDEventSystemConnection uuid:027E530D-FB2C-46A3-B66A-562C3965652D pid:14622 process:testurlsession2 type:Passive entitlements:0x0 caller:BackBoardServices: + 364 attributes:{type = immutable dict, count = 3, entries => 0 : {contents = "pid"} = {value = +14622, type = kCFNumberSInt64Type} 1 : {contents = "bundleID"} = {contents = "nl.alexanderbaars.testurlsession2"} 2 : {contents = "HighFrequency"} = {value = false} } inactive:0 56 com.apple.iohid backboardd 12:43:03.107472 +0200 0 105: { "action":"client_died", "session":{"ID":"0x20f04","PID":14622,"name":"testurlsession2"}, "details":null } 26 com.apple.coreaudio mediaserverd 12:43:03.108810 +0200 0 [testurlsession2:14622] dump assertions count:1 HWM:3 (CPUMON check): { [active] } 62 com.apple.assertiond assertiond [...] 12:43:03.528292 +0200 0 [testurlsession2:14622] Invalidating... 62 com.apple.assertiond assertiond 12:43:03.529248 +0200 0 Releasing PowerAssertion on testurlsession2:14622 from invalidate 62 com.apple.assertiond assertiond 12:43:03.529593 +0200 0 Process assertiond.62 Released SystemIsActive "testurlsession2:14622:94-BCCFAA61-52ED-4CAC-A76D-513B75AEF30C [com.apple.nsurlsessiond.handlesession download.by.button] [0x101162e50]" age:00:00:31 id:51539649274 [System: SysAct] 35 powerd powerd 12:43:03.730556 +0200 0 [testurlsession2:14622] Got exit context: 62 com.apple.assertiond assertiond 12:43:03.731755 +0200 0 assertiond says the process actually exited with context: 52 com.apple.FrontBoard SpringBoard 12:43:03.732738 +0200 0 exited. 52 com.apple.FrontBoard SpringBoard 12:43:03.733393 +0200 0 Removing: 52 com.apple.FrontBoard SpringBoard 12:43:03.736165 +0200 0 Process exited: -> { stateAtExit = ; } 52 com.apple.FrontBoard.workspace SpringBoard
  4. Alexander 2019-09-11

    any comments?
  5. Rakhi Mitro 2019-09-17

    [~Alexander Baars], Did you manage to test this on 8.1.1.GA and let us know the results.
  6. Alexander 2019-10-28

    i did test it on 8.1.1.GA and 8.2.0.GA both result in the same issue. While downloading push the app to the background, the download finishes but app crashes right after.
  7. Alexander 2019-11-14

    Do you have a solution for my problem? regards, Alexander Baars

JSON Source