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

Could not read test result file - String length (20049662) exceeds the maximum length (20000000) #2087

Closed
1 task done
kalcefer opened this issue Aug 24, 2023 · 4 comments
Closed
1 task done
Labels
type:bug Something isn't working

Comments

@kalcefer
Copy link

Describe the Bug

When generating a report on Jenkins. I get an error

At the same time, the report itself is generated correctly

 [integration-tests-neural network platform] $ /home/jenkins/tools/en.yandex.qatools.charm.jenkins. tools.AllureCommandlineInstallation/allure_report/bin/allure generate /home/jenkins/workspace/qa/integration tests/integration-tests-neural platform/cypress/allure-results -c -o /home/jenkins/workspace/qa/integration tests/integration tests-neural platform/cypress/charm-report
15:08:44 The test results file could not be read /home/jenkins/workspace/qa/integration-tests/integration-tests-neyross-platform/cypress/allure-results/315ae86c-356d-4eda-b84c-7047a6224cb2-result.json
15:08:44 com.fasterxml.jackson.data binding.JsonMappingException exception: string length (20049662) exceeds maximum length (20000000) (via link chain: io.qameta.allure.model.TestResult["steps"]->java.util.ArrayList[14]->io.qameta.allure.model.StepResult["parameters"]->java.util.ArrayList[0]->io.qameta.allure.model.Parameter["value"])
15:08:44 in com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath exception(JsonMappingException exception.java:402)
15:08:44 in com.fasterxml.jackson.databind.JsonMappingException.wrapWithPath exception(JsonMappingException exception.java:361)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializerBase.wrapAndThrow(BeanDeserializerBase.java:1853)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:316)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
15:08:44 in com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:359)
15:08:44 in com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
15:08:44 in com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
15:08:44 in com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
15:08:44 in com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:359)
15:08:44 in com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:244)
15:08:44 in com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:28)
15:08:44 in com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
15:08:44 in com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:323)
15:08:44 in com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4825)
15:08:44 in com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3809)
15:08:44 in io.qameta.allure.charm 2.Allure2Plugin.readTestResult(Allure2Plugin.java:382)
15:08:44 in java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
15:08:44 in java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1384)
15:08:44 in java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
15:08:44 in java.util.stream.ForEachOps$ForEachTask.compute(ForEachOps.java:290)
15:08:44 in java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:731)
15:08:44 in java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
15:08:44 in java.util.concurrent.ForkJoinPool$WorkQueue.execLocalTasks(ForkJoinPool.java:1040)
15:08:44 in java.util.concurrent.ForkJoinPool$WorkQueue.RunTask(ForkJoinPool.java:1058)
15:08:44 in java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
15:08:44 in java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)
15:08:44 Caused by: com.fasterxml.jackson.core.exc.StreamConstraintsException: String length (20049662) exceeds maximum length (20000000)
15:08:44 on com.fasterxml.jackson.core.StreamReadConstraints.validateStringLength(StreamReadConstraints.java:324)
15:08:44 in com.fasterxml.jackson.core.util.ReadConstrainedTextBuffer.validateStringLength(ReadConstrainedTextBuffer.java:27)
15:08:44 in com.fasterxml.jackson.core.util.TextBuffer.finishCurrentSegment(TextBuffer.java:939)
15:08:44 in com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishString2(UTF8StreamJsonParser.java:2584)
15:08:44 in com.fasterxml.jackson.core.json.UTF8StreamJsonParser._finishAndReturnString(UTF8StreamJsonParser.java:2560)
15:08:44 in com.fasterxml.jackson.core.json.UTF8StreamJsonParser.getText(UTF8StreamJsonParser.java:335)
15:08:44 in com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:42)
15:08:44 in com.fasterxml.jackson.databind.deser.std.StringDeserializer.deserialize(StringDeserializer.java:11)
15:08:44 in com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
15:08:44 in com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:314)
15:08:44 ... missed 27 total frames
15:08:46 The report was successfully generated for /home/jenkins/workspace/qa/integration-tests/integration-tests-neyross-platform/cypress/allure-report
15:08:46 The Allure report has been successfully generated.
15:08:46 Creating an artifact for assembly.
15:08:53 The artifact was added to the build.

Steps to Reproduce

It is necessary to run more than 300 tests.

Expected Behaviour

console log without errors

Screenshots or Additional Context

No response

What Language are you using?

JavaScript

What Framework/Allure Integration you are using?

Allure-jenkins

What version of Allure Integration you are using?

2.23.1

What version of Allure Report you are using?

2.23.1

Code of Conduct

  • I agree to follow this project's Code of Conduct
@kalcefer kalcefer added triage type:bug Something isn't working labels Aug 24, 2023
@kalcefer
Copy link
Author

Rolling back to version 2.22.1 solves this error.

@baev
Copy link
Member

baev commented Oct 3, 2023

related to FasterXML/jackson-core#1014

@baev
Copy link
Member

baev commented Oct 5, 2023

The issue is that one of your results has a step parameter with a value that exceeds 20_000_000 characters. According to the stack trace, you can find the value in the file 315ae86c-356d-4eda-b84c-7047a6224cb2-result.json using JSON path steps[14].parameters[0].value

Such parameter value has no real use, as you can't see it in the report. I would suggest you remove this parameter from the report to fix the issue.

NOTE: the limit is not for the document. It is for the maximum string length within the JSON document. It does not depend on the number of tests/steps/attachments.

@baev
Copy link
Member

baev commented Oct 5, 2023

If you have any issues with locating such a parameter (e.g. if it's created by default by test framework integration) please create a separate discussion and provide additional details on your setup

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants