Titanium JIRA Archive
Appcelerator Community (AC)

[AC-6600] Class not found in Hyperloop generated file in createProxy code line

GitHub Issuen/a
TypeBug
Priorityn/a
StatusOpen
ResolutionUnresolved
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsHyperloop
Labelsn/a
ReporterJim Infante
AssigneeAbir Mukherjee
Created2020-09-04T11:54:48.000+0000
Updated2020-10-07T14:34:48.000+0000

Description

Class not found in Hyperloop generate js file in IOS. Added 3rd party sdk using cocoapods version 2. the 3rd party sdk is Zendesk Chat (https://developer.zendesk.com/embeddables/docs/chat-sdk-v-2-for-ios/introduction) from what i know the zendesk v2 is using -swift.h header. zendesk v1 chat is not and Im able to implement it. seems like all dotted class is having error

Attachments

FileDateSize
zdkchat.js2020-09-04T12:11:11.000+00003440

Comments

  1. Jim Infante 2020-09-04

    full error message:
       [ERROR] :  Cannot find class with name: ChatProvidersSDK.ZDKChat
       [ERROR] :  Script Error {
       [ERROR] :      column = 32;
       [ERROR] :      line = 120;
       [ERROR] :      message = "Cannot find class with name: ChatProvidersSDK.ZDKChat";
       [ERROR] :      nativeStack = "1   libobjc.A.dylib                     0x00007fff512539b2 objc_exception_throw + 48\n2   Staging@uParcel                     0x000000010fba0826 -[HyperloopClass dealloc] + 0\n3   Staging@uParcel                     0x000000010fb99784 NewProxy + 470\n4   JavaScriptCore                      0x00007fff26ca8cf8 _ZN3JSC19APICallbackFunction4callINS_18JSCallbackFunctionEEExPNS_14JSGlobalObjectEPNS_9CallFrameE + 568\n5   ???                                 0x000047d1c4601027 0x0 + 78966268366887\n6   JavaScriptCore                      0x00007fff26c6d59d llint_entry + 93344\n7   JavaScriptCore                      0x00007fff26c6d59d llint_entry + 93344\n8   JavaScriptCore                      0x00007fff26c6d59d llint_entry + 93344\n9   JavaScriptCore                      0x00007fff26c6d59d llint_entry + 93344\n10  JavaScriptCore                      0x00007fff26c6e182 llint_entry + 96389\n11  JavaScriptCore                      0x00007fff26c6d59d llint_entry + 93344\n12  JavaScriptCore                      0x00007fff26c5674f vmEntryToJavaScript + 200\n13  JavaScriptCore                      0x00007fff2708d525 _ZN3JSC11Interpreter11executeCallEPNS_14JSGlobalObjectEPNS_8JSObjectENS_8CallTypeERKNS_8CallDataENS_7JSValueERKNS_7ArgListE + 549\n14  JavaScriptCore                      0x00007fff272c77ea _ZN3JSC12profiledCallEPNS_14JSGlobalObjectENS_15ProfilingReasonENS_7JSValueENS_8CallTypeERKNS_8CallDataES3_RKNS_7ArgListE + 170\n15  JavaScriptCore                      0x00007fff26cbe5ac JSObjectCallAsFunction + 620\n16  TitaniumKit                         0x0000000110071b95 TiBindingEventProcess + 686\n17  TitaniumKit                         0x0000000110093062 -[KrollContext invoke:] + 109\n18  TitaniumKit                         0x00000001100930d5 -[KrollContext enqueue:] + 93\n19  TitaniumKit                         0x000000011009a6be TiBindingRunLoopEnqueue + 77\n20  TitaniumKit                         0x0000000110071c4b TiBindingEventProcess + 868\n21  TitaniumKit                         0x0000000110093062 -[KrollContext invoke:] + 109\n22  TitaniumKit                         0x00000001100930d5 -[KrollContext enqueue:] + 93\n23  TitaniumKit                         0x000000011009a6be TiBindingRunLoopEnqueue + 77\n24  TitaniumKit                         0x0000000110098f14 -[TiProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 164\n25  TitaniumKit                         0x000000011007992f -[TiViewProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 224\n26  TitaniumKit                         0x0000000110098d21 -[TiProxy fireEvent:withObject:propagate:] + 76\n27  TitaniumKit                         0x000000011006aa67 -[TiUIView touchesEnded:withEvent:] + 110\n28  UIKitCore                           0x00007fff49362508 -[UIWindow _sendTouchesForEvent:] + 1359\n29  UIKitCore                           0x00007fff4936428d -[UIWindow sendEvent:] + 4501\n30  UIKitCore                           0x00007fff4933e6d1 -[UIApplication sendEvent:] + 356\n31  Staging@uParcel                     0x000000010fa02601 -[TiUIApplication sendEvent:] + 577\n32  UIKitCore                           0x00007fff493c94ce __dispatchPreprocessedEventFromEventQueue + 7628\n33  UIKitCore                           0x00007fff493cc692 __handleEventQueueInternal + 6584\n34  UIKitCore                           0x00007fff493c2f35 __handleHIDEventFetcherDrain + 88\n35  CoreFoundation                      0x00007fff23da1c91 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17\n36  CoreFoundation                      0x00007fff23da1bbc __CFRunLoopDoSource0 + 76\n37  CoreFoundation                      0x00007fff23da1394 __CFRunLoopDoSources0 + 180\n38  CoreFoundation                      0x00007fff23d9bf8e __CFRunLoopRun + 974\n39  CoreFoundation                      0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404\n40  GraphicsServices                    0x00007fff38c39bbe GSEventRunModal + 139\n41  UIKitCore                           0x00007fff49325968 UIApplicationMain + 1605\n42  Staging@uParcel                     0x000000010f9797fb main + 1115\n43  libdyld.dylib                       0x00007fff520ce1fd start + 1\n44  ???                                 0x0000000000000001 0x0 + 1";
       [ERROR] :      sourceURL = "file:///Users/uParcel/Library/Developer/CoreSimulator/Devices/713D5C53-1021-4F7E-B515-B292D0183C1A/data/Containers/Bundle/Application/F8C7E7B8-4A10-42F2-A46E-75A9EDA6078C/Staging@uParcel.app/hyperloop/chatproviderssdk/zdkchat.js";
       [ERROR] :      stack = "createProxy@[native code]\n$initialize@file:///Users/uParcel/Library/Developer/CoreSimulator/Devices/713D5C53-1021-4F7E-B515-B292D0183C1A/data/Containers/Bundle/Application/F8C7E7B8-4A10-42F2-A46E-75A9EDA6078C/Staging@uParcel.app/hyperloop/chatproviderssdk/zdkchat.js:120:32\nvalue@file:///Users/uParcel/Library/Developer/CoreSimulator/Devices/713D5C53-1021-4F7E-B515-B292D0183C1A/data/Containers/Bundle/Application/F8C7E7B8-4A10-42F2-A46E-75A9EDA6078C/Staging@uParcel.app/hyperloop/chatproviderssdk/zdkchat.js:107:28\nversion2\nController\n\n";
       [ERROR] :      type = Error;
       [ERROR] :  }
       [ERROR] :  -[__NSCFString count]: unrecognized selector sent to instance 0x7fcbc983ec00
       [ERROR] :  *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFString count]: unrecognized selector sent to instance 0x7fcbc983ec00'
       [ERROR] :  *** First throw call stack:
       [ERROR] :  (
       [ERROR] :  	0   CoreFoundation                      0x00007fff23e3de6e __exceptionPreprocess + 350
       [ERROR] :  	1   libobjc.A.dylib                     0x00007fff512539b2 objc_exception_throw + 48
       [ERROR] :  	2   CoreFoundation                      0x00007fff23e5eb94 -[NSObject(NSObject) doesNotRecognizeSelector:] + 132
       [ERROR] :  	3   CoreFoundation                      0x00007fff23e4286c ___forwarding___ + 1436
       [ERROR] :  	4   CoreFoundation                      0x00007fff23e44b58 _CF_forwarding_prep_0 + 120
       [ERROR] :  	5   TitaniumKit                         0x00000001100851bf -[TiExceptionHandler showScriptError:] + 300
       [ERROR] :  	6   TitaniumKit                         0x0000000110071bc4 TiBindingEventProcess + 733
       [ERROR] :  	7   TitaniumKit                         0x0000000110093062 -[KrollContext invoke:] + 109
       [ERROR] :  	8   TitaniumKit                         0x00000001100930d5 -[KrollContext enqueue:] + 93
       [ERROR] :  	9   TitaniumKit                         0x000000011009a6be TiBindingRunLoopEnqueue + 77
       [ERROR] :  	10  TitaniumKit                         0x0000000110071c4b TiBindingEventProcess + 868
       [ERROR] :  	11  TitaniumKit                         0x0000000110093062 -[KrollContext invoke:] + 109
       [ERROR] :  	12  TitaniumKit                         0x00000001100930d5 -[KrollContext enqueue:] + 93
       [ERROR] :  	13  TitaniumKit                         0x000000011009a6be TiBindingRunLoopEnqueue + 77
       [ERROR] :  	14  TitaniumKit                         0x0000000110098f14 -[TiProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 164
       [ERROR] :  	15  TitaniumKit                         0x000000011007992f -[TiViewProxy fireEvent:withObject:propagate:reportSuccess:errorCode:message:] + 224
       [ERROR] :  	16  TitaniumKit                         0x0000000110098d21 -[TiProxy fireEvent:withObject:propagate:] + 76
       [ERROR] :  	17  TitaniumKit                         0x000000011006aa67 -[TiUIView touchesEnded:withEvent:] + 110
       [ERROR] :  	18  UIKitCore                           0x00007fff49362508 -[UIWindow _sendTouchesForEvent:] + 1359
       [ERROR] :  	19  UIKitCore                           0x00007fff4936428d -[UIWindow sendEvent:] + 4501
       [ERROR] :  	20  UIKitCore                           0x00007fff4933e6d1 -[UIApplication sendEvent:] + 356
       [ERROR] :  	21  Staging@uParcel                     0x000000010fa02601 -[TiUIApplication sendEvent:] + 577
       [ERROR] :  	22  UIKitCore                           0x00007fff493c94ce __dispatchPreprocessedEventFromEventQueue + 7628
       [ERROR] :  	23  UIKitCore                           0x00007fff493cc692 __handleEventQueueInternal + 6584
       [ERROR] :  	24  UIKitCore                           0x00007fff493c2f35 __handleHIDEventFetcherDrain + 88
       [ERROR] :  	25  CoreFoundation                      0x00007fff23da1c91 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
       [ERROR] :  	26  CoreFoundation                      0x00007fff23da1bbc __CFRunLoopDoSource0 + 76
       [ERROR] :  	27  CoreFoundation                      0x00007fff23da1394 __CFRunLoopDoSources0 + 180
       [ERROR] :  	28  CoreFoundation                      0x00007fff23d9bf8e __CFRunLoopRun + 974
       [ERROR] :  	29  CoreFoundation                      0x00007fff23d9b8a4 CFRunLoopRunSpecific + 404
       [ERROR] :  	30  GraphicsServices                    0x00007fff38c39bbe GSEventRunModal + 139
       [ERROR] :  	31  UIKitCore                           0x00007fff49325968 UIApplicationMain + 1605
       [ERROR] :  	32  Staging@uParcel                     0x000000010f9797fb main + 1115
       [ERROR] :  	33  libdyld.dylib                       0x00007fff520ce1fd start + 1
       [ERROR] :  	34  ???                                 0x0000000000000001 0x0 + 1
       [ERROR] :  )
       [ERROR] :  libc++abi.dylib: terminating with uncaught exception of type NSException
       
  2. Jim Infante 2020-10-06

    Found out that the framework uses .swiftmodule How do I access the swiftmodule class in javascript?
  3. Jim Infante 2020-10-07

    Found this code in https://github.com/shouse/awesome-hyperloop-titanium/tree/master/iOS
           installer.pods_project.targets.each do |target|
                  target.build_configurations.each do |config|
                      config.build_settings['SWIFT_VERSION'] = '3.1'
                      config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
                      config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
                  end
              end
          end
       
    and this is my pod file
       install! 'cocoapods', :integrate_targets => false
       
       use_frameworks!
       
       platform :ios, '10.0'
       target 'uParcel' do
         pod 'ZendeskChatSDK'
       end
       
       post_install do |installer|
         installer.pods_project.targets.each do |target|
           target.build_configurations.each do |config|
             config.build_settings['SWIFT_VERSION'] = '5.2'
             config.build_settings['SWIFT_OPTIMIZATION_LEVEL'] = '-Onone'
             config.build_settings['ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES'] = 'YES'
           end
         end
       end
       
  4. Jim Infante 2020-10-07

    but the generated javascript files still shows ChatProvidersSDK.ZDKChat which still cause the same error

JSON Source