Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13850] LiveView: Clicking login on field service app (from Studio Sample) throws error.

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionWon't Fix
Resolution Date2015-10-05T04:41:37.000+0000
Affected Version/sRelease 3.1.1
Fix Version/s2013 Sprint 15 Tooling, 2013 Sprint 15
ComponentsLiveView
Labelsqe-3.1.1, qe-3.4.0, qe-closed-3.2.0, qe-testadded
ReporterEric Merriman
AssigneeFeon Sua Xin Miao
Created2013-05-14T00:33:02.000+0000
Updated2017-03-23T22:37:40.000+0000

Description

Description:

WHile testing using the field service app installed via the Studio Samples pane, clicking the login button with no user or password info (which should work) results in an error being thrown in the console:
[ERROR] :  [LiveView] {
[ERROR] :      error =     {
[ERROR] :          backtrace = "#0 () at file://localhost/Users/emerriman/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/83D68FB1-AC79-44FA-A309-D7D7BEEC6C02/Ti.FieldService.app/app.js:600\n#1 () at file://localhost/Users/emerriman/Library/Application%20Support/iPhone%20Simulator/6.1/Applications/83D68FB1-AC79-44FA-A309-D7D7BEEC6C02/Ti.FieldService.app/app.js:478\n#2 createUser() at :51\n#3 () at :45";
[ERROR] :          line = 127;
[ERROR] :          message = "Can't find variable: Alloy";
[ERROR] :          name = ReferenceError;
[ERROR] :          sourceId = 359535296;
[ERROR] :      };
[ERROR] :      module = "/data/setup.js";
[ERROR] :  }
[ERROR] :  Script Error {
[ERROR] :      backtrace = "#0 () at :45";
[ERROR] :      line = 52;
[ERROR] :      message = "'undefined' is not a function (evaluating 'setup.createUser()')";
[ERROR] :      name = TypeError;
[ERROR] :      sourceId = 359534688;
[ERROR] :  }

Steps to reproduce:

1) Import the field sample app via Studio sample pane 2) Enable liveview in run configurations 3) Launch a liveview session in iPad simulator 4) Click login button

Result:

Error thrown as seen above

Expected Result:

No error, prompting for creating sample user and data

Attachments

FileDateSize
ConsoleLog.txt2014-09-23T08:48:17.000+0000145052
ConsoleLog2.txt2014-09-24T06:07:32.000+0000162752

