BlazorWebView: Uncaught SyntaxError: Identifier 'channel' has already been declared.
See original GitHub issueDescription
Running Maui Hybrid application on Android gives the following error: Uncaught SyntaxError: Identifier 'channel' has already been declared.
. On other platforms like Windows it is working fine.
Steps to Reproduce
https://gitlab.com/fairking/napos/-/tree/4-maui-spa
Version with bug
Release Candidate 3 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 9.0
Did you find any workaround?
If I refresh the page the error disappears.
Relevant log output
No response
Issue Analytics
- State:
- Created a year ago
- Comments:11 (4 by maintainers)
Top Results From Across the Web
javascript- Uncaught SyntaxError: Identifier * has already ...
I am surprised to see this output as I am expecting 10 ..because two variables declared inside the if block refer to the...
Read more >Uncaught SyntaxError: Identifier ''x" has already been ...
Hey there, I have combined some js code and suddenly my console is throwing this error: Uncaught SyntaxError: Identifier 'markers' has ...
Read more >Identifier "x" has already been declared" - Ep 11 - YouTube
JS Casts 11 - How to fix " Uncaught SyntaxError : Identifier "x" has already been declared " in JavaScript.
Read more >Uncaught SyntaxError: Identifier 'carts' has already been ...
I am very new to the world of web development. I am creating a website for a friends new business, so am attempting...
Read more >Getting "Uncaught SyntaxError: Identifier 'tl' has already ...
The issue is that I am getting "Uncaught SyntaxError: Identifier 'tl' has already been declared" error If I have multiple timelines.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks. It fixed the issue. Double checked Windows and Android version in Release mode and everything is working so far.
As a solution I have added the following lines:
You’ll need to move the
_framework/blazor.webview.js
script to be within the<body>
tag:https://gitlab.com/fairking/napos/-/blob/4-maui-spa/Napos/wwwroot/index.html#L18
and re-add the
autostart="false"
. See the blazor .net maui template here.Which call are you referring to? Is it the framework making the call, or user code?
If you believe this to be an issue in the framework, please provide a minimal (with all code not related to the issue removed), public github repository that reproduces this issue. The current repro is large and has a bunch of application specific code, so it’s hard to look into this issue without having context on the repo and it’s architecture.