Script error in Firefox


#1

Not an actual ChoiceScript Error, this is Firefox 15 itself coming up with just “Script error” during testing, either locally or when using such as Dropbox. That message is then followed by a checkbox option to “Prevent this page from creating additional dialogues”, which when selected does at least allow testing to continue . . . usually just until the next *choice option is reached.

The problem is that I’m getting this constantly and it’s a real annoyance; there’s no explanation on what the error is and I can find little of use on the web to explain it or fix it.

I know how to get to the Firefox settings screen so if anyone knows which setting would disable this particular error message, I’d be very grateful. If not, I may have to go back to using IE . . . urgh.


FireFox not working to test game?
#2

I can’t remember how to get it up for firefox specifically but there is usually a console or debugger in modern browser, that’ll hopefully give you more information such as the file and line number that’s causing the error. Try to Google fire fox java script debugging.


#3

Upon further investigation, it seems that “Script error” might not be an actual error as such and is actually intentional, when something in JavaScript falls foul of the “Same origin policy”–

Curiously, it seems it only applies to FF, Chrome and Safari, which explains why I never have this problem in IE. Indeed, I first switched from Firefox 10 to IE 8, back in January, because of this problem, but it still seems to plague me with the latest version.

Bearing in mind that I currently use no custom JavaScript for Vendetta at all (not even so much as an extra Stats button!), I’m at a loss to understand why I seem to be the only one suffering this problem, as no one else has reported it.

Oh well, back to IE. :frowning:


#4

Even my game has no problems with fire fox, I’ll have a closer look for you when I get home, if you’ve yet to solve it.


#5

I’ve wasted far too many hours on this as it is so I’d caution you against doing the same, but you might have more luck finding an answer–or perhaps a better idea of where to look for one!–so I’d appreciate anything you might come up with. Thanks.


#6

Could you please PM me a link to the version of the game it’s happening on?
http://dl.dropbox.com/u/82562041/web/vendetta1/index.html is working fine for me.

EDIT: No luck replicating the error, it seems firefox is a little more sensitive to javascript problems than IE or Chrome and pops that box up for the smallest things, while I do think it needs to be sorted (considering the original demo works fine, it must be something we can fix), you can turn it off by doing the following:

  1. Type ‘about:config’ into Firefox’s address bar
  2. Accept that you know what you’re doing/Clear the Warning
  3. Search for the word ‘script’ in the search filter on the next page
  4. Double click the “dom.max_script_run_time.” field and change it’s value to “0”
  • This sets the delay between firefox alerting you of a script error, setting it to zero will prevent the alert.

Step by step guide: http://www.ehow.com/how_6011323_disable-runtime-errors-firefox-browser.html

Hope that helps :slight_smile:

Just don’t forget to turn this back on at some point, or it’ll cause headaches later…


#7

@Vendetta Any luck?


#8

Nope, no luck at all. I also tried changing the strict_origin_policy to false, since that’s what it seemed to be tripping over. No such luck there either–“Script error” pops up on virtually every *choice click regardless, but actually still runs fine if the error is just ignored. It doesn’t actually cause any slow-down problems or anything like that, which is the most confusing thing as I would’ve expected something along those lines when ignoring script errors . . .

In IE it runs without any problem at all, and no Script errors.

Anyway, thanks for your help, best we not waste any more time on this (I don’t have too many hairs remaining on my head as it is!). I’ll finish the testing in blissfully error-free IE this weekend, stick it online, and see who else–if anyone–has a problem playing the new Demo version in FF. Hopefully it’s just something to do with my setup here. If not . . . (urgh, doesn’t bear thinking about).


#9

@Vendetta If not, I’ll try and replicate the error and help you solve it, I’m interested in what it could be, it’s no trouble :slight_smile:


#10

@Vendetta, I just did an update to my game this morning…it was working fine before, but now after the update I get “script error” when testing in FireFox, both locally and through my drop-box link. Did either you or @CJW find some sort of fix for this?


#11

@wolfwriter20 Sorry to say, no. I’m back to using IE for testing purposes. @CJW reports that the game worked fine on dropbox, and no one else has reported the same error using Firefox for my game, but I still get it when testing locally or on dropbox – usually when I try to change any *choice #option from the default one.

If you do ever figure it out, please post again. That one annoying problem aside, I do still much prefer FF to IE.


#12

@Vendetta

As do I…I don’t like IE very much at all, actually. I am going to try and restore previous versions on my computer to make sure it wasn’t something I did. After that, well, I guess I will just have to see what I try next. I will definitely post here if I have any luck.


#13

@wolfwriter20 My current pet theory on the subject (ridiculous though it may sound!) is that very heavy use of FF for testing purposes corrupts something within the browser settings – i.e. it’s not game-related at all. To my way of looking at it, nothing else would explain why ordinary players using FF don’t also have the same problem playing it on dropbox . . . Ergo: if it’s not the game, it must be my browser! :smiley:


#14

@Vendetta, I suppose its possible, I’ve just never heard of such a thing. Who knows, though? :-?

My problem has been located, thanks to Reaperoa…turns out I made a variable in mygame.js that started with a number, which turns out is a no-no. Changed the variable name, no more script error. I knew that I had to have done something to break my game though, because it wasn’t even working in IE, and if internet explorer doesn’t like it, well that’s just sad.


#15

Solution Update: a kindly soul pointed me in the right direction. Many thanks. :slight_smile:

My almost-one-year-long “Script error” struggle when using Firefox was down to a particular plug-in: Kaspersky’s “Virtual Keyboard” security extension. The other two default Kaspersky security extensions are fine, however.

For Chrome users, note that certain extensions can also cause an inexplicable “Script error” when running a ChoiceScript game, so if you ever see this particular error with either browser it’s most likely down to one of your most recent added extensions.

Amen!


#16

Thanks for the share!
Glad you found it (eventually).