How to get Uno WASM to work inside Electron shell? #12498
-
I am trying to run our application as a WASM app in an Electron shell on Ubuntu 22.04. When I load up my app, I just see the Uno Platform logo. Nothing else happens. I've done a google search but the only real leads I find is this SO question (How to electronize a UNO Wasm application), and this GitHub feature request (Electron Support), which seems to indicate that Uno is not supported on Electron. All other searches just bring up a comparison of Uno Platform and Electron. If true, this is potentially devastating to our project and timeline. Therefore I want to make sure I do my due diligence in investigating this before dropping any bombs. So does anyone know whether there is a way to get an Uno WASM app to run in an Electron shell? Some relevant info: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
A colleague of mine found a possible workaround from this link: Uno fails to load when UserAgent contains Electron. Basically the workaround is to add this to the mainWindow.loadURL call:
My colleague says it works on his system, but it does not work on mine. Instead I get these errors: This all still works in Firefox, though, so I'm not sure why Electron is having trouble retrieving these resources. |
Beta Was this translation helpful? Give feedback.
-
I found the solution. In addition to the following change in the JS script that launches the electron shell:
I also needed to upgrade my project from .NET 6 to .NET 7. |
Beta Was this translation helpful? Give feedback.
I found the solution. In addition to the following change in the JS script that launches the electron shell:
I also needed to upgrade my project from .NET 6 to .NET 7.