Ошибка json определение отсутствует что это

Всем привет!

Заметил, что почти на счех сайта выскакивает ошибка JavaScript:

——————————————————————-

Сведения об ошибке на веб-странице

Сообщение: ‘JSON’ — определение отсутствует

Строка: 418

Символ: 6

Код: 0

URI-код: http://www.yandex.ru/

——————————————————————-

Не пойму, что это.

Браузер IE, 8.0.6001.

Выглядит это так: сайт полностью прогружается, а потом указатель мыши дергается, как будто что-то догружается, и тут же вылетает эта ошибка. Причем, тоже самое почти для всех сайтов, та же самая строка и символ.

Интересно, что для сайта SE этого нет.

Кто нибудь сталкивался? Может это какая надстройка?

Помогите плиз разобраться.

  • Home
  • VBForums
  • .NET and More
  • ASP.NET And ASP.NET Core
  • VS 2010 [RESOLVED] Microsoft JScript runtime error: ‘JSON’ is undefined

  1. Jun 21st, 2011, 08:17 PM

    #1

    Resolved [RESOLVED] Microsoft JScript runtime error: ‘JSON’ is undefined

    I am using Windows 7 PRO, 64 bit, with Internet Explorer 8, Visual Studio 2010

    Every time I run any ASP.NET application in debug mode, right after it loads any of the pages, then I get 2 errors:

    Error: Microsoft JScript runtime error: ‘JSON’ is undefined

    Name:  Err1.jpg
Views: 14671
Size:  113.4 KB

    I click «Ignore» error, then I get this: Microsoft JScript runtime error: ‘undefined’ is null or not an object

    Name:  Err2.jpg
Views: 14447
Size:  165.4 KB

    And the file is from Internet Explorer:
    Name:  Err3.jpg
Views: 14117
Size:  23.1 KB

    Anyone know how to fix this ?

    Last edited by CVMichael; Jun 21st, 2011 at 08:42 PM.


  2. Jun 21st, 2011, 08:55 PM

    #2

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Where is that JSON defined? If its in some library, are the required js files included?


  3. Jun 21st, 2011, 08:59 PM

    #3

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    I have no idea… I think it’s part of the IE8…

    I kind of fixed the problem, I disabled «Active scripting»

    Name:  Err4.jpg