Comments

  1. Michael Xia 2013-07-26

    Still see the issue with LiveView 0.1.29 and Alloy 1.2.0. Here is the updated stack trace:
       [LiveView] Client connected
       [INFO] :   [object ComAppceleratorApmModule] loaded
       [INFO] :   [object ComSoastaTouchtestModule] loaded
       [INFO] :   [LiveView] Error Evaluating /data/setup.js @ Line: 131
       [ERROR] :  ReferenceError: Can't find variable: Alloy
       [ERROR] :  File: /data/setup.js
       [ERROR] :  Line: 131
       [ERROR] :  SourceId: 360040448
       [ERROR] :  Backtrace:
       [ERROR] :   #0 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:616
       [ERROR] :  #1 () at file://localhost/Users/mxia/Library/Application%20Support/iPhone%20Simulator/6.0/Applications/27D57553-41DC-4C4C-8DAB-11A2F6869224/Ti.FieldService.app/app.js:492
       [ERROR] :  #2 () at :32
       [ERROR] :  Script Error {
       [ERROR] :      backtrace = "#0 () at :0";
       [ERROR] :      line = 33;
       [ERROR] :      message = "'undefined' is not a function (evaluating 'setup.loadData()')";
       [ERROR] :      name = TypeError;
       [ERROR] :      sourceId = 360038400;
       [ERROR] :  }
       
  2. Christian Sullivan 2013-07-26

    resolved in [master] https://github.com/appcelerator/liveview/commit/200e160f2588562f7aa619500b502ee2f887f88f
  3. Neha Mittal 2013-12-17

    Verified with environment: Appcelerator Studio: 3.2.0.201312151544 SDK: 3.2.0.v20131216191854 alloy: 1.3.0-cr2 acs: 1.0.10 npm: 1.3.2 titanium: 3.2.0-cr3 titanium-code-processor: 1.1.0-cr2 Mac OSX 10.9 Mavericks
  4. Kajenthiran Velummaylum 2014-09-23

    The following error message is observed when running Field Service app. App didn't launch the login window. Please refer attached *console log* file for more info.
       [INFO] :   [LiveView] Error Evaluating app.js @ Line: undefined
       [ERROR] :  ReferenceError: parts is not defined
       [ERROR] :  File: app.js
       [ERROR] :  Line: undefined
       [ERROR] :  SourceId: undefined
       [ERROR] :  Backtrace:
       [ERROR] :  undefined
       
    Test Environment: |Appc-Studio | 3.4.0.201409161950| |Titanium SDK | 3.4.0.v20140922135716| |Titanium CLI | 3.4.0-rc4| |Alloy | 1.5.0-rc3| |ACS | 1.0.17 | | Liveview | 1.0.6 | |OS | Windows 8.1 (x64)|
  5. Neeraj Gupta 2014-09-24

    Does this issue occur without LiveView as well?
  6. Kajenthiran Velummaylum 2014-09-24

    I can launch the Field Service App without liveview. It doesn't show any errors as earlier. But I can not run the app because of the issues on enabling Appc-services. Test Environment: Appc-Studio: 3.4.0.201409231834 Titanium SDK: 3.4.0.v20140922135716 Titanium CLI: 3.4.0-rc4 Alloy : 1.5.0-rc3 Device: Galaxy Note 10.1 (v4.3) OS: Windows 8.1 (x64)
  7. Neeraj Gupta 2014-09-24

    What is the issue you are running with enabling services? Which environment you are pointing to in Studio - Prod or Pre-prod?
  8. Kajenthiran Velummaylum 2014-09-24

    I am pointing to production environment (https://dashboard.appcelerator.com) Cloud enablement fails for existing apps such as importing sample projects from studio. It doesn't generate acs key.
  9. Neeraj Gupta 2014-09-24

    Can you try another org (for example, Appcelerator Inc.) as this specific org may have an issue? Try pointing to preprod env as well.
  10. Kajenthiran Velummaylum 2014-09-24

    In production environment, I have the access only for *qe_test_org_prod* which doesn't allow me to enable cloud. In preprod, I used *QEVPCTest* org and enabled cloud services. But when I run the field service app(without liveview enabled), I received following excepting after I pressed Login button.
        [ERROR] :  V8Exception: Exception occurred at undefined:1: Uncaught SyntaxError: Unexpected token s
        [ERROR] :  XMLModule: (KrollRuntimeThread) [15350,21235] Error parsing XML
        [ERROR] :  XMLModule: org.xml.sax.SAXParseException: Unexpected token (position:TEXT {success: false,...@1:47 in java.io.InputStreamReader@4289df10)
        [ERROR] :  XMLModule: 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
        [ERROR] :  XMLModule: 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
        [ERROR] :  XMLModule: 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
        [ERROR] :  XMLModule: 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
        [ERROR] :  XMLModule: 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:700)
        [ERROR] :  XMLModule: 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:107)
        [ERROR] :  XMLModule: 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
        [ERROR] :  XMLModule: 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73)
        [ERROR] :  XMLModule: 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121)
        [ERROR] :  XMLModule: 	at android.os.Handler.dispatchMessage(Handler.java:95)
        [ERROR] :  XMLModule: 	at android.os.Looper.loop(Looper.java:137)
        [ERROR] :  XMLModule: 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
        [ERROR] :  TiHttpClient: (KrollRuntimeThread) [4,21239] Error parsing XML
        [ERROR] :  TiHttpClient: org.xml.sax.SAXParseException: Unexpected token (position:TEXT {success: false,...@1:47 in java.io.InputStreamReader@4289df10)
        [ERROR] :  TiHttpClient: 	at org.apache.harmony.xml.parsers.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:146)
        [ERROR] :  TiHttpClient: 	at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:107)
        [ERROR] :  TiHttpClient: 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:82)
        [ERROR] :  TiHttpClient: 	at ti.modules.titanium.xml.XMLModule.parse(XMLModule.java:68)
        [ERROR] :  TiHttpClient: 	at ti.modules.titanium.network.TiHTTPClient.getResponseXML(TiHTTPClient.java:700)
        [ERROR] :  TiHttpClient: 	at ti.modules.titanium.network.HTTPClientProxy.getResponseXML(HTTPClientProxy.java:107)
        [ERROR] :  TiHttpClient: 	at org.appcelerator.kroll.runtime.v8.V8Object.nativeCallProperty(Native Method)
        [ERROR] :  TiHttpClient: 	at org.appcelerator.kroll.runtime.v8.V8Object.callProperty(V8Object.java:73)
        [ERROR] :  TiHttpClient: 	at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1121)
        [ERROR] :  TiHttpClient: 	at android.os.Handler.dispatchMessage(Handler.java:95)
        [ERROR] :  TiHttpClient: 	at android.os.Looper.loop(Looper.java:137)
        [ERROR] :  TiHttpClient: 	at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
        
  11. Kajenthiran Velummaylum 2014-09-24

    I attached the full console log as a file *ConsoleLog2.txt*
  12. Kajenthiran Velummaylum 2014-09-25

    {panel:title=With LiveView} Actual Reason for Reopening this ticket is still reproducible. FSA is still throwing the runtime error with following console errors
     [INFO] :   [LiveView] Error Evaluating app.js @ Line: undefined
        [ERROR] :  ReferenceError: parts is not defined
        [ERROR] :  File: app.js
        [ERROR] :  Line: undefined
        [ERROR] :  SourceId: undefined
        [ERROR] :  Backtrace:
        [ERROR] :  undefined 
    {panel} {panel:title=Without LiveView} The Error scenario I got earlier which is mentioned in above comments, doesn't occur anymore. {panel}
  13. Chee Kiat Ng 2015-10-05

    Closing ticket since sample app no longer available.
  14. Lee Morris 2017-03-23

    Closing ticket as Won't Fix with reference to the above comments.

JSON Source