-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
icudt_EFIGS.dat blocked by firewall #89073
Comments
One approach is to use custom file https://www.meziantou.net/reducing-blazor-application-size-by-providing-custom-icu-data.htm#use-custom-icu-data (e.g. by downloading the prebuilt file in on your build server and pointing to it in: |
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsWe have integrated the dotnet.js Wasm runtime (.NET 8) into our existing Angular front-end app but we're having issue with the icudt_EFIGS.dat file being blocked by the firewall.
Is there a workaround for this? A way to use another extension for that file maybe?
|
I'm also having the same issue. I followed the instructions in @am11's link and created a custom icudt_EFIGS.dat file but getting the following build errors in dotnet8 preview6. The main difference between the link and my project is that mine is a pure Dotnet Wasm project created using WebAssembly Browser App template and so using Microsoft.NET.Sdk not Microsoft.NET.Sdk.BlazorWebAssembly as in the example. PS C:.....\CalcEngine.Csharp> dotnet build -c release Build FAILED. C:... \CalcEngine.csproj(13,5): error MSB4036: The "ReferenceCopyLocalPaths" task was not found. Check the following: |
@ts-indikaf The |
Does it also happen for full ICU (icudt.dat)? To switch on full ICU, add |
@maraf thanks. Build works now. We are looking for a solution similar to packaging .dll as .wasm using WebCil provided by the dotnet8. ie. Is there a way to get rid of *.dat files? @ilonatommy firewall blocks all .DAT files in my case so switching to full icudt.dat isn't a solution. |
The only other extension that ICU theoretically supports is |
@ilonatommy |
@ts-indikaf I have created a sample that uses custom extension for ICU using some of the new APIs added in .NET 8 https://github.com/maraf/dotnet-wasm-rename-icu It doesn't change the content/structure of ICU files like webcil does for assemblies, it only changes the extenion |
@maraf - Many thanks for the solution. Unfortunately, it throws the following run time error from the dotnet.js file. I'm on dotnet8 preview6 and I have installed wasm-tools as well. However, following your idea, we can temporally unblock ourselves with a manual hack but renaming the file extension is not going to be a permanent solution for us. |
@ts-indikaf Can you share a simple repro? |
@maraf here is a simple test repo https://github.com/ts-indikaf/dotnet-wasm-rename-icu I compared the two projects and the only difference I can see is that they are referencing My project created using Both projects are throwing the following error even with the correct dotnet.js path. |
@ts-indikaf Oh, sorry. In preview6 using |
@maraf yes, no problem. thanks. |
It is a quite complicated. One possible solution could be providing a single file bundle #86162, or delivering the runtime in preinitialized state (with all/some data already loaded in wasm memory). Another one could be wrapping icu the same/similar way as we do for webcil (but webcil for dlls probably helped by removing PE headers). AFAIK we don't have other reports of blocking ICU data files, because of the content |
Also, in .NET 8 the common bits of SDK and startup has been unified with Blazor and so this setup (with slight modifications) should work https://devblogs.microsoft.com/dotnet/custom-deployment-layout-for-blazor-webassembly-apps/. It would allow you to wrap icu in some envelope or bundle it together with other assets and than extract it during startup. |
This issue has been marked |
@maraf thanks for your reply. We're using pure WebAssembly, not Blazor though |
@maraf Upon the inititialisattion in our angular app dotnet.js tries to fetch all files from the filesystem. I added additional method to rewrite URLs for and fetch all files from the server |
Can you please create a simple repro to share? Is webpack involved on dotnet.js? |
This issue has been marked |
yeah we're using Angular CLI and it uses Webpack under the hood. I am creating an example repo for you. Will post the link when done |
@maraf Here's a demo repo with using Angular + Webpack to initialise the dotnet runtime environment. Note that I have to use custom webpack config to create fallbacks for node's process and module (see webpack.config.ts) When you run the app have a look in browser devtools to see that it's trying to fetch blazor.boot.json from the filesystem Also, to enable dynamic importing in dotnet.js using webpack I have to directly modify dotnet.js file to make it possible with webpack, like so [import( edited to [import(/* webpackIgnore: true / $.runtimeModuleUrl),import(/ webpackIgnore: true */ $.nativeModuleUrl)] |
You should omit dotnet files from bundling with webpack. I was investigating integration with react/webpack last year https://github.com/maraf/dotnet-wasm-react and the rest was that until we have a single file solution #86162, there isn't a good way to integrate with it, as it rewrites all imports and URLs in sources. We have this sample that bundles dotnet files with webpack, but it requires extra configuration https://github.com/dotnet/runtime/tree/d67314ee8018b27748a8d0a1f4e38172ff680599/src/mono/sample/wasm/browser-webpack We have all imports annotated in sources to be ignored by webpack, but they might get dropped when the runtime is built in release configuration. I'll investigate it runtime/src/mono/wasm/runtime/loader/run.ts Line 389 in d67314e
|
@maraf any updates on RunAOTCompilation issue as mentioned above? I get the same error with the dotnet8 RC1. I also notice that |
@ts-indikaf Sorry for late reply, I was OOF. I wasn't able to reproduce the error with Preview 7 nor RC1. Can you please share a binlog? https://github.com/dotnet/project-system-tools#getting-higher-fidelity-logs-from-vs-vs2022-onwards |
This issue has been marked |
@maraf No worries. Environment: Project configs.
dotnet publish -c release output
Binlog zip file |
This might be connected with #92335. Could you place your project in a path with no spaces? I mean |
Confirmed on windows
|
@ilonatommy @maraf yes, that was the issue. Thanks! |
I'm going to close this issue as the original topic is resolved and tracked in different issue. |
@maraf @ilonatommy Thanks for helping out with the AOT compilation issue. Original issue is half fixed though. ie. |
The runtime/src/mono/wasm/runtime/dotnet.d.ts Line 93 in 82fee26
|
@maraf thanks for your help.
|
Yes, the issue still persists |
You are missing the "root" path to start looking for ICU files in |
@maraf that's great. Thanks again. Maybe you want to update the ReadMe file per project configs, for future reference? Just a suggestion. Unfortunately, I cannot update and push it into your repo due to access restrictions. |
PR is welcome 🙂, or I'll come back to that sample later |
We have integrated the dotnet.js Wasm runtime (.NET 8) into our existing Angular front-end app but we're having issue with the icudt_EFIGS.dat file being blocked by the firewall.
Failed to load resource: the server responded with a status of 403 (forbidden)
Is there a workaround for this? A way to use another extension for that file maybe?
The text was updated successfully, but these errors were encountered: