Error Your browser does not allow to read local files.

Status
Not open for further replies.

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

  • Your browser does not allow to read local files.JPG
    Your browser does not allow to read local files.JPG
    76.7 KB · Views: 24

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
35,806
Reaction score
9,465
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,879
Reaction score
1,823
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
4
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,879
Reaction score
1,823
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
588
Reaction score
161
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 :)
 

owokambo

Warper
Member
Joined
Jan 20, 2022
Messages
1
Reaction score
0
First Language
English
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!
I tried this method yesterday and it worked but now it doesn't. It says either "Failed to initialize graphics" or "Your browser does not allow to read local files." or opens to this weird white screen. Not sure what I did wrong.
 

Attachments

  • Screen Shot 2022-01-20 at 10.01.23 AM.png
    Screen Shot 2022-01-20 at 10.01.23 AM.png
    33.6 KB · Views: 1
  • Screen Shot 2022-01-20 at 10.01.59 AM.png
    Screen Shot 2022-01-20 at 10.01.59 AM.png
    41.6 KB · Views: 1

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,639
Reaction score
6,147
First Language
Dutch
Primarily Uses
RMXP

@owokambo, please refrain from necro-posting in a thread. Necro-posting is posting in a thread that has not had posting activity in over 30 days. You can review our forum rules here. Thank you.


Please make a new thread instead.
 
Status
Not open for further replies.

Latest Threads

Latest Profile Posts

hmmm. an art of mine was removed from reddit, for a reason not even listed.
Going to try my luck with Rust programming language. C++ is just way too gosh darn frustrating.

Forum statistics

Threads
121,887
Messages
1,144,911
Members
160,137
Latest member
Shiresu
Top