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

Support regarding removal of unsafe-eval #10047

Closed
imrozeH opened this issue Nov 21, 2024 · 2 comments
Closed

Support regarding removal of unsafe-eval #10047

imrozeH opened this issue Nov 21, 2024 · 2 comments

Comments

@imrozeH
Copy link

imrozeH commented Nov 21, 2024

**GWT version:2.9.0
**Browser (with version): Chrome 130.0.6723.92
**Operating System: Mac


Description

Basically I am trying to remove unsafe-eval and as per a previous issue I upgraded th rpc version to 8 and as well as increased the maxPayloadChunkSize. Everything seems to be working really nice apart from the string with node size more than 64kb, those were throwing eval errors. So I have increased the node size as well. But once I increase the node size, the entire project doesn't load at all, keeps reloading at a certain init phase.
Seems like in the clas ServerSerializationStreamWriter.java,

private void writeHeader(LengthConstrainedArray stream) {
stream.addToken(getFlags());
if (stream.isJavaScript() && getVersion() >= SERIALIZATION_STREAM_JSON_VERSION) {
// Ensure we are not using the JSON supported version if stream is Javascript instead of JSON
stream.addToken(SERIALIZATION_STREAM_JSON_VERSION - 1);
} else {
stream.addToken(getVersion());
}
}

When ever the large strings are being passed through SERIALIZATION_STREAM_JSON_VERSION > 7 it is going into some spiral mode. Can anybody help here?

Steps to reproduce
Known workarounds
Links to further discussions
@niloc132
Copy link
Member

niloc132 commented Nov 21, 2024

This sounds a little like #10043, where one of the flags was missed. To confirm, you raised bothgwt.rpc.maxPayloadChunkSize and gwt.rpc.maxStringNodeLength using server-side system properties to something like Integer.MAX_VALUE, and gwt.rpc.version to 8?


Can you confirm what is causing your app to refresh? Nothing in GWT itself should make the app refresh, perhaps you have some error handler that is trying to recover by starting over?

@imrozeH
Copy link
Author

imrozeH commented Nov 22, 2024

It was the 3rd case in #10043. Thank you so much. Got it resolved.

@imrozeH imrozeH closed this as completed Nov 22, 2024
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

2 participants