Open ElderJames opened 3 years ago
@fingers10
I could not reproduce the error that you said.😥
I upgraded Microsoft.AspNetCore.Components.WebAssembly
and Microsoft.AspNetCore.Components.WebAssembly.DevServer
to 6.0.6 on my some Blazor WebAssembly app projects and re-published them, but all of them resulted in success.
Please attach the project that you could reproduce this problem. Please remember that most of the time for resolving an issue is spent reproducing the problem behavior. If you attached the project that can reproduce the problem, I could get started to improve or fix this package immediately.
Thank you for your great cooperation! 👍
@jsakamoto I'm sorry. This looks like a dotnet sdk issue. There is an active issue in dotnet sdk repo for this.
@jsakamoto , I would like to understand more on flickering effect that occurs when prerendered site is loaded. Please can you assist me on this.
I have this repo - https://github.com/fingers10/WasmServerPrerender published to GitHub Pages using the below URL.
Here is the sample URL that I'm using for testing - https://fingers10.github.io/WasmServerPrerender/fetchdata
Steps I followed,
index.html
in wwwroot
loads and the actual page loads. Is this the expected behavior?index.html
in wwwroot
loads and the actual page loads. Is this the expected behavior?Here is the video showing the same.
Thank you for your support and teaching.
@fingers10 Thank you for informing me about that behavior with the very understandable report! I immediately understood this problem due to your detailed description and a short video.👍
Anyway, as far as I can see, that behavior you reported is not an expected one for me. It looks very weird.
Unfortunately, I don't have enough time to investigate this issue right now, but I'll do it later as soon as I have enough time. (I'm not sure, but this weird behavior might involve a service worker.)
By the way, this issue #2 thread is unsuitable for discussing your reported issue. So I created new issue #17. If I have any progress, I'll report it in the issue #17 thread.
Sorry, I've been trying to use Prerendering build again recently and have failed. This is my branch that has solved the problem you mentioned above.
https://github.com/ant-design-blazor/ant-design-blazor/tree/chore/prerender-build
@ElderJames Thank you for getting touch with me. I'll look into that later.
@ElderJames I sent a pull request to make the "AntDesign.Docs.Wasm" be able to pre-render with the "BlazorWasmPreRendering.Build" NuGet package.
@jsakamoto Thank you for your generous help! I'll keep working to get it deployed online.
@jsakamoto whenever I publish and prerender and host in my local IIS, i get the following error
Uncaught SyntaxError: Unexpected token '<' (at decode.min.js:1:1) brotliloader.min.js:1 Uncaught SyntaxError: Unexpected token '<' (at brotliloader.min.js:1:1)
On clicking of any of the above error, it takes me to respective js files and shows index.html
content
I tried copy pasting the html to online html formatter but no errors or unexpected token. Please can you assist on this?
@fingers10
Q1. Have you installed the PublishSPAforGitHubPages.Build
NuGet package into your project?
Q2. Have you ever tried that publish again after completely deleting the bin
and obj
folders?
Q3. Are the brotliloader.min.js
and decode.min.js
files in the same folder where the index.html
file is placed on your local IIS server?
Q4. Is the Blazor App you've deployed to your local IIS an offline-supported PWA?
@jsakamoto
Q1. Have you installed the
PublishSPAforGitHubPages.Build
NuGet package into your project? -Yes
Q2. Have you ever tried that publish again after completely deleting the
bin
andobj
folders? -Yes
Q3. Are the
brotliloader.min.js
anddecode.min.js
files in the same folder where theindex.html
file is placed on your local IIS server? -No. I'm not able to find the brotliloader.min.js and decode.min.js in the publish output
Q4. Is the Blazor App you've deployed to your local IIS an offline-supported PWA? -
No
@fingers10
Thank you for your reply.
First of all, and as a basic premise, the reason for that problem is not the "BlazorWasmPreRendering.Build" package.
Who rewrites the index.html
of your app to make the index.html
will load brotliloader.min.js
and decode.min.js
files is the "PublishSPAforGitHubPages.Build" package. The "PublishSPAforGitHubPages.Build" package will also write out brotliloader.min.js
and decode.min.js
files to the target folder of publish.
Even if the "PublishSPAforGitHubPages.Build" package worked unexpectedly, it is still very weird that brotliloader.min.js
and decode.min.js
files do not exist in the IIS target folder, even though the index.html
seems to be rewritten to load those files.
So, please respond to the following request from me.
index.html
in the source folder of your app to this thread.index.html
in the target folder of your IIS server to this thread.Properties/*.pubxml
in the source folder of your app to this thread.dotnet publish ~
, please tell me exactly what command you did.index.html
in the publish target folder to this thread. And try to publish again after deleting all files completely, not only the obj
and bin
folders but also the publish target folder.@jsakamoto
- Please attach the
index.html
in the source folder of your app to this thread. - src/wwwroot/index.html- Please attach the
index.html
in the target folder of your IIS server to this thread. - Attached- Please tell me detailed and complete how you published the app to the IIS server.
- If you published the app via Visual Studio GUI, please attach the
Properties/*.pubxml
in the source folder of your app to this thread. - Attached- If you published the app via .NET CLI such as
dotnet publish ~
, please tell me exactly what command you did. - Not Applicable- If you did not publish the app to the IIS server directly, there must exist the publish target folder in your PC disk locally, I guess. If so, please attach the
index.html
in the publish target folder to this thread. And try to publish again after deleting all files completely, not only theobj
andbin
folders but also the publish target folder. - Attached
I published to default folder profile and copied the published contents to folder in C drive which is mapped to IIS virtual directory. I have attached the folder profile and publish contents.
Publish Output is more than 25MB and GitHub is not allowing to upload. hence giving you an external link to download. - https://www.mediafire.com/file/23hkiafkfaermnc/Publish+Issue.zip/file
@fingers10 Thank you for providing detailed information. So I could figure out what is the reason for this problem.
It is the bug of the "PublishSPAforGitHubPages.Build" package.
The part of that package worked unexpectedly when the <GHPagesBase>
MSBuild property was specified.
The workaround at this time is to comment out the specification of the <GHPagesBase>
MSBuild property in your .csproj file temporary only when you publish the app for IIS.
Of couse, I'll fix the "PublishSPAforGitHubPages.Build" package. Please give me time for a while.
Again, Thank you for providing specific and detailed information. 👍
@fingers10 I published the fixed version of the "PublishSPAforGitHubPages.Build" NuGet package ver.2.0.2.
Please upgrade to it and try that again.
Aside if you still have any problem involved with the "BlazorWasmPreRendering.Build" NuGet package, please create a new issue thread and report into it. DON'T POST any topics into this thread anymore. This thread is already too late to track each discussion effectively because YOU pushed various topics into this thread! I'm really bothered by this long issue thread 😥. Don't hesitate to open a new thread. Try to create one Issue per happening.
However, I really appreciate you ❤️ because you always let me know if the packages I created seem to have a bug. Your activity must be helpful not only to me but also to all developers who use those my NuGet packages. So I'll thanks to you if you also understand how to treat GitHub issues!
@jsakamoto .
Many thanks for the fix. It's working now. I apologize for posting the issue here, I'll make sure I'll not repeat this next time.
@fingers10
It's working now.
I'm happy for you that I heard about that from you! 😊 Again, many thanks to your contributions! 👍
Hi there, I tried to install this package to https://github.com/ant-design-blazor/ant-design-blazor, but an exception occurred during the publishing process.