Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-26499

iOS: Third-party modules cannot be referenced anymore in Alloy templates


    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: Release 7.5.0
    • Fix Version/s: Release 7.5.0
    • Component/s: iOS
    • Labels:
    • Sprint:
      2018 Sprint 22


      Steps to reproduce the behavior

      1. Setup a new Alloy project and install the av.imageview module.
      2. Change app/views/index.xml to the following template that uses the module inside a list view:

                <ListView defaultItemTemplate="custom">
                        <ItemTemplate name="custom">
                            <ImageView ns="AvImageview" image="https://via.placeholder.com/150" />

      3. Add the following to app/alloy.js

        var AvImageview = require("av.imageview");

      Actual behavior
      The app boots with an JS error:

      [ERROR] Failed to load Alloy widget / CommonJS module "AvImageview.ImageView" to be used as template
      [ERROR] Script Error {
      [ERROR]     column = 1036;
      [ERROR]     line = 58;
      [ERROR]     message = "Invalid item template type provided";
      [ERROR]     nativeLocation = "+[TiViewProxy unarchiveFromTemplate:inContext:] (TiViewProxy.m:2994)";
      [ERROR]     nativeReason = "The item template type provided cannot be resolved.";
      [ERROR]     nativeStack = "3   global-test-alloy    0x00000001006a0294 global-test-alloy + 590484\n4   global-test-alloy    0x0000000100651b48 global-test-alloy + 269128\n5   global-test-alloy    0x00000001006514dc global-test-alloy + 267484\n6   CoreFoundation  0x00000001a8e6fb0c <redacted> + 216\n7   global-test-alloy    0x00000001006510e8 global-test-alloy + 266472\n8   global-test-alloy    0x0000000100785420 global-test-alloy + 1528864\n9   global-test-alloy    0x000000010078ce20 global-test-alloy + 1560096\n10  global-test-alloy    0x000000010079eae4 global-test-alloy + 1632996\n11  global-test-alloy    0x00000001006bf5dc global-test-alloy + 718300\n12  global-test-alloy    0x000000010079e968 global-test-alloy + 1632616\n13  Foundation 0x00000001a99344ac <redacted> + 272\n14  global-test-alloy    0x000000010069ff64 global-test-alloy + 589668\n15  global-test-alloy    0x000000010069c0b8 global-test-alloy + 573624\n16  global-test-alloy    0x0000000100649420 global-test-alloy + 234528\n17  global-test-alloy    0x000000010079d454 global-test-alloy + 1627220\n18  global-test-alloy    0x000000010069c2d8 global-test-alloy + 574168\n19  global-test-alloy    0x00000001006a2dfc global-test-alloy + 601596";
      [ERROR]     sourceURL = "file:///var/containers/Bundle/Application/1690C6F2-C45D-41D3-9311-6B917582242A/global-test-alloy.app/alloy/controllers/index.js";
      [ERROR]     stack = "    at [native code]\n    at Controller(/alloy/controllers/index.js:58:1036)\n    at createController(/alloy.js:339:48)\n    at (/app.js:61:23)\n    at global code(/app.js:62:70)\n    at require@[native code]\n    at (/ti.main.js:27:8)\n    at loadAsync(/ti.internal/bootstrap.loader.js:148:186)\n    at global code(/ti.main.js:24:52)";
      [ERROR]     toJSON = "<KrollCallback: 0x280108840>";
      [ERROR] } 
      [ERROR] Script Error Module "app.js" failed to leave a valid exports object

      Expected behavior
      The app works as expected and the image is displayed using the module.

      Additional notes
      This works in 7.4.1 and is broken in 7.5.0 due to this change: https://github.com/appcelerator/titanium_mobile/pull/10131


          Issue Links



              • Assignee:
                jvennemann Jan Vennemann
                jvennemann Jan Vennemann
                Christopher Williams
                Samir Mohammed
              • Watchers:
                1 Start watching this issue


                • Created:

                  Backbone Issue Sync

                  • Titanium SDK/CLI <> Titanium Mobile
                    Synced with:
                    Sync status:
                    Last received:
                    Last sent:

                    Git Integration