[HTML5] "Errors" in empty project on Edge

I’m not at all familiar with HTML5, but I’m trying to run a basic example:

public function new() 
	var tf = new TextField();
	tf.defaultTextFormat = new TextFormat("Arial", 20, 0x0);
	tf.text = Assets.getText("assets/test.css");

When I compile from FD, the local host browser tab opens, and the CSS shows up in the TextField, but I get hundreds of SCRIPT7002: XMLHttpRequest: Network Error 0x5, Access is denied. errors in the F12 menu. I’m not sure what access is denied because I successfully got the contents of the text file. This is in the Edge browser, and I already have “localhost loopback” enabled.

Q1: Does this have a solution? I can’t really ignore it when it prevents me from seeing unique debug output.

Q2: How do you stop the local server? I have to exit FD and recompile each time to see my changes.

Edit: latest OpenFLime

I would recommend openfl test html5 in a command prompt, then you can Ctrl+C to cancel and do another build. The HTML server in FlashDevelop does not prevent file caching, and I have had other problems

That answers Q2, but I’m getting a mix of Access Denied and XMLHttpRequest: Network Error 0x3, The system cannot find the path specified. errors in debug mode, despite getText() giving me the correct text. Nothing shows up in release mode.

Upon further testing, I get the errors even in an empty OpenFL project, but only in debug mode. Release works as expected. I must have had caching issues that prevented me from pinpointing the problem earlier.

I’m not aware of any real difference between debug and release builds, the asset system should still work the same, unless your project XML doesn’t include files under release?

Nah, this is happening now in a completely empty OpenFL project. No assets, no if="html5" or if="release" tags or anything like that, nothing but class Main extends Sprite.


So this error occurs only on HTML5, and specifically with Assets.getText, or with other asset types, or when loading no asset files?

Sorry, I wasn’t clear. It doesn’t seem like it has to do with getText() anymore. It’s showing the errors with an empty Main.hx and nothing but the essentials in project.xml. On Edge browser.

import openfl.display.Sprite;
class Main extends Sprite {
	public function new() {
<?xml version="1.0" encoding="utf-8"?>
	<!-- NMML reference: https://gist.github.com/1763850 -->
	<!-- metadata, make sure 'package' is at least 3 segments (ie. com.mycompany.myproject) -->
	<meta title="OpenFLTesting" package="OpenFLTesting" version="1.0.0" company="" />
	<!-- output -->
	<app main="Main" file="OpenFLTesting" path="bin" />
	<window background="#ffffff" fps="60" />
	<window width="512" height="288" unless="mobile" />
	<window orientation="landscape" vsync="false" antialiasing="0" if="cpp" />
	<!-- classpath, haxe libs -->
	<source path="src" />
	<haxelib name="openfl" />

Are you using openfl test html5 to test your project, or are you serving it using a different host?

Does this occur in other browsers?

I’m using that command to test. I only get the errors on Edge, not in IE or Chrome.

Okay, I’ll try and take a look

I am not getting this problem, what version of Windows are you running? What directory are you using for your test project? Are you using in the address bar, or a different address?

Windows 10 1703 15063.483
Project directory: C:\Users\Nick\Documents\Projects\Haxe\OpenFLTesting
Export directory is specified as bin, so the bin, haxe, and obj output folders show up in \bin\html5
openfl test html5 -debug opens I press F12 any point after it loads to get to the console, after which I get the couple hundred errors.