Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-25588] Hyperloop: iOS: Cannnot find class with name

GitHub Issuen/a
TypeBug
PriorityCritical
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsHyperloop
Labelsn/a
ReporterBrian García
AssigneeJan Vennemann
Created2017-12-07T15:48:59.000+0000
Updated2019-01-18T20:02:40.000+0000

Description

When using material pod ([https://github.com/CosmicMind/Material]) and trying the following code:
var Card = require("Material/Card");
var Toolbar = require("Material/Toolbar");
var IconButton = require("Material/IconButton");
var Bar = require("Material/Bar");
var UIColor = require('UIKit/UIColor');
var Material = require("Material/Material");
var View = require("UIKit/UIView");
var CardView = require("Material/View");
var FlatButton = require("Material/FlatButton");

var CGRectMake = require('CoreGraphics').CGRectMake;



var btn = new FlatButton();
btn.title = "Flat Button";
btn.width = 220;
btn.height = 45;
$.index.add(btn);
fails with
[ERROR] Cannot find class with name: FlatButton
[ERROR] Script Error {
[ERROR]     column = 32;
[ERROR]     description = "Cannot find class with name: FlatButton";
[ERROR]     line = 108;
[ERROR]     message = "Cannot find class with name: FlatButton";
[ERROR]     name = ClassNotFound;
[ERROR]     nativeStack = "1   libobjc.A.dylib                     0x0000000113a
30f41 objc_exception_throw + 48\n2   materiallib                         0x00000
0010bf2e3e2 -[HyperloopClass initWithClassName:alloc:init:args:] + 386\n3   mate
riallib                         0x000000010bf206b8 NewProxy + 1416\n4   JavaScri
ptCore                      0x000000010cc72505 _ZN3JSC19APICallbackFunction4call
INS_18JSCallbackFunctionEEExPNS_9ExecStateE + 501\n5   JavaScriptCore           
           0x000000010cd81d21 _ZN3JSC5LLInt9setUpCallEPNS_9ExecStateEPNS_11Instr
uctionENS_22CodeSpecializationKindENS_7JSValueEPNS_17LLIntCallLinkInfoE + 577\n6
   JavaScriptCore                      0x000000010cd8af9d llint_entry + 27269\n7
   JavaScriptCore                      0x000000010cd8afab llint_entry + 27283\n8
   JavaScriptCore                      0x000000010cd8b2e6 llint_entry + 28110\n9
   JavaScriptCore                      0x000000010cd8b2e6 llint_entry + 28110\n1
0  JavaScriptCore                      0x000000010cd8afab llint_entry + 27283\n1
1  JavaScriptCore                      0x000000010cd84330 vmEntryToJavaScript + 
304\n12  JavaScriptCore                      0x000000010cc1530f _ZN3JSC7JITCode7
executeEPNS_2VMEPNS_14ProtoCallFrameE + 127\n13  JavaScriptCore                 
     0x000000010cbdb5d3 _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEP
NS_9ExecStateEPNS_8JSObjectE + 13075\n14  JavaScriptCore                      0x
000000010c9290ff _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueER
N3WTF8NakedPtrINS_9ExceptionEEE + 303\n15  JavaScriptCore                      0
x000000010cc705f0 JSEvaluateScript + 432\n16  materiallib                       
  0x000000010bc5fe71 -[KrollBridge evalFileOnThread:context:] + 1281\n17  materi
allib                         0x000000010bc65c1c -[KrollInvocation invoke:] + 12
4\n18  materiallib                         0x000000010bc670ef -[KrollContext inv
oke:] + 159\n19  materiallib                         0x000000010bc67485 -[KrollC
ontext invokeOnThread:method:withObject:callback:selector:] + 165\n20  materiall
ib                         0x000000010bc5ffe3 -[KrollBridge evalFile:callback:se
lector:] + 115\n21  materiallib                         0x000000010bc60e12 -[Kro
llBridge didStartNewContext:] + 2498\n22  materiallib                         0x
000000010bc67d5b -[KrollContext main] + 1819\n23  materiallib                   
      0x000000010bc66ec6 __21-[KrollContext start]_block_invoke + 38\n24  libdis
patch.dylib                   0x00000001169b2273 _dispatch_call_block_and_releas
e + 12\n25  libdispatch.dylib                   0x00000001169b32b5 _dispatch_cli
ent_callout + 8\n26  libdispatch.dylib                   0x00000001169bd496 _dis
patch_main_queue_callback_4CF + 1260\n27  CoreFoundation                      0x
0000000114a41ee9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9\n28  Cor
eFoundation                      0x0000000114a06592 __CFRunLoopRun + 2402\n29  C
oreFoundation                      0x0000000114a059b9 CFRunLoopRunSpecific + 409
\n30  GraphicsServices                    0x00000001189d39c6 GSEventRunModal + 6
2\n31  UIKit                               0x000000010e81d5e8 UIApplicationMain 
+ 159\n32  materiallib                         0x000000010bc4cef4 main + 100\n33
  libdyld.dylib                       0x0000000116a27d81 start + 1";
[ERROR]     sourceURL = "file:///Users/Brian/Library/Developer/CoreSimulator/Dev
ices/C481AD0F-F846-41BE-9D03-CFEEF1811F09/data/Containers/Bundle/Application/6B7
71C23-F3BC-4362-BEAC-A5402D3F83C7/materiallib.app/hyperloop/material/flatbutton.
js";
[ERROR] } 

Attachments

FileDateSize
build_iphone.log2017-12-07T15:46:50.000+00001257703
metabase-8.0-iphonesimulator-06f5cfc8db088e468d43ab8a4125c15e.h2017-12-07T15:46:55.000+000019311
metabase-8.0-iphonesimulator-c248691bcf3bdb854a7b282d1eb47a9d.h2017-12-07T15:46:56.000+000019125
metabase-cocoapods-bc60abbc4843bc69bcf166484785ab53.json2017-12-07T15:46:56.000+000010683
metabase-mappings-iphonesimulator-8.0.json2017-12-07T15:46:58.000+0000693874
metadata-framework-availability.json2017-12-07T15:46:55.000+00002072
symbol_references.json2017-12-07T15:46:55.000+000023893

Comments

  1. Brian García 2018-01-23

    Any update on this? it's a blocking issue for me right now
  2. Brian García 2018-03-28

    Also happening with: [FluidSlider](https://github.com/Ramotion/fluid-slider)
       var FluidSlider = require('fluid_slider/Slider');
         slider = new FluidSlider();
       
  3. Jan Vennemann 2019-01-15

    Possible duplicate of TIMOB-26697
  4. Brian García 2019-01-18

    tested again with Hyperloop 4.0.1 and this is the new error stacktrace:
       Module "hyperloop/material/flatbutton.js" failed to leave a valid exports object
       
       4   TitaniumKit0x000000010d765149 -[KrollBridge loadAsFileOrDirectory:withContext:] + 40
       5   TitaniumKit0x000000010d765667 -[KrollBridge require:path:] + 502
       6   TitaniumKit0x000000010d79b4b1 CommonJSRequireCallback + 106
       7   JavaScriptCore  0x0000000108839b9f _ZN3JSC19APICallbackFunction4callINS_18JSCallbackFunctionEEExPNS_9ExecStateE + 495
       8   ???   0x000037a3b340102d 0x0 + 61176226517037
       9   JavaScriptCore  0x000000010880e2e2 llint_entry + 26726
       10  JavaScriptCore  0x000000010880e33d llint_entry + 26817
       11  JavaScriptCore  0x000000010880e33d llint_entry + 26817
       12  JavaScriptCore  0x000000010880e33d llint_entry + 26817
       13  JavaScriptCore  0x00000001088078fe vmEntryToJavaScript + 244
       14  JavaScriptCore  0x0000000108d0236a _ZN3JSC11Interpreter14executeProgramERKNS_10SourceCodeEPNS_9ExecStateEPNS_8JSObjectE + 11178
       15  JavaScriptCore  0x0000000108f2da20 _ZN3JSC8evaluateEPNS_9ExecStateERKNS_10SourceCodeENS_7JSValueERN3WTF8NakedPtrINS_9ExceptionEEE + 288
       16  JavaScriptCore  0x0000000108838ff5 JSEvaluateScript + 501
       17  TitaniumKit0x000000010d763223 -[KrollBridge evalFileOnThread:context:] + 823
       18  TitaniumKit0x000000010d79a09b -[KrollInvocation invoke:] + 79
       19  TitaniumKit0x000000010d79ac04 -[KrollContext invoke:] + 109
       

JSON Source