Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-27518] Android/iOS production apps went down, warnings from ti.main.js

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
Componentsn/a
Labelsn/a
Reportereric harms
AssigneeEric Merriman
Created2019-10-16T20:56:50.000+0000
Updated2019-11-03T00:07:20.000+0000

Description

Hi, Our app stopped working today, it didn't even hit the splash screen. In my logs I found the following, and it came back after 10 minutes. This was our production app, both Android and iOS were down, the warnings below came from iOS. Any thoughts on what the warnings mean? We didn't see any errors logged, just these warnings, and the apps stopped. Thanks
[WARN]  %cUnhandled rejection
[WARN]  r
[WARN]  _settlePromiseFromHandler
[WARN]  _settlePromise
[WARN]  _settlePromise0
[WARN]  _settlePromises
[WARN]  c
[WARN]  a
[WARN]  _drainQueues
[WARN]  drainQueues
[WARN]  run@file:///var/containers/Bundle/Application/EBC3C045-AEBC-4136-B7D8-9E52E4C0C97B/Lemonaid.app/ti.main.js:1756:29
[WARN]  file:///var/containers/Bundle/Application/EBC3C045-AEBC-4136-B7D8-9E52E4C0C97B/Lemonaid.app/ti.main.js:1777:10
[WARN]  flush@file:///var/containers/Bundle/Application/EBC3C045-AEBC-4136-B7D8-9E52E4C0C97B/Lemonaid.app/ti.main.js:1581:11
[WARN]  promiseReactionJob@[native code] color: red
[WARN]  %cUnhandled rejection (<{"e":{"success":false,"code":400,"sour...>, no stack trace) color: red

Attachments

FileDateSize
error1.png2019-10-21T17:52:49.000+000045297
error2.png2019-10-21T17:52:49.000+000045345

Comments

  1. Rene Pot 2019-10-17

    Did you have axway analytics enabled? As well as any other axway services?
  2. eric harms 2019-10-17

    I do have analytics enabled, I was thinking this could have been the issue. I am using ACA crash reporting, so I don't think I can disable analytics? If so, is there anyway to check if the api's are working and disable it if there is an issue? Thanks
  3. Gary Mathews 2019-10-17

    [~capsizeno4] It looks like your app is making a HTTP request that's failing. Are you handling the fail case correctly? Looks like you're doing something similar to this:
       new Promise((resolve, reject) => {
       	const client = Ti.Network.createHTTPClient({
       		onload: resolve,
       		onerror: reject,
       		timeout: 5000
       	});
       	client.open('GET', 'https://httpbin.org/status/400');
       	client.send();
       });
       
    You need to either enclose the Promise in a try-catch or handle the rejection with .catch()
  4. eric harms 2019-10-17

    Hi Gary, yes, I am catching my HTTP promise requests (im using bluebird.js), and I usually get a hint at which one fails, if it does. This one happened before my splash screen even showed, so to me that looked like it was erroring before any of my HTTP calls were being made. I was hoping that the warning I provided might be able to shed a clue as to where the error was originating within ti.main.js My api team assured me that all our apis were operable at the time, and unfortunately the logs from the incident are long gone. Best I can do is keep watch moving forward. Thanks Eric
  5. eric harms 2019-10-21

    Hi Gary, In looking through my ACA crash logs, I came across these 2 errors, both of which happened on the same day we reported this issue - I've never seen these errors before and seem to coincide with my issue's timeline. !error2.png|thumbnail! !error1.png|thumbnail! Thanks! Eric
  6. Joshua Quick 2019-10-28

    What you are seeing is a "chain" of exceptions. The 1st exception being reported is the root cause of the issue. The 2nd exception (such as "failed to leave a valid exports object") is happening because the required-in JS file failed to load due to the 1st exception that is happening. Ignore it. Case-in-point, if you run the following "app.js" code on iOS, notice that you'll get 2 exceptions on startup. The 1st exception is the root cause (I purposely created a bug below) and the 2nd exception will be the "failed to leave a valid exports object" because the "app.js" failed to load.
       // This is the "app.js". Purposely cause a crash.
       iDontExist.toString();
       
    For the onscreen exception dialog, perhaps we should reconsider only showing the 1st exception and not display a dialog on top for all of the following exceptions that are triggered. Might make it less confusing. But for our ACA website, I think it's okay to list them all.

JSON Source