question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Invalid string length

See original GitHub issue

I am having troubles to load the documentation using swagger-ui. I suspect that this happens because my json file is huge.

If necessary I can provide the JSON file, for debugging proposes, via private message.

If you need more information please just let me know.

Uncaught RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at t.exports.u.getModelSampleJSON (http://localhost/api/swagger/ui/swagger-ui-min-js:9:748)
    at new t.exports (http://localhost/api/swagger/ui/swagger-ui-min-js:8:26467)
    at http://localhost/api/swagger/ui/swagger-ui-min-js:7:17315
    at r (http://localhost/api/swagger/ui/swagger-ui-min-js:11:12853)
    at Object.forEach (http://localhost/api/swagger/ui/swagger-ui-min-js:11:24144)
    at http://localhost/api/swagger/ui/swagger-ui-min-js:7:17041
    at http://localhost/api/swagger/ui/swagger-ui-min-js:11:22737
    at r (http://localhost/api/swagger/ui/swagger-ui-min-js:11:16261)
    at http://localhost/api/swagger/ui/swagger-ui-min-js:11:22408

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:24 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
srebellacommented, Nov 3, 2016

yes @andrenpt that is normal… but sometimes it makes the json huge… the way to filter the json document is using the DocumentFilter… check this url and let me know http://stackoverflow.com/a/31159468/2144426

1reaction
dariusdamalakascommented, Nov 7, 2016

@andrenpt , that still looks wrong. I’ve pasted this json here, you should the validation error there.

http://www.jsoneditoronline.org/?id=914441c5039ad57bb3b1d5ab54f32e74

eg.:

paths: {
/Webs: {
get: {
Read more comments on GitHub >

github_iconTop Results From Across the Web

Uncaught RangeError: Invalid string length when ...
Your 2-D array accesses are incorrect, but the main problem is that you're re-using the variable i in an inner loop:
Read more >
RangeError: Invalid string length with large files. #35973
When i'm trying to read a large Json File (700MB - 26.640.222 lines) using ReadStream i'm getting the error: "RangeError: Invalid string length" ......
Read more >
Prototype .repeat gives me error of invalid string length
Hello all, I am facing a javascript coding challenge, which requires me to find all occurences of letter 'a' in a repeated string....
Read more >
RangeError: invalid array length - JavaScript - MDN Web Docs
The JavaScript exception "Invalid array length" occurs when specifying an array length that is either negative, a floating number or exceeds ...
Read more >
HTML : Uncaught RangeError: Invalid string length ... - YouTube
HTML : Uncaught RangeError: Invalid string length when appending to a string in JavaScript [ Beautify Your Computer ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found