In short, angular v12 applications work but angular v13, v14 & v15 do not.
The specific error in the console I am getting is:
Uncaught SyntaxError: Unexpected token '.' (at main.02a2f3bc139482b4.js:1:2038)
On line 2038 I notice this function:
setTimeout(fgt_sslvpn.eval_rewrite(handler), timeout, ...args)
If served locally the same line is:
setTimeout(handler, timeout, ...args)
So it seems something is failing with the fgt_sslvpn.eval_rewrite function.
I've tried turning off Ahead-of-time (AOT) compilation and other angular compiler options but to no avail.
Fortigate hardware and firmware versions:
- FGT60E
- v5.6.9 build1673 (GA)
Is there any setting in Fortigate or some other method of fixing this? Will upgrading the firmware help?
Hello dcrouch,
Thank you for using the Community Forum.
I will seek to get you an answer or help. We will reply to this thread with an update as soon as possible.
Regards,
We are going to upgrade firmware so hopefully that fixes the issue. Will post an update once its done.
Thank you!
Quick update,
So far we've managed to upgrade the firmware to version 6.0.11 but it's made it worse unfortunately. Apps using Angular v12 are now also broken, but with a different error `this.to_array` is not a function:
Angular v13+ has the same error as before `unexpected token '.':`
Hopefully going up further firmware versions will help.
We finally managed to upgrade the firmware all the way to v7.2.3 build1262
Angular 12 apps now work again and so now do version 13 apps which is good.
However, angular 14 and 15 apps are now generating this error message in the browser console:
Uncaught SyntaxError: missing ) after argument list (at main.ac22e605ec7674eb.js:1:167830)
I'm using the default angular app (in production mode) to test by the way.
Thank you for sharing these informations!
facing error "Uncaught syntaxerror : unexpected token" FortiGate firmware 7.2.8 build 1639
Traditionally this would be dealt with in the following way:
1, Try tunnel mode
2, If tunnel mode works, reach out to TAC for a likely bug report (some edge-case error with rewriting some javascript, typically)
3, Wait for the next new firmware version with fix included
With that said, webmode is now all but deprecated nowadays, so in practice if a website doesn't work in webmode, you're out of luck.
You could try switching to ZTNA reverse proxy. (that is very much fully supported)
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2024 Fortinet, Inc. All Rights Reserved.