Open sm1279 opened 2 years ago
Any ideas on what could cause this message?
Hello @sm1279 and @whjv46,
For the stack trace above - does your API take a file as input? If yes, this could be the cause of the error.
These types of exceptions should include a message with the unsupported type, but the above does not - this needs to be fixed in RESTler. I will update this issue once the fix is merged so we can track down the specific unsupported type.
Thanks,
Marina
The fix to add the exception text is merged, could you please re-run your repro and share the exception message with the type?
Unhandled exception. Restler.Compiler.UnsupportedType: Exception of type 'Restler.Compiler.UnsupportedType' was thrown. at Restler.Compiler.SwaggerVisitors.processProperty(String propertyName, JsonSchemaProperty property, FSharpOption
1 propertyPayloadExampleValue, Boolean generateFuzzablePayload, Boolean trackParameters, FSharpOption
1 jsonPropertyMaxDepth, FSharpList1 parents, SchemaCache schemaCache, FSharpFunc
2 cont) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\SwaggerVisitors.fs:line 495 at Restler.Compiler.SwaggerVisitors.declaredPropertyParameters@610.Invoke(KeyValuePair2 item) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\SwaggerVisitors.fs:line 616 at Microsoft.FSharp.Collections.Internal.IEnumerator.choose@171.System-Collections-IEnumerator-MoveNext() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 179 at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@266[T,TResult](ConcatEnumerator
2 x, Unit unitVar0) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seqcore.fs:line 268 at Microsoft.FSharp.Collections.SeqModule.oneStepTo@987[T](IEnumerable1 source, List
1 prefix, FSharpRef1 enumeratorR, Int32 i) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 996 at Microsoft.FSharp.Collections.SeqModule.action@4164-1[T](IEnumerable
1 source, List1 prefix, FSharpRef
1 enumeratorR, Int32 i, Unit unitVar0) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 1011 at Microsoft.FSharp.Collections.SeqModule.result@1003.Invoke(Int32 i) at Microsoft.FSharp.Collections.Internal.IEnumerator.unfold@205.DoMoveNext(b& curr) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 207 at Microsoft.FSharp.Collections.Internal.IEnumerator.MapEnumerator1.System-Collections-IEnumerator-MoveNext() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 64 at Microsoft.FSharp.Collections.SeqModule.ToList[T](IEnumerable
1 source) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 546 at Restler.Compiler.SwaggerVisitors.generateGrammarElementForSchema(JsonSchema schema, FSharpOption1 exampleValue, Boolean generateFuzzablePayloadsForExamples, Boolean trackParameters, FSharpOption
1 jsonPropertyMaxDepth, Boolean isRequired, Boolean isReadOnly, FSharpList1 parents, SchemaCache schemaCache, FSharpFunc
2 cont) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\SwaggerVisitors.fs:line 819 at Restler.Compiler.SwaggerVisitors.generateGrammarElementForSchema(JsonSchema schema, FSharpOption1 exampleValue, Boolean generateFuzzablePayloadsForExamples, Boolean trackParameters, FSharpOption
1 jsonPropertyMaxDepth, Boolean isRequired, Boolean isReadOnly, FSharpList1 parents, SchemaCache schemaCache, FSharpFunc
2 cont) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\SwaggerVisitors.fs:line 636 at Restler.Compiler.Main.allResponses@1163.GenerateNext(IEnumerable1& next) at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase
1.MoveNextImpl() in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seqcore.fs:line 371 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1.System-Collections-IEnumerator-MoveNext() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seqcore.fs:line 403 at Microsoft.FSharp.Collections.SeqModule.TryHead[T](IEnumerable
1 source) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 1370 at Restler.Compiler.Main.requestDataSeq$cont@1115(Config config, SchemaCache schemaCache, String ep, KeyValuePair2 m, RequestId requestId, FSharpOption
1 exampleConfig, Unit unitVar) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\Compiler.fs:line 1198 at Restler.Compiler.Main.getRequestData@1058-1.GenerateNext(IEnumerable1& next) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\Compiler.fs:line 1115 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase
1.MoveNextImpl() in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seqcore.fs:line 371 at Microsoft.FSharp.Core.CompilerServices.GeneratedSequenceBase1.System-Collections-IEnumerator-MoveNext() in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seqcore.fs:line 403 at Microsoft.FSharp.Core.CompilerServices.RuntimeHelpers.takeInner@266[T,TResult](ConcatEnumerator
2 x, Unit unitVar0) in F:\workspace_work\1\s\src\fsharp\FSharp.Core\seqcore.fs:line 268 at System.Collections.Generic.List1..ctor(IEnumerable
1 collection) at Microsoft.FSharp.Collections.SeqModule.ToArray[T](IEnumerable1 source) in F:\workspace\_work\1\s\src\fsharp\FSharp.Core\seq.fs:line 825 at Restler.Compiler.Main.generateRequestGrammar(FSharpList
1 swaggerDocs, MutationsDictionary dictionary, Config config, FSharpList1 globalExternalAnnotations, FSharpList
1 userSpecifiedExamples) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\Compiler.fs:line 1264 at Restler.Workflow.generateGrammarFromSwagger(String grammarOutputDirectoryPath, FSharpOption1 swaggerDoc, FSharpOption
1 specMetadata, Config config) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\Workflow.fs:line 179 at Restler.Workflow.generateRestlerGrammar(FSharpOption`1 swaggerDoc, Config config) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.Compiler\Workflow.fs:line 270 at Program.main(String[] argv) in C:\ATR\Trifecta\Fuzzwer\restler-fuzzer-main\src\compiler\Restler.CompilerExe\Program.fs:line 37