Obfuscation failed + on new blank project

When I try to build any of my apps for Voltbuilder or Deploy to browser I get the error:

“Obfuscation failed, most likely due to a syntax error in your code.”

I tried it again with a new blank Project and still get the same error.

AppStudio Error log:

2020-12-16 22:04:12,323 - asyncio - ERROR - Exception in callback _ProactorBasePipeTransport._call_connection_lost(None)

Traceback (most recent call last):
  File "asyncio\events.py", line 81, in _run
  File "asyncio\proactor_events.py", line 162, in _call_connection_lost
ConnectionResetError: [WinError 10054] An existing connection was forcibly closed by the remote host

I’m using AppStudio 8.4.2.0

We updated the library for this in 8.4.2, so we had to make some changes. They tested well here (and still do).

Are you on MacOS or Windows? Can you try doing a complete uninstall and reinstall?

Also, what setting are you using for obfuscation?

I get the same error no-matter which setting I select.

The only time I don’t get the error is if I select None.

I’m using it on Windows 10.

If I uninstall can you send me the link to download again?

You can get it from the Downloads page:

https://www.appstudio.dev/app/downloads/

I uninstalled the AppStudio and re-installed it and it seems ok in the browser, I haven’t tried Voltbuilder yet or all my other apps but it seems ok for now.

I only use obfuscation setting “medium” as generally any higher it sometimes breaks the app.

Thank you for your assistance.

There still must be been references to the old library in your installation. Thanks for the good news.

Hello,

This issue seems to be back, I can’t obfuscate my code (setting min/medium/max). Completelly removed the previous version and reinstalled 8.5.0.1. It complains about syntax error, but the app runs fine on Chrome without any warnings. Nothing related to obfuscation shows up in the log either.

[Edit] I commented out the Global code window and every form code window, code files… everything. The generated code.js now only contains “use strict;” and a bunch of commented code. I still get the obfuscation error message, but there is no more code to obfuscate…

Any suggestions?

Thanks!

I just tried it here on a random project and it seemed to work OK.

Any chance you can share your project with me? Zip it and send it directly.

I ended up figuring out the syntax error that was not being triggered when the program was being run and then obfuscation worked. There was one weird behavior, though. Once the error was triggered, even commenting the entire code would still trigger it. I had to close and reopen AppStudio so it could work again.

Is this reproducable?

Yes and it also happens with 8.1.5.1. I sent the zipped sample over email. Steps to reproduce:

uncomment the line with the static declaration in class Foo (it is a syntax error, since static only allows methods, not properties, but it won’t prevent the program from running).

run with any obfuscation -> error will pop up

comment again the line, save and run, error still there until AppStudio is reopened.

When did you send the email? I can’t find it here.

Thanks for sending the file.

This is a known issue with the obfuscation library we use. The static keyword does not work in a class.

Until they fix it, there isn’t much we can do. Can you work around this?

Thanks, I did already. It is working now and my only observation was the need to close and reopen AppStudio to remove the obfuscation error, even after fixing the code.