Skip to content
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

WebView2 - Aborted()... isue #19089

Open
datovy-edam opened this issue Dec 15, 2024 · 2 comments
Open

WebView2 - Aborted()... isue #19089

datovy-edam opened this issue Dec 15, 2024 · 2 comments
Labels
area/webview Categorizes an issue or PR as relevant to the WebView control kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform

Comments

@datovy-edam
Copy link

What do you need help with?

UNO Platform is great... keep working on it.

I have an issue while sending commands within WebView2 that generate an exception:

ex = RuntimeError: Aborted(). Build with -sASSERTIONS for more info.
    at abort (http://localhost:5000/package_15aa0a6170c57a44ee682886b8f3ac37aa69718f/dotnet.native.js:8:9137)
    at _abort (http://localhost:5000/package_15aa0a6170c57a44ee682886b8f3ac37aa6971...

The previous is returned while sending a command, for example:

   public async Task SetLanguageAsync(string languageId)
   {
      if (MonacoEditorWebView.CoreWebView2 != null)
      {
         CurrentCodeLanguage = languageId;
         string command = $"editor.setModel(monaco.editor.createModel(editor.getValue(), '{languageId}'));";

         try
         {
            await this.MonacoEditorWebView.ExecuteScriptAsync(command);

            // Reset the change content event
            await this.RegisterContentChangingEvent();
         }
         catch (Exception ex)
         {
            ResultLog.Trace(ex, "MonacoEditor.LoadContent");
         }
      }
   }

I am using Uno 5.3, .net8, Windows and WebAssembly platforms. Interestingly, all works as expected under Windows but it generates the above exception in WebAssembly. Some exploration/troubleshooting along with other previously reported issues point at the possibility of some assemblies not supported under .net8, but so far have not found such culprit.

This started to appear under WebAssembly when I updated the libraries as suggested for 5.3 to allow the use of the DataGrid (CommunityToolkit).

If any may provide some of their experiences with this kind of issue will be very useful.

Hope to hear form any of you...

I am working on the following GITHUB project: [https://github.com/datovy-edam/Edam.Data.Catalog]

@jeromelaban
Copy link
Member

Thanks for the report.

A few things, does it happen when running on net9.0? Also, could you provide a trimmed down repro of the problem? And finally, we do have a implementation of monaco that exists already.

@jeromelaban jeromelaban added kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform triage/needs-information Indicates an issue needs more information in order to work on it. area/webview Categorizes an issue or PR as relevant to the WebView control labels Dec 16, 2024
@datovy-edam
Copy link
Author

Prompt attention to the request is greatly appreciated! Thanks.

ABOUT MONACO

For Monaco, I had been using it within the WebView2 for years and it works nicely under WinUI 3 projects. I started a project using the Uno Platform to target other platforms mainly WinUI Desktop and WebAssembly.

Some time ago I did try the ".../uno.monaco-editor-uwp" and it works nicely within its downloaded version, but upon inspection it uses quite a few deprecated libraries and it looks like was tailored for WebAssembly since while trying to bring it forward to .net8 and uno 5.3 as is my project the effort to fix the numerous found issues of missing libraries or unsupported classes/interfaces and so on discourage me to use it or try to bring it forward myself. Perhaps the original author(s) could take a peek at this and make a Windows and WebAssemby ready version.

I am currently using another Monaco base implementation on an existing GitHub WinUI related repo and so far is working and looks like the issues to be used in WebAssembly are just a few and looks like I may overcome those.

TRY NET9?

I am trying .net8 for now and the other libraries I am using work fine in both Windows and WebAssembly within Uno.

TRIMMED VERSION

I do have a test only with the Monaco library that works greate in Windows and have the reported issues in WebAssembly.

CONCLUSIONS

I will try a few things and may return back for help.

... again your help is greatly appreciated.

@github-actions github-actions bot removed the triage/needs-information Indicates an issue needs more information in order to work on it. label Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/webview Categorizes an issue or PR as relevant to the WebView control kind/bug Something isn't working platform/wasm 🌐 Categorizes an issue or PR as relevant to the WebAssembly platform
Projects
None yet
Development

No branches or pull requests

2 participants