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

JavaScript runtime error: Object.keys: argument is not an Object error while using Swagger UI in IE 11. #2221

Closed
disha-s opened this issue Jun 16, 2016 · 14 comments
Assignees
Milestone

Comments

@disha-s
Copy link

disha-s commented Jun 16, 2016

I am getting the following error while using Swagger UI in Internet Explorer 11.

Unhandled exception at line 2, column 27219 in http://localhost:52697/service/help/swagger-ui.min.js

0x800a138f - JavaScript runtime error: Object.keys: argument is not an Object.

I am using "Swashbuckle.SwaggerUi": "6.0.0-beta9"

@webron
Copy link
Contributor

webron commented Jun 16, 2016

@disha-s - that's the version of Swashbuckle, not swagger-ui. Check the version at the top of the swagger-ui.js file.

@disha-s
Copy link
Author

disha-s commented Jun 20, 2016

swagger-ui.js file has version 2.7.1.

@webron
Copy link
Contributor

webron commented Jun 21, 2016

Can you verify that please? Current version is 2.1.4... 2.7.1 doesn't exist.

@disha-s
Copy link
Author

disha-s commented Jun 22, 2016

where do i look for the version?

@pdurkim
Copy link

pdurkim commented Jun 22, 2016

Getting a similar error in ie11

SCRIPT438: Object doesn't support property or method 'assign' swagger-ui.js, line 19177 character 9

The Swagger UI loads with all my endpoints but the security definitions have a problem so the 'Authorize' button doesn't show up. The top of the page hangs on Finished Loading Resource Information. Rendering Swagger UI...

@fehguy
Copy link
Contributor

fehguy commented Jun 23, 2016

Can you please confirm your versions for swagger-ui and swagger-js? Look in your swagger-ui.js file, you'll see something like this:

/**
 * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
 * @version v2.1.4
 * @link http://swagger.io
 * @license Apache-2.0
 */
/**
 * swagger-client - swagger-client is a javascript client for use with swaggering APIs.
 * @version v2.1.15
 * @link http://swagger.io
 * @license Apache-2.0
 */

@pdurkim
Copy link

pdurkim commented Jun 27, 2016

 * swagger-ui - Swagger UI is a dependency-free collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API
 * @version v2.1.4
 * @link http://swagger.io
 * @license Apache-2.0
 */

@fehguy
Copy link
Contributor

fehguy commented Jun 27, 2016

@bodnia can you please look at this?

@eavonius
Copy link

eavonius commented Aug 4, 2016

This is definitely an issue in IE11 for me as well. This is using the latest nuget package version of Swashbuckle 5+ as of August 4th. Looks like there may have been some commits, but it's still not readily available.

@bodnia
Copy link
Contributor

bodnia commented Aug 17, 2016

@eavonius could you please confirm if you still can reproduce the issue with latest master?

@fehguy
Copy link
Contributor

fehguy commented Aug 23, 2016

Please see a906cff

@fehguy fehguy closed this as completed Aug 23, 2016
@fehguy fehguy added this to the v2.2.1 milestone Aug 23, 2016
@pdurkim
Copy link

pdurkim commented Aug 25, 2016

@fehguy - are you sure that a906cff is the commit that addresses this issue?

@pdurkim
Copy link

pdurkim commented Aug 25, 2016

to fix the IE issue, did you just add the es5-shim library to the repo and add it as a reference in index.html?

@bodnia
Copy link
Contributor

bodnia commented Oct 24, 2016

@peyterkim this is correct

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

6 participants