[TIMOB-26050] Corrupted http response after updating to iOS 11.3
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | n/a |
Labels | n/a |
Reporter | Alberto Marcone |
Assignee | Shak Hossain |
Created | 2018-05-08T12:44:22.000+0000 |
Updated | 2018-10-02T15:51:24.000+0000 |
Description
For the past few days, some of our customers have been reporting errors in the response from our server, apparently the XML that the client receives from the server is corrupted, meaning that the xml is missing hundreds of characters at the beginning of the response (the server sends it correctly).
In a case the problem went away after initializing the device, reinstalling the app is not enough.
Did anyone else report an error like this?
I know that we're not using the latest sdk but we've made few customizations that haven't ported to the latest one.
Hey there! We have updated the Ti.Network.HTTPClient to NSURLSession in Titanium SDK 7.0.0, but haven't received any reports of the described issue before. Also, if it is only happening on iOS 11.3+, it might be an issue in the underlaying native API. In any case, we could need to get a (simple, app.js suitable) test-case, your current Titanium SDK version (even when modified) and if possible a trace-log + corruped file.
I tried to update to 7.x but the app, stable until now, keeps crashing for no apparent reason, in random places (parsing xml, http responses, etc). I will try to dig a little deeper.
Maybe related to the
<use-js-core-framework>
flag which is enabled by default in 7.x? You could try to manually disable it withand compare the results. But if that works, I'd love to get the stack traces of these crashes to fix that as well.
well, from the first few tests that I made, it looks like it's not crashing. I didn't have any symbolicated stack trace. I have a HockeyApp stack trace that looks like this: {quote} Exception Codes: SEGV_MAPERR at 0xffffffffffffffe8 Crashed Thread: 6 Thread 0: 0 libsystem_kernel.dylib 0x000000011a3d834a 0x11a3c6000 + 74570 1 CoreFoundation 0x0000000118df6c85 0x118d76000 + 527493 2 CoreFoundation 0x0000000118df61c2 0x118d76000 + 524738 3 CoreFoundation 0x0000000118df5889 0x118d76000 + 522377 4 GraphicsServices 0x000000011b8ae9c6 0x11b8a2000 + 51654 5 UIKit 0x00000001148ef5d6 0x1148c5000 + 173526 6 xxx 0x000000010d3f03c4 0x10d3ec000 + 17348 7 libdyld.dylib 0x0000000119fd0d81 0x119fd0000 + 3457 Thread 1: 0 libsystem_kernel.dylib 0x000000011a3dfbf2 0x11a3c6000 + 105458 1 PSPDFKit 0x0000000113d3e687 0x113b61000 + 1955463 2 PSPDFKit 0x0000000113d3caf7 0x113b61000 + 1948407 3 PSPDFKit 0x0000000114007551 0x113b61000 + 4875601 4 libsystem_pthread.dylib 0x000000011a41493b 0x11a411000 + 14651 5 libsystem_pthread.dylib 0x000000011a414887 0x11a411000 + 14471 6 libsystem_pthread.dylib 0x000000011a41408d 0x11a411000 + 12429 Thread 2: 0 libsystem_kernel.dylib 0x000000011a3e044e 0x11a3c6000 + 107598 1 libsystem_pthread.dylib 0x000000011a41407d 0x11a411000 + 12413 Thread 3: 0 libsystem_kernel.dylib 0x000000011a3e044e 0x11a3c6000 + 107598 1 libsystem_pthread.dylib 0x000000011a41407d 0x11a411000 + 12413 2 ??? 0x0000000110f0dd68 0x0 + 0 Thread 4: 0 libsystem_kernel.dylib 0x000000011a3e044e 0x11a3c6000 + 107598 1 libsystem_pthread.dylib 0x000000011a41407d 0x11a411000 + 12413 ... {quote}
[~a.marcone] So by disabling the flag it does not crash? Does it have an influence if you do not include PSPDFKit while having it enabled?
the symbolicated stack traces are showing an exception in *invokeCallbackForKey* and *objectForTiString* Thread 8 Crashed: 0 JavaScriptCore 0x0000000188729598 JSC::JSObject::get(JSC::ExecState*, JSC::PropertyName) const + 2000 1 JavaScriptCore 0x000000018872bc0c JSObjectGetProperty + 96 *2 iMeetingRoom 0x000000010073d688 -[KrollObject objectForTiString:context:] (KrollObject.m:1203)* 3 iMeetingRoom 0x000000010073a484 KrollGetProperty (KrollObject.m:187) 4 JavaScriptCore 0x000000018884f90c JSC::JSCallbackObject
I'm experiencing new crashes, this looks like it's coming from TiSDK 7.1.0 5 iMeetingRoom 0x0000000102ad0a60 -[KrollObject noteObject:forTiString:context:] (KrollObject.m:1175) 6 iMeetingRoom 0x0000000102acdbbc KrollGetProperty (KrollObject.m:218) 7 JavaScriptCore 0x000000018884f90c JSC::JSCallbackObject
Hey [~a.marcone]! Something is borked there. We didn't see that crashes anywhere else so far. Can you send me (via mail, I'll get in touch with you) - tiapp.xml - app.js reproducing the case (if possible) - full crash log and trace log
I sent you the crash logs and the tiapp.xml . Unfortunately the crashes happen in different places and I can't put a pin on it. One crash happened when I was logging out the app, the operations involved are: - cleaning a singleton containing the current logged user (setting it to null) - closing dialog and windows, back to the login page this wasn't crashing until I switched from 6.x to 7.x
any updates on this? we're stuck with TiSDK and we have to migrate because some modules require it
Hey [~a.marcone]! Unfortunately you seem to be the only person having this issue right now. To be sure, try to disable both default values:
I tried multiple combinations of the values, it doesn't really make any difference. Can I get a little more info about the stacktrace I sent you? When does that usually happens? so that I can try to avoid it?
Can you attach your tiapp.xml (nulled) to see if they are in the correct sub-tree of XML? And if you see issues in both 6.3.0 and 7.x, it would be good to have a list of errors per version, so we might be able to track it down this way. In any case, some kind of sample app would be required, otherwise we just can troubleshoot.
we eventually solved this problem by wiping our client's tablet and after that everything seemed to work. It must've been something corrupted on their iOS. Now we're facing new issues with http calls that are almost impossible to reproduce (random race conditions). We're using still an app developed in commonJS, how could we debug it? is there any good way on doing it besides console.log() and breakpoints? hundreds of lines and we don't know where to look at. We use HockeyApp but it's useless because the stack traces are not readable.