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

GetValue not returning when the value is large. #106

Closed
Hirad2hhk opened this issue Sep 23, 2023 · 7 comments
Closed

GetValue not returning when the value is large. #106

Hirad2hhk opened this issue Sep 23, 2023 · 7 comments

Comments

@Hirad2hhk
Copy link

I encountered this problem when i copied a websites source html and i found out that when the editor component is used in blazor server side and the file is larger than 30Kbs(roughly 1000 lines) the method wont return and crashes.
This is easily reproduceable by running the sample app in the repository as blazor server-side and pressing the get value button when a large enough text is in the editor.

@Hirad2hhk
Copy link
Author

This is a link to the test repository i created for anyone intrested
https://github.com/Hirad2hhk/FaultyMonaco

@MikeWilliams-UK
Copy link

Just tried this solution and I see same the exact same symptoms when the string pasted into the editor is 260k bytes as I have desribed in #109

@MikeWilliams-UK
Copy link

Similar belaviour is seen in Manaco Playground - Issue raised there.
microsoft/monaco-editor#4238

@da-baranov
Copy link

services.AddSignalR(e => {
e.MaximumReceiveMessageSize = 1024 * 1024 * 100;
});

@MikeWilliams-UK
Copy link

MikeWilliams-UK commented Nov 6, 2023

Many thanks @da-baranov,
My issue is now fixed albeit with a slight tweak required for my app as shown below

var builder = WebApplication.CreateBuilder(args);

// Add services to the container.
builder.Services.AddRazorPages();
builder.Services.AddServerSideBlazor();

builder.Services.AddSignalR(e => {
    e.MaximumReceiveMessageSize = 1024 * 1024 * 100;
});

@MikeWilliams-UK
Copy link

@Hirad2hhk you might want to try the above, it worked for my app

@Hirad2hhk
Copy link
Author

Thank you very much @MikeWilliams-UK and @da-baranov . The issue got fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants