-
-
Notifications
You must be signed in to change notification settings - Fork 534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Got "SyntaxError Unexpected token" trying run MAUI app on Android #3203
Comments
I also see this regularly in a production server side app but can't determine if it's actually hurting users
Version 0.9.5.2 Bootstrap 4 |
Possibly related:
Just feels similar to the above issue as it all has to do with the component Module initialization javascript. I see this less though. Not sure where to look to either initialize things better for the page or investigate what's going wrong (if anything) |
Another found happening. I'm on 0.9.5.4 now, Blazor server. I was guessing this has something to do with other javascript errors maybe happening then causing the scripts for Blazorise to not load. Still can't narrow down. Occasionally happens with my custom controls but since Blazorise is the most heavily used, it has the most errors. Like I've said, I can't tell if this is actually hurting anything (like the JSDisconnected exceptions not being a real issue). This kind of stuff happens <1-2% of the time looking at traffic. However, still quite noisey.
|
@adamhathcock That might be related to an unsupported browser. Maybe it doesn't fully support some of the ES6 features and it fails to parse. Do you have logs of what browser might be problematic? |
@stsrki I don't have logs that associate any browsers to errors but that's something to investigate. The noise is definitely proportional to traffic but a tiny percentage. I wish I could better hook into this error pipeline on CircuitHost but it's not exposed. I'm guessing these are errors I don't care if browsers don't support the javascript. Looking at traffic, most browsers are recent desktop and mobile ones. Of course, "other" is nearly 25% 🙄 I'm having to blanket ignore JSExceptions as I can't filter better than that. There might be nothing for anyone to do here. |
The least we could do is to not use some of the newest JS features, like the Nullish coalescing operator for example. But as you already said, not sure if it's worth it considering that it is just a fraction of browsers not supporting new features. |
I guess it depends on how new these features are. If they're years old then not a big deal. Unfortunately, these are managed and polyfilled for browsers. I'm not primarily front end so I'm unfamiliar with what browsers support what features. If the JS could be make simplier then that might help. However, there will always be this problem and I wish there was a better way to manage it. I guess that's a Blazor platform thing. |
We all want to work with the latest tech. Somewhere the line must be drawn, I guess. |
Seems like someone came to the same conclusion about the javascript: https://mikaberglund.com/javascript-interop-error-in-blazor-jsexception-unexpected-token/ |
Should be fixed with #3336 and will be available with 0.9.5.5. If the error still persists please open a new ticket. |
thank you! |
Debug output:
MAUI preview, latest VS2022 preview
The text was updated successfully, but these errors were encountered: