Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    UploadItem logs errors

    Problem:
    Errors are logged when clicking Open on an UploadItem file selection dialog.

    Using:
    SmartClient Version: SNAPSHOT_v8.3d_2012-09-19/LGPL Development Only (built 2012-09-19)
    SmartGWT 3.1
    GWT 2.3.0
    FireFox 6.0.2
    Windows 7

    How to reproduce
    1. Create a DynamicForm with an UploadItem
    2. Click Browse
    3. Select a file and click Open

    Sample Code:
    Code:
    import com.smartgwt.client.widgets.form.fields.UploadItem;
    import com.smartgwt.client.widgets.form.fields.SubmitItem;
    import com.smartgwt.client.widgets.form.DynamicForm;
    import com.smartgwt.client.types.Encoding;
    import com.smartgwt.client.util.SC;
    
    import com.google.gwt.core.client.EntryPoint;
    
    public class UploadItemTest implements EntryPoint {
    
      /**
       * The EntryPoint interface
       */
      public void onModuleLoad () {
        
        // test
        SC.showConsole ();
        
        // files
        final UploadItem uploadItem = new UploadItem ();
        uploadItem.setTitle ("Files");
        uploadItem.setRequired (true);
        uploadItem.setWidth (300);
        uploadItem.setMultiple (true);
    
        // submit
        final SubmitItem submitItem = new SubmitItem ();
        
        // form
        final DynamicForm uploadForm = new DynamicForm ();
        uploadForm.setEncoding (Encoding.MULTIPART);
        uploadForm.setItems (
          uploadItem,
          submitItem);
        
        // layout
        uploadForm.draw ();
      }
    }
    The following appear in the console:
    Code:
    00:01:20.607 [ERROR] 10:07:31.483:ICHG8:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` th
     at is not an array.com.smartgwt.client.core.JsObject$SGWT_WARN: 10:07:31.483:ICHG8:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` th
     at is not an array.
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
     at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
     at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
     at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
     at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
     at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
     at java.lang.Thread.run(Thread.java:662)
    
    00:01:20.608 [ERROR] 10:07:31.487:ICHG8:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` th
     at is not an array.com.smartgwt.client.core.JsObject$SGWT_WARN: 10:07:31.487:ICHG8:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` th
     at is not an array.
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
     at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
     at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
     at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
     at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
     at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
     at java.lang.Thread.run(Thread.java:662)
    
    00:01:29.559 [ERROR] 10:07:40.439:TMR6:WARN:Log:Error: Permission denied to access property 'getAttribute' Stack from error.stack: [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848 FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1734 [c]Class.fireCallback(_1=>{Obj}, _2=>undef, _3=>[object Array], _4=>{Obj}, _5=>true) @ portal/sc/modules/ISC_Core.js:316 Timer._fireTimeout("$ir377") @ portal/sc/modules/ISC_Core.js:1511 unnamed() @ portal/sc/modules/ISC_Core.js:1506 unnamed() @com.smartgwt.client.core.JsObject$SGWT_WARN: 10:07:40.439:TMR6:WARN:Log:Error: Permission denied to access property 'getAttribute' Stack from error.stack:     [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848     FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1734     [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true) @ portal/sc/modules/ISC_Core.js:316     Timer._fireTimeout("$ir377") @ portal/sc/modules/ISC_Core.js:1511     unnamed() @ portal/sc/modules/ISC_Core.js:1506     unnamed() @
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
     at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
     at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:105)
     at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
     at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:167)
     at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:281)
     at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:531)
     at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:352)
     at java.lang.Thread.run(Thread.java:662)
    The following appears on the dev console:
    Code:
    10:06:26.529:INFO:Log:initialized
    10:06:26.557:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
    10:06:57.532:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [UploadItem ID:isc_UploadItem_1 name:isc_UploadItem_0]
    10:06:57.535:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [SubmitItem ID:isc_SubmitItem_1 name:isc_SubmitItem_0]
    10:06:58.290:INFO:Log:isc.Page is loaded
    10:07:31.483:ICHG8:INFO:RPCManager:sendQueue called with no current queue, ignoring
    10:07:31.483:ICHG8:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
    10:07:31.487:ICHG8:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.
    10:07:40.439:TMR6:WARN:Log:Error: Permission denied to access property 'getAttribute'
    Stack from error.stack:
        [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848
        FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1734
        [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true) @ portal/sc/modules/ISC_Core.js:316
        Timer._fireTimeout("$ir377") @ portal/sc/modules/ISC_Core.js:1511
        unnamed() @ portal/sc/modules/ISC_Core.js:1506
        unnamed() @ 
    
    10:23:27.526:TMR0:WARN:Log:Error: Permission denied to access property 'getAttribute'
    Stack from error.stack:
        [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848
        FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1734
        [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true) @ portal/sc/modules/ISC_Core.js:316
        Timer._fireTimeout("$ir590") @ portal/sc/modules/ISC_Core.js:1511
        unnamed() @ portal/sc/modules/ISC_Core.js:1506
        unnamed() @
    Last edited by shortpasta; 20 Sep 2012, 09:39.

    #2
    We tried both the SmartGWT zip file from 8-19 and the latest development stream, but can only reproduce the first two warnings with your sample code:

    04:38:01.467:ICHG9:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
    04:38:01.467:ICHG9:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.

    I'm not able to reproduce the 'permission denied' warning.

    [Edit: We've made a fix to the SC 8.3d stream to fix the above warnings, which should be in the next nightly build.]
    Last edited by Isomorphic; 28 Sep 2012, 00:33.

    Comment


      #3
      I just tried with this:
      SmartClient Version: SNAPSHOT_v8.3d_2012-09-27/LGPL Development Only (built 2012-09-27)

      When I select a jpg file, I get this:
      Code:
      08:14:22.514:INFO:Log:initialized
      08:14:22.541:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
      08:14:27.210:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [UploadItem ID:isc_UploadItem_1 name:isc_UploadItem_0]
      08:14:27.213:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [SubmitItem ID:isc_SubmitItem_1 name:isc_SubmitItem_0]
      08:14:27.622:INFO:Log:isc.Page is loaded
      08:14:41.563:ICHG9:INFO:RPCManager:sendQueue called with no current queue, ignoring
      08:14:41.563:ICHG9:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
      08:14:41.565:ICHG9:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.
      08:14:43.186:TMR2:WARN:Log:Error: Permission denied to access property 'getAttribute'
      Stack from error.stack:
          [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848
          FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1736
          [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true) @ portal/sc/modules/ISC_Core.js:328
          Timer._fireTimeout("$ir147") @ portal/sc/modules/ISC_Core.js:1524
          unnamed() @ portal/sc/modules/ISC_Core.js:1519
          unnamed() @
      When I select a txt file, I get this:
      Code:
      08:12:25.114:INFO:Log:initialized
      08:12:25.143:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
      08:12:30.434:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [UploadItem ID:isc_UploadItem_1 name:isc_UploadItem_0]
      08:12:30.436:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [SubmitItem ID:isc_SubmitItem_1 name:isc_SubmitItem_0]
      08:12:30.995:INFO:Log:isc.Page is loaded
      08:12:33.906:ICHG5:INFO:RPCManager:sendQueue called with no current queue, ignoring
      08:12:33.906:ICHG5:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
      08:12:33.909:ICHG5:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.
      08:12:37.922:TMR3:WARN:Log:Error: Permission denied to access property 'getAttribute'
      Stack from error.stack:
          [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848
          FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1736
          [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true) @ portal/sc/modules/ISC_Core.js:328
          Timer._fireTimeout("$ir95") @ portal/sc/modules/ISC_Core.js:1524
          unnamed() @ portal/sc/modules/ISC_Core.js:1519
          unnamed() @
      When I select an mp3, I get this:
      Code:
      08:15:48.568:INFO:Log:initialized
      08:15:48.596:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
      08:15:53.928:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [UploadItem ID:isc_UploadItem_1 name:isc_UploadItem_0]
      08:15:53.930:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [SubmitItem ID:isc_SubmitItem_1 name:isc_SubmitItem_0]
      08:15:54.372:INFO:Log:isc.Page is loaded
      08:16:00.816:ICHG3:INFO:RPCManager:sendQueue called with no current queue, ignoring
      08:16:00.816:ICHG3:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null first argument `value1` that is not an array.
      08:16:00.818:ICHG3:WARN:UploadItem:isc_UploadItem_1[isc_UploadItem_0]:compareValues - this is a multiple FormItem but compareValues was called with a non-null second argument `value2` that is not an array.
      Want me to test something specific?

      Comment


        #4
        The fix mentioned above is in the 09-28 version of SC 8.3d.

        As noted, we are not able to reproduce the "Permission Denied" error. You may want to check whether it occurs in the current version of Firefox supported on Windows, FF15, or whether it occurs in another browser such as Chrome or IE. It may be an issue related to your plugin environment or filetype associations.
        Last edited by Isomorphic; 28 Sep 2012, 11:19.

        Comment


          #5
          I am confirming that the warnings go away with this:
          SmartClient Version: SNAPSHOT_v8.3d_2012-09-29/LGPL Development Only (built 2012-09-29)

          However, FYI...

          The Permission denied error is still there with Firefox 6.0.2:
          Code:
          23:13:52.125:INFO:Log:initialized
          23:13:52.153:WARN:Log:NOTE: Firebug is enabled. Firebug greatly slows the performance of applications that make heavy use of JavaScript. Isomorphic highly recommends Firebug for troubleshooting, but Firebug and other development tools should be disabled when assessing the real-world performance of SmartClient applications.
          23:13:52.988:WARN:Class:args and stuff
          23:14:25.661:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [UploadItem ID:isc_UploadItem_1 name:isc_UploadItem_0]
          23:14:25.663:DEBUG:DynamicForm:isc_DynamicForm_0:Drawing FormItem: [SubmitItem ID:isc_SubmitItem_1 name:isc_SubmitItem_0]
          23:14:25.717:INFO:Log:isc.Page is loaded
          23:15:21.244:ICHG0:INFO:RPCManager:sendQueue called with no current queue, ignoring
          23:15:23.775:TMR9:WARN:Log:Error: Permission denied to access property 'getAttribute'
          Stack from error.stack:
              [c]DynamicForm._getItemInfoFromElement(_1=>[object Proxy]) @ portal/sc/modules/ISC_Forms.js:848
              FormItem.checkForEditorExit(true) @ portal/sc/modules/ISC_Forms.js:1736
              [c]Class.fireCallback(_1=>{Obj},  _2=>undef,  _3=>[object Array],  _4=>{Obj},  _5=>true) @ portal/sc/modules/ISC_Core.js:328
              Timer._fireTimeout("$ir197") @ portal/sc/modules/ISC_Core.js:1524
              unnamed() @ portal/sc/modules/ISC_Core.js:1519
              unnamed() @
          Looking good with Chrome 22.0.1229.79 m:
          Code:
          23:16:26.574:INFO:Log:initialized
          23:16:27.139:WARN:Class:args and stuff
          23:16:31.870:WARN:Log:WARNING: due to bugs in Chrome, GWT development mode in Chrome is not reliable and should not be used.  This does not affect compiled mode in Chrome, which works.  Note that the same bug makes GWT development mode in Chrome very slow as well, so other browsers will be faster as well.  More details including links to Chrome bugs here: http://forums.smartclient.com/showthread.php?t=8159#aChrome
          23:16:33.526:INFO:Log:isc.Page is loaded
          Looking good with IE 9:
          Code:
          23:18:54.112:INFO:Log:initialized
          23:18:54.114:WARN:Page:NOTE: isc.Page.getWidth() called before <BODY> tag was written out -- value cannot be determined.  Returning 500
          23:18:54.114:WARN:Page:NOTE: isc.Page.getHeight() called before <BODY> tag was written out -- value cannot be determined.  Returning 500
          23:18:54.269:WARN:Class:args and stuff
          23:18:54.353:INFO:Log:isc.Page is loaded
          23:18:54.353:WARN:Class:in frame

          Comment

          Working...
          X