7
votes

When debugging ExtJS 4 (tried both versions 4.1.0 and 4.1.1), FireBug repeatedly shows the following error: An invalid or illegal string was specified http://docs.sencha.com/ext-js/4-1/extjs/ext-all.js Line 18. It does not break on the error, though that option is specified. Additionally, neither my code or ext-debug.js and it's loader seem to actually call ext-all.js.

This error gets logged to Firebug's console about once per minute, which is annoying. What bothers me is that I cannot get the error to go away. Is this a FireBug bug? An ExtJS bug? Aliens? How can I debug the debugger?

2
Can you post some of your code?U and me
I'd have done that if I could determine which sections to post. I've removed just about everything but the viewport and a few Ext.panel.Panels. That is the problem -- it does not seem to be related to my code at all.justinzane
There could be some missing character in the ExtJS lib (unlikely) or in your code. Do you, by any chance, have the extjs docs open on a tab when you debug the app? Regardless, could you please close all browser windows, open in Firefox one of the examples from the extjs/examples folder and let us know if you still get the error when you debug it?Izhaki
NOTE: After installing a number of updates, including a FireFox point bump and possibly a FireBug update, I no longer get this error. * I have not changed the ExtJS code I use (reverted via git to check) nor have I changed the ExtJS libs which are served on the same development machine. *justinzane
Fyi, last time when I have my project launched in Firefox, everything works just fine. But just when I started firebug, my code halt and error spawned. Thou I can't remember what error it was, but it is definitely true that Firebug isn't that friendly to ExtJS. Try using Chrome instead.Lionel Chan

2 Answers

1
votes

I had the same problem before and I've solved it by removing a special character at the end of my JS file! (app.js I think)

It was weird, but the problem came from hidden special characters like: Zero-width non-joiner or Right-to-left mark.

Open another JS file but do not copy/paste your code there. Just write it again and check whether the problem exists or not.

And don't forget to check your data if you have some. As this article explains about the problem: http://www.ashorlivs.fr/javascript-jquery/article/an-invalid-or-illegal-string-was

0
votes

For general debugging see this link http://www.sencha.com/learn/debugging-ext-js-applications/ You can also use ext-all-dev.js while in development mode. There is another excellent tool on top of firebug, at this link http://www.illuminations-for-developers.com/

PS: I still didn't figured out how to post a comment. I guess it comes when I have more points/reputation. Hence adding it as an answer. thanks.