Closed fzdwx closed 1 year ago
Update:
import './style.css'
in main.ts
, But I was able to work normally without this line of code in v2.4.1.Thanks for reporting. Have you investigated what change may have caused this?
About AssetHandle may be related to custom protocols, I did not return a 501 status code.
I'm trying to find that commit, I referenced the commit 7c1490a, my Asset handler was working fine, but in the next commit, my program turned white, and the situation got worse.
The CSS thing is a known issue on Linux since we consolidated the devserver to use the custom scheme 'wails://'. Either you can import the css as you've already mentioned or bump your webkit build dependency by using 'wails dev -tag webkit2_36'
As for the assethandler that's strange, I was not able to reproduce this issue with my test prpject. Can you provide your console output to see if thr handler get called or not? Most often when '501 - not implemented' is returned this means the custom handler did not return any data. Does probably your if statement in there not catch and the handler just returns? Can you check if the handler is called at all?
I confirm
Okey and can you test if your if is reached? Can you add some printf to the line where you do the rw.Write to check that gets reached? And does it work id you explicitly call a rw.WriteHeader(200) ?
Thinks, the reason is that req.RequestURI
returned the complete path wails://wails.localhost:34115/favicon.ico?/linguist
.
Great you got it solved. Interesting I would not have expected that the RequestURI did change between 2.4 and 2.5
This did really change between 2.4 and 2.5 and the 2.4 behaviour is the correct one. This is an issue with our faking Go-Webserver, will provide a PR soon to fix this so we conform the the HTTP RFC for this value.
Ok,
Description
When I upgraded from version 2.4.1 to 2.5.1, I found that both Tailwind and my custom AssetHandle were not working in my project.
This is after the upgrade:
This is before the upgrade:
To Reproduce
Use Wails 2.4.1 and 2.5.1 respectively to start.
Expected behaviour
Normal use of Tailwind and AssetHandle.
Screenshots
No response
Attempted Fixes
No response
System Details
Additional context
No response