Troubleshooting index.html + EULA


I’m trying to add an EULA for an app being build as a native Android app using VoltBuilder. I can get a very basic EULA up and working, but any HTML of reasonable complexity seems to give an error at runtime: index.html Uncaught SyntaxError: Unexpected identifier. Line 313 column 942.

  • I can replicate the problem with both my custom EULA html, as well as the EULA html provided in the sample project (error line is the same, column is different).
  • I’ve done some hack and slash through my custom EULA html, and can’t find anything to suspicious. It lints as well-formed. It seems to happen once I exceed a single
  • item, but that could be a complete red herring.
  • The EULA.html file in the properties folder renders properly in Chrome, just not in the app.

I can’t seem to figure out how to view my index.html file to continue troubleshooting. Any advice would be appreciated.


What does it say in the chrome console in a normal web browser? Next, what characters are at/near/just after that position? What JavaScript are you using?

Chrime console just gives an approximately equivalent error, see image below.

Without being able to see index.html it’s tough to tell what characters are near that position. The EULA doesn’t have that many lines. Assuming that line in index.html is just injecting the EULA html text as one big string into the DOM, here’s the nearby text when using the EULA sample project:

…INSTALL: {INSERT COMPANY NAME’s } End-User License Agreement (“EULA”) is a legal agreement…

I tried a small toy example with both brackets and double quotes which works fine in both desktop chrome as well as building as a native app.

The project I’m working on is using BASIC, not JavaScript.

Any thoughts on how to view index.html directly?

Is this a pure text file? No special characters? As in you pasted the EULA into notepad and then copied it from notepad and pasted it into AppStudio?

I thought of that too, but it doesn’t seem to be the case. I’m on a Mac, so I was using TextEdit, and I was sure to “convert to plain text”.

I couldn’t find a “paste as plain text” option in AppStudio, so to bypass potential conversion / encoding issues, I also tried it by copying directly from the AppStudio EULA sample property field, opening my project, and pasting directly in. No luck.

For what it’s worth, my EULA sample doesn’t work either…

I’m using AppStudio for Mac FWIW.

OK, I think I figured out enough to go on with this by inspecting the page source in chrome.

Looks like multi-line EULA text is what is breaking. Here’s the lines in index.html that are generated when I enter a simple message with no newlines:

And is displays fine.

When I add a newline, this is generated, and does not display at all, causing the error:

I’m certainly not an expert, but I think multi-line strings in ES6 are supposed to use backticks, not single quotes, so perhaps this is an easy fix. For now, I just scrubbed all the newlines using an external editor and replaced single quotes in the string with ' and I got it to work.

1 Like

Thanks - your explanation makes sense. I’ll open an issue here.

1 Like

Just curious if this issue is going to be resolved soon. I’m running and the EULA sample project still doesn’t work.

I could get the EULA sample to work if I put all of the HTML on one line and limited the amount of HTML (was able to get it to work up to “2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.”)



Let me check on that one…

When I put the HTML into notepad and save it as “htm” then open in a browser it looks fine.

Looks like this one is fixed in the next build, coming soon. There’s a another fix we want to get into it before we release it.

Fixed in, released today.

Confirmed. Works great!