jQuery/AJAX Network Error

You can see more information about the access error that is occurring by opening the Console of your web-browser’s Web Developer Tools, the following explanation is in relation to Chrome but should be similar to other “modern” web-browsers.

Because you are trying to open a “local” file Chrome will of also issued the following error in the console. (this error is what is causing the one you are seeing in the error dialog)

Access to XMLHttpRequest at ‘file:///<…file-path info…>’ from origin ‘null’ has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.

Simply put, you can’t use AJAX (XMLHttpRequest) to access “local” external files (via the “file://” protocol) in web-browser’s like Chrome.

As to why the code previously worked within the older NWJS (Node-Webkit) framework based releases of the Twine 2.x application, I would “guess” that would have something to do with either: the way the older application instantiating the framework’s built in custom HTML/web-page viewer during Test & Play modes; or maybe the version / configuration of Chromium being used by the NWJS framework version that was used to build the application.

1 Like