Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17548] iOS: APSHTTPRequest send fails with assertion on self.method

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-08-27T21:09:36.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.4.0
ComponentsiOS
Labelscore, module_network, qe-manualtest
ReporterRichard Lustemberg
AssigneeVishal Duggal
Created2014-07-23T13:46:34.000+0000
Updated2014-09-02T17:23:52.000+0000

Description

HTTP client calls fail and crash the app. The following error is reported: Assertion failed: (self.method != nil), function -[APSHTTPRequest send], file /Users/vduggal/ForkedRepos/APSHTTPClient/APSHTTPClient/APSHTTPRequest.m, line 66. It looks like something is not properly linked in libAPSHTTPClient.a , as the error is pointing to a path in vduggal's computer.

Comments

  1. Shuo Liang 2014-07-24

    Hi, Can you provide us a simple test case for this problem. Thanks. Regards, Shuo
  2. Mauro Parra-Miranda 2014-08-01

    Related to this community discussion: https://developer.appcelerator.com/question/176379/error-assertion-failed-titanium-330ga looks like is happening to at least 3 people, but there is no way to reproduce it consistently just yet.
  3. Richard Lustemberg 2014-08-04

    Indeed. The day I posted I had the issue, and since then I couldn't reproduce. It was happening within a series of nested callbacks between httpclient and the facebook module. I'll give it anothe try isolating some test code. Anyway, this line from the log should give an idea of what's going on: /Users/vduggal/ForkedRepos/APSHTTPClient/APSHTTPClient/APSHTTPRequest.m the local path in vduggal's Mac
  4. Lawrence Wilson 2014-08-14

    I have updated the Q&A post https://developer.appcelerator.com/question/176379/error-assertion-failed-titanium-330ga with my experience/solution - not sure if it will help in your investigation. Cheers
  5. Matthias Kroeger 2014-08-25

    I also got this error when I tested a small yql query. My environment: OS X 10.9.4 Titanium Studio: build: 3.3.0.201407100905 Titanium SDK: 3.3.0.GA iOS Simulator: iPhone Retina (4-inch 64-bit), Version 7.1(11D167) Xcode: Version 5.1.1 (5B1008) The script is really very simple.
       var yql = 'SELECT * from yahoo.finance.xchange WHERE pair IN ("USDEUR")';
        
       Ti.API.info("yql: " + yql);
        
       Ti.Yahoo.yql(yql, function(e) {
           Ti.API.info(JSON.stringify(e.data));
       });
       
    Console log:
       -- Start simulator log -------------------------------------------------------
       [INFO] :   Application started
       [DEBUG] :  Reading stylesheet from: /Users/mkroeger/Library/Application Support/iPhone Simulator/7.1-64/Applications/DCA3CCBA-7DCE-4F64-AB42-8AD55E95A629/yql.app/stylesheet.plist
       [DEBUG] :  objc[34024]: Class AXEmojiUtilities is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libAXSpeechManager.dylib. One of the two will be used. Which one is undefined.
       [DEBUG] :  2014-08-25 14:03:35.914 yql[34024:70b] Cannot find executable for CFBundle 0xd427230 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:03:35.929 yql[34024:70b] Cannot find executable for CFBundle 0xce2b440 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/StoreKitFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:03:35.933 yql[34024:70b] Cannot find executable for CFBundle 0xd1234a0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/iAdFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:03:35.952 yql[34024:70b] Cannot find executable for CFBundle 0xce49440 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/GeoServices.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:03:35.955 yql[34024:70b] Cannot find executable for CFBundle 0xd06f140 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/EventKitUIFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:03:35.958 yql[34024:70b] Cannot find executable for CFBundle 0xd439d10 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/MusicLibrary.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:03:35.989 yql[34024:70b] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
       [DEBUG] :  2014-08-25 14:03:35.989 yql[34024:70b] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
       [INFO] :   yql/1.0 (3.3.0.787cd39)
       [DEBUG] :  Loading: /Users/mkroeger/Library/Application Support/iPhone Simulator/7.1-64/Applications/DCA3CCBA-7DCE-4F64-AB42-8AD55E95A629/yql.app/app.js, Resource: app_js
       [INFO] :   yql: SELECT * from yahoo.finance.xchange WHERE pair IN ("USDEUR")
       [DEBUG] :  Application booted in 27.007043 ms
       [DEBUG] :  Assertion failed: (self.method != nil), function -[APSHTTPRequest send], file /Users/vduggal/ForkedRepos/APSHTTPClient/APSHTTPClient/APSHTTPRequest.m, line 66.
       -- End simulator log ---------------------------------------------------------
       [INFO] :   Application has exited from iOS Simulator
       [INFO] :   Project built successfully in 18s 364ms
       
    Hope that helps, Matthias
  6. Matthias Kroeger 2014-08-25

    Titanium SDK: 3.2.3.GA works as expected:
       -- Start simulator log -------------------------------------------------------
       [DEBUG] :  Reading stylesheet from: /Users/mkroeger/Library/Application Support/iPhone Simulator/7.1-64/Applications/DCA3CCBA-7DCE-4F64-AB42-8AD55E95A629/yql.app/stylesheet.plist
       [DEBUG] :  objc[40436]: Class AXEmojiUtilities is implemented in both /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/PrivateFrameworks/AccessibilityUtilities.framework/AccessibilityUtilities and /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/usr/lib/libAXSpeechManager.dylib. One of the two will be used. Which one is undefined.
       [DEBUG] :  2014-08-25 14:43:12.987 yql[40436:70b] Cannot find executable for CFBundle 0xce8bc10 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/MusicLibrary.axbundle> (not loaded)
       [INFO] :   Application started
       [DEBUG] :  2014-08-25 14:43:12.990 yql[40436:70b] Cannot find executable for CFBundle 0xcf9a5c0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/CertUIFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:43:12.994 yql[40436:70b] Cannot find executable for CFBundle 0xd397a70 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/StoreKitFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:43:13.009 yql[40436:70b] Cannot find executable for CFBundle 0xcfa77d0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/iAdFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:43:13.017 yql[40436:70b] Cannot find executable for CFBundle 0xd2949a0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/GeoServices.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:43:13.019 yql[40436:70b] Cannot find executable for CFBundle 0xcfadec0 </Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.1.sdk/System/Library/AccessibilityBundles/EventKitUIFramework.axbundle> (not loaded)
       [DEBUG] :  2014-08-25 14:43:13.057 yql[40436:70b] You've implemented -[<UIApplicationDelegate> application:performFetchWithCompletionHandler:], but you still need to add "fetch" to the list of your supported UIBackgroundModes in your Info.plist.
       [DEBUG] :  2014-08-25 14:43:13.058 yql[40436:70b] You've implemented -[<UIApplicationDelegate> application:didReceiveRemoteNotification:fetchCompletionHandler:], but you still need to add "remote-notification" to the list of your supported UIBackgroundModes in your Info.plist.
       [INFO] :   yql/1.0 (3.2.3.GA.b958a70)
       [DEBUG] :  Analytics is enabled = YES
       [DEBUG] :  Loading: /Users/mkroeger/Library/Application Support/iPhone Simulator/7.1-64/Applications/DCA3CCBA-7DCE-4F64-AB42-8AD55E95A629/yql.app/app.js, Resource: app_js
       [INFO] :   yql: SELECT * from yahoo.finance.xchange WHERE pair IN ("USDEUR")
       [DEBUG] :  Application booted in 22.198975 ms
       [INFO] :   {"rate":{"Time":"8:43am","Ask":"0.7579","id":"USDEUR","Bid":"0.7578","Name":"USD to EUR","Rate":"0.7578","Date":"8/25/2014"}}
       
  7. Pedro Enrique 2014-08-27

    This was fixed in PR: https://github.com/appcelerator/titanium_mobile/pull/5958
  8. Olga Romero 2014-08-28

       [INFO] :   TIMB-17548/1.0 (3.4.0.5640a23)
       [INFO] :   yql: SELECT * from yahoo.finance.xchange WHERE pair IN ("USDEUR")
       [INFO] :   {"rate":{"Time":"12:50pm","Ask":"0.7592","id":"USDEUR","Bid":"0.759","Name":"USD to EUR","Rate":"0.7591","Date":"8/28/2014"}}
       
    Environment tested Mac osx 10.9.4 Maverics Appcelerator Studio, build: 3.4.0.201408201526 Titanium SDK, build: 3.4.0.v20140827165712 titanium@3.4.0-dev (git://github.com/appcelerator/titanium.git#9079326639c7f610dafee33dd16742de7d92d795) Xcode6-beta4 Device: iPhone 5c iOS 7.1
  9. Olga Romero 2014-09-02

    Appcelerator Studio, build: 3.4.0.201408291834 Titanium SDK, build: 3.4.0.v20140829184521 Xcode6-beta4 Device: iPhone 5S

    Actual result

       [INFO] :   yql: SELECT * from yahoo.finance.xchange WHERE pair IN ("USDEUR")
       [INFO] :   {"rate":{"Time":"1:09pm","Ask":"0.7618","id":"USDEUR","Bid":"0.7616","Name":"USD to EUR","Rate":"0.7617","Date":"9/2/2014"}}
       

JSON Source