Updated from Metronic 7.0.4 Angular 9.1.3 to Metronic 8.1..4 Angular 14.0.0.
App works fine on windows PC. on IOS, safari & chrome - app will not open - unexpected eof on polyfills. promisReactionJob
Thank you
Chris
Please provide a link to a minimal reproduction of the bug
Will not load app on IOS Angular 14.0.0
Works on IOS compiled with Angular 9.1.3
Please provide the exception or error you saw
Browse console.
main.5659117c88ca3009.js:2 ERROR SyntaxError: JSON Parse error: Unexpected EOF
polyfills.7fca551addd8edc8.js:2 SyntaxError: JSON Parse error: Unexpected EOF
The core problem, Chris, appears to be a JavaScript parsing failure in older versions of iOS Safari/Chrome following your update to Angular 14. The "Unexpected EOF" error often happens when the browser encounters truncated or improperly served JS files, or when the built code contains modern syntax it doesn't recognize despite polyfills. To resolve this, you need to ensure your Angular build environment is configured to properly transpile code for your target iOS versions by carefully reviewing and updating the browserslist file in your project.
Glad you have resolved it.
Thanks
Hi thank you for the reply. Earlier I did as you suggested. I found the default Metronic Angular app worked fine. After many hours of testing, I find the code with a problem in my layout-config.service.
This line fails in IOS
return JSON.parse("")
I changed it to the command below and works fine now.
return JSON.parse('{}')
Thank you
Hi Chris
Have you made any modifications to the Angular code? Could you please try to do the tests using the default Metronic Angular app if this issue still happens?
Thanks