Error Your browser does not allow to read local files.

oaksweetz

Warper
Member
Joined
Nov 5, 2015
Messages
1
Reaction score
0
First Language
English
Error
Your browser does not allow to read local files.

RMMZ
I goto File->Deployment...-> Select Redio button Web Browser/Android/IOS.
and Choot Exclued unused files and select ouput location and Click ok.

- I use this deployment folder Delopy to IIS, Browser with chorme browser Is show Gif Loop Load data.
- I Doble click index.html in folder open with chorme browser show text "Error Your browser does not allow to read local files."


Please help me
Thank you.
 

Attachments

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,756
Reaction score
7,862
First Language
German
Primarily Uses
RMMV
the error message tells you exactly what the problem is - and it has absolutely nothing to do with the RPG Maker.

You set your browser security settings to never open local files - which makes sense if all you're doing is surfing on the web, because no website should have access to your local files (that would be the sign of a malware or infected website).

However it causes problems when developing local HTML5-based games, because then you want to open the local files of your game (and from the game, you aren't on the web in that moment).

So basically you have to go to your browsers security settings and change them to allow local programs to access local files.
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,599
Reaction score
1,506
First Language
English
Primarily Uses
RMMV
Please don't mess with your browser's security settings just to test your game out locally. Those settings (in firefox, anyway, not sure about the others) are restrictive when dealing with local files for good reasons. You really don't want potentially malicious code (not your game obviously, but other things like corrupted websites) to be able to read local files on your machine.

Instead, either deploy to a remote test server or get yourself a web server app. There's several free, lightweight ones floating around.
 

RilDev

Warper
Member
Joined
Nov 6, 2020
Messages
2
Reaction score
3
First Language
JavaScript
Primarily Uses
RMMZ
Me I use a command line tool called http-server.

You simply have to download NodeJS https://nodejs.org/ and then navigation to the folder of your web game in the command line. There you type "npx http-server" and open your browser at "localhost:8080" (or whatever address the command line shows you).

Hope it helps!
 

Aesica

undefined
Veteran
Joined
May 12, 2018
Messages
1,599
Reaction score
1,506
First Language
English
Primarily Uses
RMMV
I was going to suggest Mongoose Web Server, but at the time of writing that, the download website was acting a bit weird (expired certificate, probably)
 

Capitán

kind of a big deal
Veteran
Joined
Jul 9, 2013
Messages
572
Reaction score
145
First Language
Engilsh
Primarily Uses
RMMV
While @Aesica 's concern is well-founded, if you're only attempting to test your project then it should be no big concern. By the looks of things you're using google chrome, I recommend copying your browser shortcut on your desktop and adding some security flags into the location path,

1604633045700.png
1604633128422.png
1604633220339.png
Add "--allow-file-access-from-files" to the end of target

Once you've followed those steps everytime you open that shortcut you're allowing access to your local files, so NEVER use that shortcut for web browsing only to test your project. Once you open that up you can simply drag the "index.html" to the browser and begin testing your game.

However, if you don't trust yourself to be able to simply not browse with that shortcut, just use a web server :)
 

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

Latest Threads

Latest Profile Posts

The second draft of my script is almost done, and I don't think I'm going to write a third draft. I'll make changes to dialogue here and there, but I'm happy with the series of events the way they are.
How you feel about font and dialogue box changing for every main character while the minor cast and regular npc get their own styles? Too much?
Just found an obviously custom effect (i.e. edited by me) in my resources>sounds folder called "rip jaw off". Dear Lord what is wrong with me as a person that at some point I needed a sound *specifically* for THAT??
(...rhetorical question.)
so like with the whole 'familiarity breeds contempt thingy', how are you supposed to tell if your title screen/battle music gets really tedious after a few dozen plays or if you're just personally hella sick of it?

Forum statistics

Threads
107,521
Messages
1,030,240
Members
139,647
Latest member
JesuProYT
Top