swagger UI hanging

944 views
Skip to first unread message

Craig Foote

unread,
Oct 8, 2014, 3:39:12 PM10/8/14
to swagger-sw...@googlegroups.com
Hi people, I've just found that some of my calls through the swagger UI now hang the web page. I get a "Warning: Unresponsive script" dialog specifying highlight.7.3.pack.js:1 as the problem. Unfortunately that lib is obfuscated to have only one line :( The dialog allows me to stop script and when I do the display seems to clean itself up ok. The only thing I can think of that changed was some refactoring I did to make more verbose, more lengthy JSON responses. I wonder if there's a limit I hit. Any ideas?

Craig

Ron

unread,
Oct 8, 2014, 3:41:49 PM10/8/14
to swagger-sw...@googlegroups.com
Can you share the swagger specification you use so that we can test it ourselves?

On 8 October 2014 22:39, Craig Foote <craig...@gmail.com> wrote:
Hi people, I've just found that some of my calls through the swagger UI now hang the web page. I get a "Warning: Unresponsive script" dialog specifying highlight.7.3.pack.js:1 as the problem. Unfortunately that lib is obfuscated to have only one line :( The dialog allows me to stop script and when I do the display seems to clean itself up ok. The only thing I can think of that changed was some refactoring I did to make more verbose, more lengthy JSON responses. I wonder if there's a limit I hit. Any ideas?

Craig

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Craig Foote

unread,
Oct 9, 2014, 3:10:46 PM10/9/14
to swagger-sw...@googlegroups.com
Hi Ron, my setup is:
swagger-springmvc-0.8.4
swagger-core_2.10-1.3.5
swagger-annotations-1.3.5
swagger-ui.js-2.0.18

I should mention that I can take the same url and put it into a web browser address bar and I get immediate rendering.
Any help appreciated.
Craig

Ron

unread,
Oct 9, 2014, 3:15:38 PM10/9/14
to swagger-sw...@googlegroups.com
That's what I actually asked to see, the json that url gives you.

Craig Foote

unread,
Oct 9, 2014, 5:11:48 PM10/9/14
to swagger-sw...@googlegroups.com
I'm on an internal network and can't provide that. Anything I should look for?

Craig

Ron

unread,
Oct 9, 2014, 5:14:38 PM10/9/14
to swagger-sw...@googlegroups.com
Then you would have to debug the ui, try and find out yourself where it hangs and give us that information (with possibly just that relevant json snippet).

Craig Foote

unread,
Oct 15, 2014, 9:15:10 AM10/15/14
to swagger-sw...@googlegroups.com
Hi Ron, do you think a content length of 36727 could be a problem? The json response is pretty simple, Just an array of Group objects with half a dozen primitive attributes and a "members" array attribute containing a few Person objects, each with half a dozen primitive attributes. I tried using highlight.8.3 but got the same result. Too bad there's no non-minimized version that would help me narrow down the problem :(

Ron

unread,
Oct 15, 2014, 9:49:59 AM10/15/14
to swagger-sw...@googlegroups.com
Craig, I fear I've missed the part in the original message referring to highlight.js. I believe you encounter this issue - https://github.com/wordnik/swagger-ui/issues/449.

Craig Foote

unread,
Oct 15, 2014, 10:19:17 AM10/15/14
to swagger-sw...@googlegroups.com
Thanks Ron, that seems to have been the problem.

Ron

unread,
Oct 15, 2014, 10:22:24 AM10/15/14
to swagger-sw...@googlegroups.com
Notice that some solution was introduced - https://github.com/wordnik/swagger-ui#swaggerui
Check the highlightSizeThreshold bullet.
Reply all
Reply to author
Forward
0 new messages