Re: [melonjs:3205] NS_ERROR_DOM_BAD_URI: Access to restricted URI denied

3,604 views
Skip to first unread message
Message has been deleted

Aaron McLeod

unread,
Mar 21, 2013, 9:21:42 AM3/21/13
to mel...@googlegroups.com
Are you running it on a web server? Might be because the browser denying a local request via ajax. I often run into JS issues if i just open the file:/// path rather then run it on localhost. 

On Thu, Mar 21, 2013 at 9:15 AM, <nechi.s...@gmail.com> wrote:
I work yesterday but today, It always show NS_ERROR_DOM_BAD_URI: Access to restricted URI denied.

Test Another Melonjs project and it still work.

  • Windows 8 / Firefox 19.0.2
  • melonJS version 0.9.6
Bug show as
"
NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
xmlhttp.send(null);
"

Thank you very much.

--
You received this message because you are subscribed to the Google Groups "melonJS - A lightweight HTML5 game engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email to melonjs+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Aaron McLeod
http://agmprojects.com

Nechigawara

unread,
Mar 21, 2013, 9:37:31 AM3/21/13
to melonJS - A lightweight HTML5 game engine
Please Ignore this question. Found A solution now. I forgot to remove
deleted resource from g_resources.

Just wonder it show error like this, not something like "xxx not
found" as always.

Anyway, Thank You Very Much.

On 21 มี.ค., 20:21, Aaron McLeod <sircoolgu...@gmail.com> wrote:
> Are you running it on a web server? Might be because the browser denying a
> local request via ajax. I often run into JS issues if i just open the
> file:/// path rather then run it on localhost.
>
>
>
>
>
>
>
>
>
> On Thu, Mar 21, 2013 at 9:15 AM, <nechi.sanze...@gmail.com> wrote:
> > I work yesterday but today, It always show NS_ERROR_DOM_BAD_URI: Access
> > to restricted URI denied.
>
> > Test Another Melonjs project and it still work.
>
> >    - Windows 8 / Firefox 19.0.2
> >    - melonJS version 0.9.6
>
> > Bug show as
> > "
> > NS_ERROR_DOM_BAD_URI: Access to restricted URI denied
>

Jason Oster

unread,
Mar 21, 2013, 3:55:41 PM3/21/13
to mel...@googlegroups.com, nechi.s...@gmail.com
The file:/// paths do not go over HTTP, so it will not provide standard HTTP error codes like "404 not found". Local file access in browsers is very poor, as well. You have to deal with overly strict same-origin policies unless you explicitly disable it. Then there's also a lot of issues loading audio files without a feature-complete HTTP server.

Much easier to use a local HTTP server. It takes about 30 seconds to install nginx on Ubuntu and OS X (with homebrew)

Aaron McLeod

unread,
Mar 21, 2013, 4:00:06 PM3/21/13
to mel...@googlegroups.com, nechi.s...@gmail.com
Yup exactly. I use middleman generally for melonjs. I also have this: https://gist.github.com/agmcleod/4945478 which runs a nodejs simple http server. No idea how well it runs audio files though.

OS X has apache installed on it by default. It's mostly straight forward to get going. Have to turn web sharing on, and drop folders in ~/Sites. Then it's a matter of going to localhost/~username/Sitename


For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply all
Reply to author
Forward
0 new messages