Views: 14226
Size:  118.9 KB

    And now I don’t get those errors, but I have no idea what are the consequences of disabling that option from IE.

    I am google-ing it right now…

    Last edited by CVMichael; Jun 21st, 2011 at 10:59 PM.


  4. Jun 21st, 2011, 10:52 PM

    #4

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    I was afraid of that… Now, none of the javascripts executes, so I had no choice but to re-enable active scripting


  5. Jun 24th, 2011, 12:42 AM

    #5

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    I still have this problem

    Very annoying… I have to click on «Ignore» error for any button (or link) I click on my web pages…


  6. Jun 24th, 2011, 12:57 AM

    #6

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Hello,

    I can’t say that I have seen this problem, no.

    Does this happen on every web page, and web application that you debug out of Visual Studio? Or is it only one? If it is, what is different about that site?

    Gary


  7. Jun 24th, 2011, 01:09 AM

    #7

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    It’s on any page, any app, even when I just create a new app and don’t write any code, and just run it, as soon as it opens in IE, it gives me those 2 errors.

    And only in Debug mode… If I just build the app, then go to IE, and type the http://localhost/TestApp link, then I don’t get any errors (in IE).


  8. Jun 24th, 2011, 01:15 AM

    #8

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Hmm, very strange.

    Okay, so obvious questions first…

    Have you tried setting your default browser from Visual Studio to another browser? Does the same thing happen?

    Have you got all updates to Visual Studio?

    Have you got all updates to Windows?

    Is there any possibility that you have any viruses/spyware lurking on your machine?

    Gary


  9. Jun 24th, 2011, 01:27 AM

    #9

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    «Have you tried setting your default browser from Visual Studio to another browser? Does the same thing happen?»
    With Internal Browser, no errors (but for some reason it does not debug)
    With FireFox no errors (but does not debug)
    Safari, no errors (but does not debug)
    So it seems only in IE, and it seems like it’s the only one that I can debug

    «Have you got all updates to Visual Studio?»
    No… how do you do that ? (I’ll google it…)

    «Have you got all updates to Windows?»
    Yes…

    «Is there any possibility that you have any viruses/spyware lurking on your machine?»
    I have AVG antivirus, that has anti-spyware also…
    Also… the errors don’t seem like spyware to me…

    Last edited by CVMichael; Jun 24th, 2011 at 01:30 AM.


  10. Jun 24th, 2011, 01:30 AM

    #10

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    To get the latest updates for Visual Studio, and any other Microsoft Product on your machine, make sure that you are using Microsoft Update, rather than Windows Update.

    Ok, so this definitely sounds like a problem with IE then. Are you running any additional addins/extensions for IE? For instance, any additional toolbars?

    Have you done a full scan with each of those packages lately? Might be good to do, just to rule it out.

    Gary


  11. Jun 24th, 2011, 01:39 AM

    #11

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    I am downloading VS2010 SP1 ISO right now (ISO because I want to have it for the future so I don’t have to download it again)

    Quote Originally Posted by gep13
    View Post

    …with each of those packages lately?…

    What do you mean by that ?


  12. Jun 24th, 2011, 01:44 AM

    #12

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Sounds like a plan.

    I mean, have you downloaded all the recent virus and spyware updates, and ran a full virus scan and a full spyware scan of your computer lately?

    Gary


  13. Jun 24th, 2011, 01:50 AM

    #13

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Ow… I see…
    I started a «Full computer scan», it’s still in progress, nothing unusual yet…

    [edit]
    The scan is complete, no infections, perfectly clean…

    Last edited by CVMichael; Jun 24th, 2011 at 02:01 AM.


  14. Jun 24th, 2011, 02:09 AM

    #14

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Hmmm, very strange.

    What about clearing out Internet Explorer Temporary Internet Files?

    I am starting to clutch at straws here It is definitely something with IE, but not sure what else it could be. The only other thing I could suggest would be to try this:

    http://www.piriform.com/CCLEANER

    Gary


  15. Jun 24th, 2011, 02:43 AM

    #15

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Thanks for all your help Gary,

    I have finished downloading SP1, but it’s very late for me, I will continue tomorrow to install it, and hopefully it will fix the problem.


  16. Jun 24th, 2011, 02:48 AM

    #16

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    I was going to say, surely you should be grabbing some zzzz’s by now

    Let me know how you get on.

    Gary


  17. Jun 24th, 2011, 05:40 PM

    #17

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    I installed SP1, and also I ran CCleaner, and no change, same problem


  18. Jun 25th, 2011, 03:12 AM

    #18

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    Unfortunately, I am fresh out of ideas, sorry

    Gary


  19. Jun 26th, 2011, 12:24 AM

    #19

    Re: Microsoft JScript runtime error: ‘JSON’ is undefined

    FINALLY !!! I found the solution…

    I was going through this thread:
    http://www.sharkyforums.com/showthread.php?t=321706

    In the second-last post, there is a link to the solution:
    http://winmike.blogspot.com/2011/01/…after-you.html

    So, disabling DivX Add-on fixed my problem, no more annoying errors when debugging my apps.


  20. Jun 26th, 2011, 04:32 AM

    #20

    Re: [RESOLVED] Microsoft JScript runtime error: ‘JSON’ is undefined

    Wow!

    Very strange! Glad to hear that you got a solution!

    Gary


  • Home
  • VBForums
  • .NET and More
  • ASP.NET And ASP.NET Core
  • VS 2010 [RESOLVED] Microsoft JScript runtime error: ‘JSON’ is undefined


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

Выполняю код.

    //_ТекстСкрипта;

    Скрипт = СоздатьОбъект(«MSScriptControl.ScriptControl»);

    Скрипт.Language = «JScript»;

    Скрипт.AddCode(_ТекстСкрипта);    

    Скрипт.Run(«init»);

ТекстСкрипта равен

var socket;

var isConnect = false;

function errorConnectDefault(data) { alert(data);}

var errorConnectCallBack = errorConnectDefault;

    function init() {

        connectTumSocket1(«7kaIenL3KzdAEgPVeXqtgOPwJEPTm558GMesUET+60JKxNzwG0JcEl97Vs+jE/A8WAzDGr1xkYoPvbaHGYVRDw==», function (event) {

            var options = {«apiKey»: «86be88c8437850fbf008f92fa0481423-76dc611d-0b1f-843f»};

        //    CheckAPIKey(options, function (event) {

        //        var data = JSON.parse(event.data);

            })

        });

    }

