Get 2024 Templates Mega Bundle!19 Bootstrap HTML, Vue & React Templates + 3 Vector Sets
Get for 99$

Uncaught SyntaxError: Unexpected token


When i run the web page on Chrome or firefox it work. But when i load the page on flutter using webview_flutter or flutter_inappwebview plugin, it prompt as below

I/chromium(23729): [INFO:CONSOLE(24)] "Uncaught SyntaxError: Unexpected token .", source: plugins.bundle.js


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (5)


Hi,

Could you please debug if the required JS files are being loaded in the proper order as per the original HTML version?

Regards.



Yes. All required JS files are being loaded.
I have tested using the sample file provide by metronic. it prompt the below message.

messageLevel: 3, message: Uncaught SyntaxError: Unexpected token .
messageLevel: 3, message: Uncaught ReferenceError: jQuery is not defined
messageLevel: 3, message: Uncaught ReferenceError: bootstrap is not defined
messageLevel: 3, message: Uncaught ReferenceError: ApexCharts is not defined
messageLevel: 3, message: Uncaught ReferenceError: FormValidation is not defined



Hi,

It seems your assets(js scripts) are not properly loaded.
Can you please provide us with your test URL in a private reply so we can check it online and inspect your code?

Regards.



Hi,

you may test using the url below. Beside, it work on firefox and google chrome. but not at flutter web browser plugin.

http://sgbunus.selfip.com/metronic_html_v8.2.4_demo62/demo62/authentication/layouts/corporate/sign-in.html



Hi,

Oh, flutter has a slightly different environment setting a security policy. Could you please check it among the Flutter community? It looks like a common flutter issue, not Metronic's issue.

We never worked with Flutter and our products are usually not tested in a Flutter environment due to a lack of demand.

Regards.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(