-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[browser][publish] Unicode in the path are not parsed correctly in Windows for AOT/relink by emcc #83497
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsWhen we want to relink we are triggering a task that is executing emscripten like this:
The issue was discovered in #82833. The test for relink on Blazor for unicode characters
got disabled.
|
The cmd script that makes emscripten fail is encoded correctly and looks as follows:
The best way to reproduce would seem to: When we are checking if the property
just before calling
the result is We are using emscripten |
cc @radical |
I know we do some stuff to force the utf8 for some of the emscripten stuff, I wonder if this is breaking when it doesn't match other parts of the build |
The error is caused by binaryen treating utf16 chars on Windows as utf8, issue: WebAssembly/binaryen#4995. The fix is in the PR: WebAssembly/binaryen#5671. |
The error changed to:
thrown by https://github.com/dotnet/msbuild/blob/db79545e5940a69560c4885b792ef3a359f0de68/src/Tasks/AssemblyDependency/ResolveAssemblyReference.cs#L2431 Investigate in what form the string lands in |
cc @surayya-MS, @JanKrivanek looks like MsBuild issue now. It's publishing a Blazor app in path with non-Ascii chars. |
FYI @dotnet/kitten |
This issue does not repro on my machine and @ilonatommy also seem to have issue with consistent repro of the latest error as well. Returning this issue back to @ilonatommy for the time being, as we agreed. |
I have a stable repro and there are 2 problems:
I cannot reproduce the |
Can you please confirm or clarify?:
If I misunderstood please bear with me and try to specify more :-) |
Correct, neither my local machine nor Alina's was able to reproduce it. The error was hit on my own azure VM that I use for testing, I can pass accesses.
The path length issue was found by @AR-May and can be reproduced using the command from the description. I will attach the binlog that is produced when we change the blz_aot_Debug_tumnkn5b_5fc_TEST_OF_LONG_PATH-build_and_publish.zip |
About the error connected with emcc: the PR was merged just after 116 was released, so the change should be in binaryen 117 that was bumped to emcc here emscripten-core/emscripten#21451. At earliest it can get into emcc 3.1.55 and now we use 3.1.34. I was too fast with removing the |
I talked with @rainersigwald about this publishing error So, the ILStrip task is not to blame for this error. It seems that the MonoAOTCompiler is unable to produce the file due to the long path. From the log:
For the long path to work, you both need to turn it on the windows level with registry key AND have a specific entry in the application manifest, see https://learn.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=registry#enable-long-paths-in-windows-10-version-1607-and-later. This second thing could be missing. |
Thank you for help, I decided to open a separate issue for long paths: #103625. The problem is clearly connected with our mono C code and can be fixed when we track down all the places where we do not take special steps to allow long paths. This issue will be tracking progress on unicode problem and should be reviewed on emscripten bump. |
Original issue:
The problem exists only on Windows. When we want to relink or we switch on AOT in Blazor app, we are triggering a task that is executing emscripten like this:
runtime/src/mono/wasm/build/WasmApp.Native.targets
Line 475 in 99aa25f
_EmccLinkRsp
parameter contains the project name and in case this name has unicode chars in it, emscripten will parse it as "?" and will not be able to find the path:The issue was discovered in #82833. The test for relink on Blazor for unicode characters
runtime/src/mono/wasm/Wasm.Build.Tests/Blazor/BuildPublishTests.cs
Line 46 in 99aa25f
got disabled.
Current state:
see the comments below.
Reproduction:
Enable
TestDataForDefaultTemplate_WithWorkload
blocked by this issue. Run:The text was updated successfully, but these errors were encountered: