Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25432] Hyperloop: iOS - Cannot find class with name: SFSpeechRecognizer when placed in app/lib

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2017-10-25T16:03:42.000+0000
Affected Version/sHyperloop 2.2.0
Fix Version/sHyperloop 2.2.1
ComponentsHyperloop, iOS
Labelsn/a
ReporterHans Knöchel
AssigneeJan Vennemann
Created2017-10-24T07:55:20.000+0000
Updated2017-10-25T21:36:34.000+0000

Description

From the community (opening just in case):
[ERROR] Cannot find class with name: SFSpeechRecognizer
[ERROR] Script Error {
[ERROR]     column = 32;
[ERROR]     description = “Cannot find class with name: SFSpeechRecognizer”;
[ERROR]     line = 138;
[ERROR]     message = “Cannot find class with name: SFSpeechRecognizer”;
[ERROR]     name = ClassNotFound;
Try it out with the [Ti.Speech](https://github.com/hyperloop-modules/ti.speech) project. *EDIT*: It seems to works when the class is not instantiated in app/lib but in app/controllers/index.js, so probably our metabase cannt find declarations anymore when placed in app/lib.

Comments

  1. Hans Knöchel 2017-10-24

    Testing-steps already: * Clone the ti.speech sample-project [here](https://github.com/hyperloop-modules/ti.speech) * Confirm it does not work with Hyperloop 2.2.0 * Switch to Hyperloop 2.2.1 and confirm it does work
  2. steven.m.house 2017-10-24

    Confirmed. Here's the nativeStack portion of the error below the error Hans linked:
       [ERROR]     nativeStack = "1   libobjc.A.dylib                     0x000000010e59ff41 objc_exception_throw + 48\n2   ios9SpeechTest                      0x0000000106f2df62 -[HyperloopClass initWithClassName:alloc:init:args:] + 386\n3   ios9SpeechTest                      0x0000000106f20238 NewProxy + 1416\n4   JavaScriptCore                      0x000000010777b4e5 _ZN3JSC19APICallbackFunction4callINS_18JSCallbackFunctionEEExPNS_9ExecStateE + 501\n5   JavaScriptCore                      0x000000010788ad01 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11InstructionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 577\n6   JavaScriptCore                      0x0000000107893f7d llint_entry + 27269\n7   JavaScriptCore                      0x0000000107893f8b llint_entry + 27283\n8   JavaScriptCore                      0x00000001078942c6 llint_entry + 28110\n9   JavaScriptCore                      0x0000000107893f8b llint_entry + 27283\n10  JavaScriptCore                      0x0000000107893f8b llint_entry + 27283\n11  JavaScriptCore                      0x00000001078942c6 llint_entry + 28110\n12  JavaScriptCore                      0x0000000107893f8b llint_entry + 27283\n13  JavaScriptCore                      0x000000010788d310 vmEntryToJavaScript + 304\n14  JavaScriptCore                      0x000000010771e2ef _ZN3JSC7JITCode7executeEPNS_2VMEPNS_14ProtoCallFrameE + 127\n15  JavaScriptCore                      0x00000001076e45b3 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 13075\n16  JavaScriptCore                      0x000000010743213f _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 303\n17  JavaScriptCore                      0x00000001077795d0 JSEvaluateScript + 432\n18  ios9SpeechTest                      0x0000000106c4af61 -[KrollBridge evalFileOnThread:context:] + 1281\n19  ios9SpeechTest                      0x0000000106c50ccc -[KrollInvocation invoke:] + 124\n20  ios9SpeechTest                      0x0000000106c5219f -[KrollContext invoke:] + 159\n21  ios9SpeechTest                      0x0000000106c52535 -[KrollContext invokeOnThread:method:withObject:callback:selector:] + 165\n22  ios9SpeechTest                      0x0000000106c4b0d3 -[KrollBridge evalFile:callback:selector:] + 115\n23  ios9SpeechTest                      0x0000000106c4bf02 -[KrollBridge didStartNewContext:] + 2498\n24  ios9SpeechTest                      0x0000000106c52e0b -[KrollContext main] + 1819\n25  ios9SpeechTest                      0x0000000106c51f76 __21-[KrollContext start]_block_invoke + 38\n26  libdispatch.dylib                   0x00000001103e3273 _dispatch_call_block_and_release + 12\n27  libdispatch.dylib                   0x00000001103e42b5 _dispatch_client_callout + 8\n28  libdispatch.dylib                   0x00000001103ee496 _dispatch_main_queue_callback_4CF + 1260\n29  CoreFoundation                      0x000000010f1c7ef9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\n30  CoreFoundation                      0x000000010f18c662 __CFRunLoopRun + 2402\n31  CoreFoundation                      0x000000010f18ba89 CFRunLoopRunSpecific + 409\n32  GraphicsServices                    0x00000001119b79c6 GSEventRunModal + 62\n33  UIKit                               0x00000001093dcd30 UIApplicationMain + 159\n34  ios9SpeechTest                      0x0000000106c375b4 main + 100\n35  libdyld.dylib                       0x0000000110458d81 start + 1\n36  ???                                 0x0000000000000001 0x0 + 1";
       [ERROR]     sourceURL = "file:///Users/house/Library/Developer/CoreSimulator/Devices/6B7A05A1-D178-4CF4-9C55-D7F9202A9A53/data/Containers/Bundle/Application/7C2CAEF6-4E0B-41B3-B742-165059697978/ios9SpeechTest.app/hyperloop/speech/sfspeechrecognizer.js";
       [ERROR] } 
       
  3. steven.m.house 2017-10-24

    Closely related but separate ticket about same codebase but different HyperLoop and iOS version: TIMOB-25440
  4. Jan Vennemann 2017-10-25

    PR (master): https://github.com/appcelerator/hyperloop.next/pull/250 PR (2_2_X): https://github.com/appcelerator/hyperloop.next/pull/251
  5. Eric Wieber 2017-10-25

    Verified with Hyperloop 2.2.1beta2. Ti.Speech module no longer throws the error. Tested with the provided module's example project as well as several test projects I have that contain various modules.

JSON Source