Some users encountering Javascript errors - Message: Invalid character Line: 1 Char: 1 Code: 0

23 posts, 0 answers
  1. Chris
    Chris avatar
    1 posts
    Member since:
    Feb 2011

    Posted 08 Feb 2011 Link to this post

    I have the RadScriptManager and the RadComboBox working correctly on my site for most users, but several have reported encountering JavaScript errors that I cannot reproduce/ troubleshoot.

    The details of the error they are encountering are below.  Anyone have any ideas on how to resovle/troubleshoot this?


     

    The error seems to imply a request that does not return JavaScript, but that doesn’t make sense since the error is occurring with http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Core.js

    Error Details:
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET CLR 1.1.4322; Tablet PC 2.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; Zune 4.7)

     

    Timestamp: Tue, 8 Feb 2011 00:00:24 UTC

    Message: Invalid character

    Line: 1

    Char: 1

    Code: 0

    URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Core.js

     

    Message: Invalid character

    Line: 1

    Char: 1

    Code: 0

    URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/jQuery.js

     

    Message: Invalid character

    Line: 1

    Char: 1

    Code: 0

    URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/jQueryPlugins.js

     

    Message: Invalid character

    Line: 1

    Char: 1

    Code: 0

    URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Navigation/NavigationScripts.js

     

    Message: Invalid character

    Line: 1

    Char: 1

    Code: 0

    URI: http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/ComboBox/RadComboBoxScripts.js

     

    Message: 'Telerik' is undefined

    Line: 306

    Char: 5

    Code: 0

    URI: http://mySiteUrl

  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 13 Feb 2011 Link to this post

    Hello Chris,

    This is a compressed resource and the error hints the inability of the browser to uncompress it. Can you ask your users that are seeing these errors to open the script resource directly in their browser by pasting the URL:
    http://aspnet-scripts.telerikstatic.com/ajaxz/2010.2.929/Common/Core.js

    Are they seeing JavaScript code or unrecognizable sequence symbols?

    Regards,
    Simon
    the Telerik team
    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
  3. Aaron C
    Aaron C avatar
    23 posts
    Member since:
    Sep 2009

    Posted 27 May 2011 Link to this post

    I am getting this while running IE8, the file is not being uncompressed, it is an unrecognizable sequence of symbols.  What do I need to do to get IE to load the uncompressed versions?
  4. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 03 Jun 2011 Link to this post

    Hello Aaron C,

    It is possible that the resource has been compressed twice. Do you have any other means of compression enabled on your web server/application (apart from RadScriptManager)? (You can easily test this by setting the OutputCompression property of RSM to 'Disabled'.)

    Regards,
    Simon
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

  5. Andrew W
    Andrew W avatar
    4 posts
    Member since:
    Jun 2007

    Posted 12 Jul 2011 Link to this post

    Is there any resolution for this problem? We've noticed that some of our users are constantly getting this error.

    Thanks
    Andrew
  6. Aaron C
    Aaron C avatar
    23 posts
    Member since:
    Sep 2009

    Posted 12 Jul 2011 Link to this post

    In my case the issue was what Simon suggested, the files were being compressed twice.  Try setting the OutputCompression property to disabled.
  7. Andrew W
    Andrew W avatar
    4 posts
    Member since:
    Jun 2007

    Posted 12 Jul 2011 Link to this post

    But how it can be compressed twice if this supposed to be downloaded straight to the client from Telerik site?

    http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1215/Common/Core.js

  8. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 15 Jul 2011 Link to this post

    Hello Andrew W,

    Indeed, the CDN resources (http://aspnet-scripts.telerikstatic.com/ajaxz/) are compressed only once, so there must be something else causing the problem on your side.

    Additionally I was able to properly open http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1215/Common/Core.js in IE, Firefox and Chrome without issues. Can you let me know in which browsers did your users experience the problem?

    Best wishes,
    Simon
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  9. Andrew W
    Andrew W avatar
    4 posts
    Member since:
    Jun 2007

    Posted 15 Jul 2011 Link to this post

    IE 8.0
  10. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 18 Jul 2011 Link to this post

    Hi Andrew W,

    Since the files on the CDN are compressed only once and a subset of your users are getting the error constantly while the others do not get it at all, this may be a browser issue.

    Could you please gather a bit more info about the users that get the error and their browsers:
    • Version of IE8;
    • Do they get the error while browsing through HTTPS and do they get it through HTTP?
    Also could a client log the traffic on their side with FiddlerCap and send you (and me) the logs for inspection? (If you or they are concerned of their privacy, please open a support ticket and send us the logs there.)

    Best wishes,
    Simon
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  11. Daryl Skeeters
    Daryl Skeeters avatar
    3 posts
    Member since:
    Jan 2010

    Posted 16 Sep 2011 Link to this post

    Was this ever resolved?  I'm having the same issue. I have a support ticket regarding this already.
  12. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 26 Sep 2011 Link to this post

    Hello Daryl,

    We haven't yet received enough information about the problem discussed in this forum thread.

    Could you please let me know the ID of the support ticket you have submitted so that I check its status?

    Best wishes,
    Simon
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  13. Varun
    Varun avatar
    3 posts
    Member since:
    Jul 2010

    Posted 12 Oct 2011 Link to this post

    Hi Simon,

    Is there any update on the issue. I am facing the same problem. Below are the details:

    1. My web application that uses multiple telerik controls and is accessed over HTTPS
    2. The applications works fine on all browsers (IE6,7,8, Firefox, Safari) except for some machines that have IE8 8.0.6001.18702 installed (most likely with Windows XP OS).
    3. The browser throws javascript errors like "Message: '$telerik' is undefined" on accessing the web application
    4. The browser shows garbage values on accessing the link-  http://aspnet-scripts.telerikstatic.com/ajaxz/2010.3.1215/Common/Core.js
    5. It seems the browser is not able to decompress the compressed js files

    Questions
    1. Do we have a workaround available for the telerik controls, so that the issue gets resolved on IE8 8.0.6001.18702
    2. If it is a browser issue then is there an update (service packs) available that resolve the compression issue

    Please let me know if there any other information needed to track down the issue.

    Thanks,
    Varun
  14. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 12 Oct 2011 Link to this post

    Hi Varun,

    Here is a MS KB article that matches the symptoms you described. Please install the update and let me know how it goes.

    Regards,
    Simon
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  15. Varun
    Varun avatar
    3 posts
    Member since:
    Jul 2010

    Posted 12 Oct 2011 Link to this post

    Hi Simon,

    Thanks for your reply. The MSKB article applies to IE6 whereas we are facing this issue with IE8 8.0.6001.18702.
    It would be helpful if you can provide some information on this specific version of IE8.
    Thanks,
    Varun
  16. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 12 Oct 2011 Link to this post

    Hello Varun,

    Thank you for the correction.

    This was the only resource I was able to find that matched all the symptoms of the problem, except that it addressed IE6 instead of IE8. We still haven't found the solution to this.

    Additionally we just tested the same version of IE8 on this demo and although there was a message that there was mixed content on the page, the scripts loaded fine and the control worked as it should.

    So I'm afraid I cannot provide you with anything helpful at the moment. I suspect this is an OS-update-related problem but without reproducing it I would be unable to confirm it.

    If you find something of relevance, please let us know.

    All the best,
    Simon
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
  17. Daryl Skeeters
    Daryl Skeeters avatar
    3 posts
    Member since:
    Jan 2010

    Posted 12 Oct 2011 Link to this post

    Sorry for the late update.  But I resolved my issue by removing the referrences to the CDN in my Web.Config AppSettings.  Our site runs via Intranet.
  18. Varun
    Varun avatar
    3 posts
    Member since:
    Jul 2010

    Posted 11 Nov 2011 Link to this post

    Hi,

    I was able to resolve the issue by using the following settings in the web.config:

          <scriptResourceHandler enableCompression="false" enableCaching="true" />

    Using this setting the js files would not be compressed. I understand this is not a desirable solution but had to use this setting so that the users can atleast use the application at the cost of increasing the page size.

    Please let me know if there is any other workaround.

    Thanks,
    Varun
  19. Casey
    Casey avatar
    299 posts
    Member since:
    Jul 2009

    Posted 16 May 2012 Link to this post

    Is there any reason why this would be impacting some users and not others? It doesn't make sense to me that it would be an issue that can only be fixed with a modification to the web.config when only a few users are experiencing the issue. It sounds like there are some IE settings that are causing the extra compression, but only for the select few users. 

    Is anybody aware of a setting in IE that compresses the js files? 

    Thanks,
    Casey
  20. Casey
    Casey avatar
    299 posts
    Member since:
    Jul 2009

    Posted 21 May 2012 Link to this post

    I figured out what was causing this error for some of my users. I'm still not sure why this was impacting some, but not others. I was not able to reproduce the error on my computer with the same browser version, and IE settings. 

    For some reason, the following two lines were in my web.config file, and I know that I didn't manually add them, so they were automatically put in there for some reason.

    <appSettings>
            <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled"/>
            <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled"/>
        </appSettings>

    Once I removed the <appSettings> section from my web.config the users were able to view the site without any errors.

    I am using v2011.3.1115.35. Any ideas why this would be impacting some users and not others? 

    I hope that this helps anybody else experiencing this frustrating issue.

    Thanks!
    Casey
  21. Genady Sergeev
    Admin
    Genady Sergeev avatar
    1600 posts

    Posted 24 May 2012 Link to this post

    Hello Chris,

    Thank you for sharing this resolution with the community. These two properties turn on the CDN so that when user opens a page the scripts are not shipped from your website but from the closest CDN server. Now what might have been happening is that some of your users do use Intranet or have the CDN server blocked for some reason. This will lead to no scripts being shipped to them which in turn leads to malfunctioning website.

    Greetings,
    Genady Sergeev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  22. Casey
    Casey avatar
    299 posts
    Member since:
    Jul 2009

    Posted 24 May 2012 Link to this post

    Hi Genady,

    What would be the benefit of having these resources delivered by the CDN instead of our website? I'm assuming one of the benefits is that the content delivered by the CDN is compressed. However, if compression is enabled from our servers handing the response, would there be any benefit to using the CDN vs our server? 

    Thanks!
    Casey
  23. Dimitar Terziev
    Admin
    Dimitar Terziev avatar
    1268 posts

    Posted 29 May 2012 Link to this post

    Hello Casey,

    The main benefit of the CDN support is the caching. Please refer to the following help article here regarding the CDN support of the RadStyleSheetManager control. As for the compression, the resources loaded from the CDN are already compressed, but same could be done when they are served through the web resources handler since both RadStyleSheetManager and RadScriptManager could compress their output.

    All the best,
    Dimitar Terziev
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top