NS_ERROR_NOT_AVAILABLE in HTML5-version

Deklaration

Villager
Member
Joined
Jul 23, 2013
Messages
10
Reaction score
5
First Language
Swedish
Hi!

Finished my game and I can get it to work on iPhone, Android and regular Mac/Windows, but I haven't been so lucky with browser.

I've uploaded the files, but when I try to play the game I get an error.

On Chrome, I get:

InvalidStateError 

Failed to execute 'drawImage' on 'CanvasRenderingContext2D': The HTMLImageElement provided is in the 'broken' state.

And on Firefox, I get:

UnknownError
[Exception... "Component is not available" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: https://dl.dropboxusercontent.com/u/31246357/js/rpg_core.js :: Graphics._paintUpperCanvas :: line 1833" data: no]

The Firefox error window points me to line 1833 in the rpg_core file. That line says "context.drawImage(this._loadingImage, dx, dy);"

I've tried reading about the Chrome error and it pointed me to these lines in pixi:      

// new Image() breaks tex loading in some versions of Chrome.

        // See https://code.google.com/p/chromium/issues/detail?id=238071

        var image = new Image();//document.createElement('img');

        if (crossorigin)

        {

            image.crossOrigin = '';

        }

 

The problem is that I have no idea what the actual problem is. I guess the "document" line is wrong, or that the images isn't loaded when the game boots up. But I really have no idea. 

This could be an easy fix, I don't know, but I would really appreciate all the help I can get. 

 

Thank you so much!  :D

 

Also, this problem might not be related to "javascript/plugin support", but I figured the thread was best fitted here. 
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,695
Reaction score
924
First Language
English
Primarily Uses
N/A
Sorry, are you trying to host the game from Dropbox? That probably isn't the best idea for a Web game, or any website at all. Try hosting your files on an actual webhost.
 

Deklaration

Villager
Member
Joined
Jul 23, 2013
Messages
10
Reaction score
5
First Language
Swedish
Though it woud be easiest like that. I'll try the other way around, thanks! 

Is that what's causing the issue?
 
Last edited by a moderator:

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,695
Reaction score
924
First Language
English
Primarily Uses
N/A
It could be, I suppose. It seems that the game is using canvas mode, and that it's trying to draw something and its not properly set up, so the game crashes. I'm really not sure what Dropbox would have done to break it, but given how it works ever where else and you're hosting the web version through unconventional means, that'd be a good place to start looking for answers.
 

Deklaration

Villager
Member
Joined
Jul 23, 2013
Messages
10
Reaction score
5
First Language
Swedish
Thank you. And thanks for the fast answer!  :rock-left:   ;)
 

Zalerinian

Jack of all Errors
Veteran
Joined
Dec 17, 2012
Messages
4,695
Reaction score
924
First Language
English
Primarily Uses
N/A
Just to double check, did that happen to be the answer?
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

A wave of cold air has hit Canada... I know it's "always cold", but this one is especially cold... I'm freezing to death lol.
Have fun with English: a "fire grenade" is not portable napalm but a fire extinguisher tool.
2 days ago someone tried to convert me to Islam. Today youtube tried to convert me to Catholicism. The only thing left would be to meet sone Jehova's witnesses.
I just successfully tested changing music by region, and changing it between continents on the world map after getting on/off the airship. I had to override the default audio transitions with eventing to make it change smoothly but it worked.
Stream will be going live shortly with some more Witcher 3, then we will switch to another game! Feel free to drop by~

Forum statistics

Threads
93,419
Messages
912,206
Members
122,926
Latest member
JoetSmith
Top