Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"FILE_NOT_FOUND" Error in all browsers #4

Closed
PiggyWhiskey opened this issue Nov 8, 2016 · 3 comments
Closed

"FILE_NOT_FOUND" Error in all browsers #4

PiggyWhiskey opened this issue Nov 8, 2016 · 3 comments
Assignees
Labels

Comments

@PiggyWhiskey
Copy link

Using Factorio 0.14.19
Mod version 0.7.2

Settings:
Day,
Show Entity
Folder Name : "BobsMods"
Size: -1024x-1024 to 1024x1024
jpeg
Medium grid size.

Generated 5461 images for 256 MB.

Opening in any browser and works fine, but the moment I drag or zoom, it crashes with "FILE_NOT_FOUND"

Testing in Chrome,Firefox,Internet Explorer,Edge.

Any advice?

@PiggyWhiskey
Copy link
Author

Discovered the issue.

The local URL was "E:\Program Files\steam\steamapps\common\factorio\script-output\FactorioMaps\BobsMods"

The space in Program Files is causing the problem.

Running directly from "E:\BobsMods" works perfectly.

@RossBarnie
Copy link

RossBarnie commented Mar 5, 2017

Came across this too. For whatever reason when you zoom or move, the URL changes any spaces to %2520 rather than %20, so the file couldn't be found as it's not looking in the correct directory.

EDIT: Found the offending line: https://github.com/credomane/FactorioMods_FactorioMaps/blob/master/fm/generateIndex.lua#L67. Does the url need to be encoded here? If the index is in a folder containing a space character and I open it in a browser, the spaces are encoded as %20 already, so encoding it again, according to this http:https://stackoverflow.com/questions/16084935/a-html-space-is-showing-as-2520-instead-of-20, causes the %20 to then be encoded. %25 is the % character and 20 doesn't need to be encoded. So the generated URL would be looking for "path/to/broken/folder/broken%20copy/index.html" on your file system.

@credomane
Copy link
Owner

Sorry for the long wait. Life had me torn away from Factorio for the past 6ish months. I'm sorta/mostly back!

Most of the index.html code is left overs from the original author of this mod. The mod isn't generating or getting the URI from the user but is updating the already valid one thereby rendering the use of encodeURI moot. I don't know why encodeURI would be needed at all. I'll fix this up plus the other issues inside the index.html generating code and give the whole generateIndex.lua a good once over sometime this week.

@credomane credomane self-assigned this Apr 19, 2017
@credomane credomane added the bug label Apr 19, 2017
credomane pushed a commit that referenced this issue May 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants