-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Docs: Fix possible NullReferenceException and Cross-Origin Request Blocked #6647
Conversation
I'm still confused as to how/why this is showing up only on iOS mobile. |
I believe that the issue you encountered might be either a coincidence or related to some problem with HttpClient on iOS. From the stack trace you provided, the exception occurred at |
It would be nice to see the console log since it's wrapped with try-catch, but I think it's not possible on iOS. |
@Mr-Technician I just got the same error on PC with Firefox which means its not iOS related, it looks like just a common problem when API is down or we get rate limited. |
For future reference, this should be possible using
This would make sense |
|
Doesn't seems that setting cors on WasmHost has any effect :( |
Ok I found a way to fix the cross origin, but I will update the PR later. I need to polish the code and I'm busy rn. |
LGTM, is it ready for merge? |
I have added a fix for the Changed the lifetime of these Clients instances from scoped to singleton to prevent injection of an HttpClient that is related to localhost. This ensures that the HttpClient instances act as singletons across the entire application and will be correctly dispose HttpClient during application shutdown. I use a similar approach at work in some of the WebAssembly projects that have multiple API clients. |
Now yes. |
👍 |
…ocked (#6647) * Docs: Fix possible NullReferenceException * Fix Cross-Origin Request Blocked
…ocked (MudBlazor#6647) * Docs: Fix possible NullReferenceException * Fix Cross-Origin Request Blocked
Description
I think this should fix the problem reported by @Mr-Technician
How Has This Been Tested?
Visual
Types of changes
Checklist:
dev
).