Announcement

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

    IE9: SCRIPT438: Object doesn't support property or method 'startsWith'

    Using
    com.isomorphic.pe
    3.0p.2012-03-09

    one of our customer reported a bug with IE 9.

    It says :

    SCRIPT438: Object doesn't support property or method 'startsWith'
    ISC_Forms.js?isc_version=8.2.js, line 1361 character 58

    would be nice to fix it.

    If possible, can you tell us, which component functionality throws this exception, so that we can probably provide a temporary hack, instead of switching to fixed version immediately?

    Thanks,

    #2
    This suggests that some SmartGWT code is running in a HTML frame where ISC_Core.js et al have not been loaded.

    No indication of a SmartGWT bug.

    Let us know of you encounter details that suggest a framework bug.

    Comment


      #3
      Hi!

      I am from the same company as 'damend'.
      We don't use HTML frames from very beginning.

      Same app, same server, same situation - works fine with Firefox 10-12 and IE8. Doesn't work only with IE9:
      Code:
      10:20:03.878:XRP9[E]:WARN:Log:Error:
      	'Object doesn't support property or method 'startsWith''
      	in https://server:444/portal/sc/modules/ISC_Forms.js?isc_version=8.2.js
      	at line 1361
          crashed in:  FormItem.setElementValue()
          Use a pre-9.0 Internet Explorer for best diagnostics, otherwise Firefox or Chrome
      10:20:03.981:TMR8:WARN:Log:Error:
      	'Object doesn't support property or method 'startsWith''
      	in https://server:444/portal/sc/modules/ISC_Forms.js?isc_version=8.2.js
      	at line 1361
          crashed in:  FormItem.setElementValue()
          Use a pre-9.0 Internet Explorer for best diagnostics, otherwise Firefox or Chrome
      Unfortunately I have no clue why and where this happens is our code, so I can't post code excerpts here.

      Currently it's a big blocker for our project. Please help!

      Greets,
      Alexey

      Comment


        #4
        Frames are always involved in GWT, it's how GWT loads your app.

        Your problem again is a String from another frame, which is missing the startsWith method (and other methods) because the frame it came from did not have the SmartGWT framework loaded (ISC_Core.js et al).

        One way to create such an object by accidentally using "new String()" in JSNI (never occurs in the framework) or by using "eval()" in JSNI instead of "$wnd.eval()", perhaps as part of JSON data loading. Neither mistake occurs anywhere in the framework.

        From the error message you've shared, it's clear that the String is the value you're trying to apply to some FormItem, in this case, some form field that *does not* have a native input element (<input> in HTML), such as a SelectItem.

        It makes sense that this particular error would be IE-only since it's in an IE-only codepath. We don't know how it could be IE9 only unless you have code similar to that described above which only runs in IE9.

        That's all we can tell from such limited information.

        Comment


          #5
          Hi,

          after spending one day,
          we could track the issue:

          it's with

          FieldType type = dataSource.getField(dsFieldName).getType();
          // leads to big ie9 bug on deployed version
          item.setType(type.getValue()); --> where type is DATETIME

          when the form is drawn ( not on runtime), the error occurs as described.
          We removed item.setType and it's working.

          Probably you want to have a look on this method.

          Comment


            #6
            Sounds like you've got a solution - let us know if you can show this happening with a standalone test case.

            Comment


              #7
              FYI - here's someone who had a very similar problem.

              They tracked it to the core GWT bug described in the FAQ.

              Comment

              Working...
              X