function connectTumSocket1(apiKey, callback) {

    socket = new WebSocket(«ws://localhost:6126/tumarcsp/»);

    socket.onopen = function(){

        isConnect = true;

        var options = {

            «apiKey»:apiKey

        };

    //    SetAPIKey(options, callback);

    }

    socket.onclose = function(){

        isConnect = false;

    }

    socket.onerror = function(event){

    }

}

Выходит ошибка:

Ошибка выполнения Microsoft JScript: ‘WebSocket’ — определение отсутствует

Подскажите, плиз, что нужно сделать?

We are using jQuery in our application. We have used a jQuery plugin to implement JavaScript session.

It is working properly in Firefox and most Internet Explorer 8 browsers.

But in some Internet Explorer 8 browsers it does not work. It gives the following error.

Message: 'JSON' is undefined
Line: 6
Char: 3
Code: 0


Message: '$.namesession' is null or not an object
Line: 53
Char: 2
Code: 0

`

The version of Internet Explorer in both the cases is same.

But there were some differences in Internet Explorer settings like Use SSL3.0 and Enable Smart Screen filters check boxes in the Advanced tab in the Internet options were unchecked.

When we checked it, it started working. When we unchecked them it was still working.

What is the actual problem in IE8?

добрый вечер.

помогите пожалуйста

есть скрипт

for (var k = 1; k < i; k++) {
	if (document.getElementById('col1_'+ k) == null) {
		continue;
	}
	arrObjects.push({
		row: k, 
		number: document.getElementById('col1_'+ k).title ,
		number_in: document.getElementById('col2_' +k).title,
		list: document.getElementById('col3_'+ k).title ,
		warehouse: document.getElementById('col4_' +k).title,
		count: document.getElementById('col5_'+ k).title ,
		price_purch: document.getElementById('col6_' +k).title,
		price_retail: document.getElementById('col7_'+ k).title,
		id: document.getElementById('field_id_0').value
	} );
}
$.ajax({
	type: 'POST',
	url: '/admin/entity/action2/insertBill.php',
	dataType: 'json',
	data: 'arrObjectsBill=' + JSON.stringify(arrObjectsBill),
	success: function(response)
	{
		...
	}
});

работает во всех браузерах, а в IE пишет
‘JSON’ — определение отсутствует

что делать?

I have use a web browser for my project and I made it load a web page as soon as the program has loaded.
Before I have an error called a script error but i used the code
webBrowser1.ScriptErrorsSuppressed = true;
now that error doesn’t appear no more but i’m still getting the problem with the loading of a web page

I attached pictures below on what i’m having issue with.

Here is what the website i was to load looks like

Here is The Problem i’m getting

Is there a fix or an addon to visual studios to use a different web browser

  • javascript
  • c#

nnnnnn's user avatar

nnnnnn

147k30 gold badges199 silver badges239 bronze badges

asked Mar 26, 2016 at 19:31

Ben H's user avatar

Ben HBen H

12 bronze badges

6

  • Disconnecting the «check engine» light won’t stop your engine from overheating…

    Mar 26, 2016 at 19:45

  • How will I fix them don’t know what causing them

    Mar 26, 2016 at 19:47

  • Sorry What are you on about «check engine » light ?

    Mar 26, 2016 at 19:51

  • It’s a metaphor. Anyway, if you don’t suppress the errors, does the browser tell you what the errors are? Check the dev console.

    Mar 26, 2016 at 19:54

  • I get this error Click me

    Mar 26, 2016 at 20:07

1 Answer

You are embedding Web Browser in Win Forms project… and the browser engine is probably IE8 — it doesn’t have JSON variable used by script. You need to define JSON parser yourself — take a look at this Q&A for more info:

JSON object undefined in Internet Explorer 8

Community's user avatar

answered Mar 27, 2016 at 1:27

nikib3ro's user avatar

nikib3ronikib3ro

20.3k23 gold badges120 silver badges181 bronze badges

Понравилась статья? Поделить с друзьями:
  • Ошибка json parse unexpected character
  • Ошибка kernel power код события 41 категория задачи 63
  • Ошибка kernel eventtracing как исправить
  • Ошибка json parse error unrecognized token
  • Ошибка kernel power код 41 в windows причины