{ "id": "117179", "key": "TIMOB-14557", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [], "resolution": null, "resolutiondate": null, "created": "2013-07-15T12:49:38.000+0000", "priority": { "name": "Low", "id": "4" }, "labels": [ "api.appcelerator.net", "ios" ], "versions": [ { "id": "15478", "description": "Release 3.1.1", "name": "Release 3.1.1", "archived": true, "released": true, "releaseDate": "2013-06-17" } ], "issuelinks": [], "assignee": null, "updated": "2018-02-28T20:03:20.000+0000", "status": { "description": "Submitted for code review", "name": "In Review", "id": "10003", "statusCategory": { "id": 4, "key": "indeterminate", "colorName": "yellow", "name": "In Progress" } }, "components": [ { "id": "10206", "name": "iOS", "description": "iOS Platform" } ], "description": "h4. Problem Description\r\nOnce you add modules to a project, the deployed app in device will get stuck in the splashscreen trying to contact api.appcelerator.net. This is only happening if you are using modules and you are connected to a non-working wifi (i.e., connected to a wifi router without actual internet connection). \r\n\r\nh4. Steps to reproduce\r\n1. Create a new mobile project (support for iOS)\r\n2. Add any module to the project.\r\n3. build to device. \r\n4. Deploy the app to a device, connected to a wifi router without internet access\r\n5. The app will stuck in the splash screen for 20 or more seconds. \r\n\r\nh4. Extra info\r\n\r\nI have customers with local wifi connection but without internet connection. I need to load few modules inside my app, but in doing so my app would get stuck at splashscreen for 15-16 seconds average (sometimes even longer, depending on the configuration) while trying to contact api.appcelerator.net . The app will get started right after the http call times out.\r\n\r\nConfiguration:\r\n- Analytics is set to false in tiapp.xml\r\n- The app will present this issue no matter what module is included (even modules not downloaded from the market, but compiled from scratch)\r\n- The app won't present this issue if wifi and 3g are turned off.\r\n- The app won't present this issue if I don't include any modules.\r\n- The app won't present this issue if I compile it with TiSDK 2.1.4.GA\r\n\r\n\r\nh4. Related community issues\r\nhttp://developer.appcelerator.com/question/154877/app-stuck-at-startup-while-trying-to-contact-apiappceleratornet-possible-regression#comment-182278\r\n\r\nOld related questions:\r\nhttp://developer.appcelerator.com/question/138340/app-not-starting-because-of-httpsapiappceleratornet443\r\nhttp://developer.appcelerator.com/question/139316/app-not-working-because-of-connection-to-apiappceleratornet\r\nhttp://developer.appcelerator.com/question/126909/why-application-try-to-connect-to-apiappceleratornet-at-launch\r\n", "attachment": [], "flagged": false, "summary": "iOS: App stuck at startup when there is no access to the internet and using modules", "creator": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "environment": "iOS - 6.x\r\nTiSDK 3.1.1.GA", "comment": { "comments": [ { "id": "262452", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "since there's no possible workaround here, any possibility to have a deadline for this? so that I can give an answer to my customers demanding when this is going to be fixed. Thank you", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-07-19T11:26:07.000+0000", "updated": "2013-07-19T11:26:07.000+0000" }, { "id": "265406", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Attempting to reproduce, will update.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-07T18:49:54.000+0000", "updated": "2013-08-07T18:49:54.000+0000" }, { "id": "265490", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Created a default template application with 3 modules attached using SDK 3.1.2 and Studio 3.1.2. Initially forgot to set analytics off.\r\n\r\nConnected to router with no actual network connection and launched on the following devices:\r\n\r\niPhone 5 - iOS 7 beta 5\r\niPhone 5 - iOS 6 \r\niPhone 4 - iOS 5\r\n\r\nRemember, analytics was on. Results: iOS 7 device took 25 seconds to move off splash, other devices were around 4-5 seconds.\r\n\r\nTurned off analytics and retried. All devices were quick to load, and saw nothing in the console output.\r\n\r\nWill take this to the module team and see if they can shed any light on the situation.\r\n\r\n[~a.marcone] Is there any network usage in the modules you are using? I am trying to see what other variables are in play here.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-07T23:26:10.000+0000", "updated": "2013-08-07T23:27:06.000+0000" }, { "id": "265496", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~a.marcone] Also note, this is not a factor in production builds. You should be able to build ad-hoc and install on device with no issue. We will continue to investigate.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-08-07T23:38:18.000+0000", "updated": "2013-08-07T23:38:18.000+0000" }, { "id": "265502", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I tested every possible scenario, and loading any kind of modules made the app freeze while contacting api.appcelerator.net (saw that from the logs of the sniffer on the router).\r\n\r\nI will prepare a test case easy to reproduce. Haven't tested SDK 3.1.2 though, as mentioned above, only 3.1.1.GA .\r\n\r\nThe bug is consistent, a good number of customers complains about that. There are few of them having the app stuck for even 20 minutes since the router configuration doesn't drop the http connection. \r\n\r\nIt's only weird that this time I'm the only one reporting this problem.\r\n\r\nMy app isn't distributed from TiStudio, I compile it from Xcode and then distribute it from there. Something that I recently noticed: it seems like xcode doesn't seem to switch to production mode. For example, I had the Appcelerator red screen error appearing on the AppStore. Could that be the problem?\r\n", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-07T23:58:01.000+0000", "updated": "2013-08-07T23:58:01.000+0000" }, { "id": "268994", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I can confirm this. It does happen only in development. If I distribute it through TiStudio it doesn't happen. So, how do I switch type of build in xcode?\r\n\r\nI still think this is a bug though, the fact that tries to connect to api.appcelerator.net without my consent shouldn't happen even during development.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-08-30T08:14:57.000+0000", "updated": "2013-08-30T08:14:57.000+0000" }, { "id": "269405", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "[~a.marcone] - Hmmm.... That is an interesting question. There are a few things done by our build process prior to sending anything to Xcode. I will ask dev to comment on the possibilities for creating in Studio then running from Xcode. Can you give a little more detail about your workflow? Do you create the project in Studio? What do you use to develop? I can tell you a Studio project (the Xcode project) will look different at creation, after build for simulator, and after build for device.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-03T23:52:24.000+0000", "updated": "2013-09-03T23:52:24.000+0000" }, { "id": "269449", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "If you build for the iOS Simulator or and iOS device, the deploy type will be set to \"development\" and \"test\" respectively. Adhoc and Appstore distribution builds will set the deploy type to \"production\" which will suppress errors.\n\nI recommend building your app for dist-adhoc or dist-appstore, then open the generated Xcode project. When you do the build, you pass in the --build-only flag to skip the actual packaging.\n\nAnother way is to manually modify the build.manifest file in the /build/iphone directory. You can set the deployType to \"production\" to suppress the errors. I do not recommend doing this, but if you do, at least do a device build so that the JavaScript files are minified.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-09-04T10:13:34.000+0000", "updated": "2013-09-04T10:13:34.000+0000" }, { "id": "269454", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "I understand this.\r\n\r\nI mainly use xcode for:\r\n- possible customizations of parameters in the project\r\n- having all my app stored to the archive for all of the app sent to testers or to the appstore.\r\n\r\nIt's strange that I have to build and create an ad hoc ipa and then open the result xcode project and build it from there. Is this what you're suggesting? I thought that running the project from Run would automatically set it ready for production, while running it from Debug would consider it still development. \r\n\r\nI think I will consider to manually edit the manifest file every time. Isn't there any way to set it to production from xcode itself?", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-04T10:36:37.000+0000", "updated": "2013-09-04T10:36:37.000+0000" }, { "id": "269556", "author": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "body": "[~a.marcone] There's a lot of confusion around deploy types and build targets. Currently build targets (simulator, device, dist-adhoc, dist-appstore) dictate the deploy type. The deploy type then dictates several things such as JavaScript minification/encryption, analytics categorization (when analytics is enabled), module verification, whether error messages are displayed, and so on. I'm in the process of trying to decouple this, but it's a very slow process.\n\nIn Titanium 3.X, device builds are pretty much identical to distribution builds except they are signed with a device cert. By running a dist-adhoc or dist-appstore build, it will properly create the build.manifest file in the build/iphone directory that is set up for production builds. You could hack a device build's build.manifest, but I don't recommend it. You should never tinker with the Xcode project from a simulator build because we symlink files and skip a bunch of stuff like copying fonts.\n\nThere currently is no way to set it to production from Xcode. It will probably make sense to introduce that when we work on the \"titanium export\" command that will generate a self-standing (no Titanium required) Xcode project.", "updateAuthor": { "name": "cbarber", "key": "cbarber", "displayName": "Chris Barber", "active": true, "timeZone": "America/Chicago" }, "created": "2013-09-04T20:13:41.000+0000", "updated": "2013-09-04T20:13:41.000+0000" }, { "id": "269865", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Alberto, when you create a dist-appstore build (package from studio, or pass in the dist-appstore from the CLI in terminal) the project is put into the archive. From there you can re-sign out as an adhoc build using \"distribute\" or you can submit to the app store. This does not account for your desire to change parameters in the project however. Just FYI.", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-05T23:47:21.000+0000", "updated": "2013-09-05T23:47:21.000+0000" }, { "id": "270758", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "Eric, that's pretty cool, didn't know that! Thank you. \r\nIt's just that having a full archive with everything I compiled ad hoc resulted very handy, since sometimes we do installations on site and we keep track (through the archive) of what we installed where.\r\nWell, never mind, I'll stick to the way it is. I will remember to create an ad hoc project every time I need.\r\n\r\nThank you everyone for your support and help.\r\n\r\n\r\nOn a side note, going back to the original thread, IMHO I still think that one should be able to disable the module check at the boot even when in development.", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-09-11T15:52:54.000+0000", "updated": "2013-09-11T15:52:54.000+0000" }, { "id": "271384", "author": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "body": "Alberto, we will leave this open so we may continue to investigate solutions. \n", "updateAuthor": { "name": "emerriman", "key": "emerriman", "displayName": "Eric Merriman ", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-09-16T22:46:45.000+0000", "updated": "2013-09-16T22:46:45.000+0000" }, { "id": "273673", "author": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/titanium_mobile/pull/4756", "updateAuthor": { "name": "srahim", "key": "srahim", "displayName": "Sabil Rahim", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2013-10-02T21:21:51.000+0000", "updated": "2013-10-02T21:21:51.000+0000" }, { "id": "273726", "author": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "body": "Hi Sabil, after I saw your code one question came to my mind: that means that I can use expired modules when I'm offline, right? ", "updateAuthor": { "name": "a.marcone", "key": "a.marcone", "displayName": "Alberto Marcone", "active": true, "timeZone": "Europe/Berlin" }, "created": "2013-10-03T09:09:58.000+0000", "updated": "2013-10-03T09:09:58.000+0000" } ], "maxResults": 16, "total": 16, "startAt": 0 } } }