@hapi/vision package causes error with swagger ui
See original GitHub issueIssue
Swagger UI fails when @hapi/vision
package is installed but works when vision
package is installed.
<--- Last few GCs --->
[28245:0x103800000] 19342 ms: Mark-sweep 1350.1 (1457.3) -> 1347.7 (1457.3) MB, 42.1 / 0.0 ms (average mu = 0.266, current mu = 0.195) allocation failure scavenge might not succeed
[28245:0x103800000] 19392 ms: Mark-sweep 1350.1 (1457.3) -> 1348.3 (1457.3) MB, 43.0 / 0.0 ms (average mu = 0.211, current mu = 0.152) allocation failure scavenge might not succeed
<--- JS stacktrace --->
==== JS stack trace =========================================
Security context: 0x2b12b3e1e6e9 <JSObject>
0: builtin exit frame: splice(this=0x2b1214722221 <JSArray[35]>,0x2b124277c4f9 <String[11]: credentials>,0x2b1268d9cff1 <Number inf>,33,0x2b1214722221 <JSArray[35]>)
1: /* anonymous */ [0x2b1214722291] [/Users/j0o00um/p/p2/store-instant-credit/node_modules/json-stringify-safe/stringify.js:~16] [pc=0x2d9cdfcd5ec1](this=0x2b12c7c798c9 <Object map = 0x2b12a8ca0189>,key=0x2b124277c4f9 <Stri...
FATAL ERROR: Ineffective mark-compacts near heap limit Allocation failed - JavaScript heap out of memory
1: 0x10003cf99 node::Abort() [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
2: 0x10003d1a3 node::OnFatalError(char const*, char const*) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
3: 0x1001b7835 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
4: 0x100585682 v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
5: 0x100588155 v8::internal::Heap::CheckIneffectiveMarkCompact(unsigned long, double) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
6: 0x100583fff v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
7: 0x1005821d4 v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
8: 0x10058ea6c v8::internal::Heap::AllocateRawWithLigthRetry(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
9: 0x10058eaef v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationSpace, v8::internal::AllocationAlignment) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
10: 0x10056bcc4 v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, v8::internal::PretenureFlag) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
11: 0x10056bdb2 v8::internal::Factory::NewJSArray(v8::internal::ElementsKind, int, int, v8::internal::ArrayStorageAllocationMode, v8::internal::PretenureFlag) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
12: 0x100505842 v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::Splice(v8::internal::Handle<v8::internal::JSArray>, unsigned int, unsigned int, v8::internal::Arguments*, unsigned int) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
13: 0x1002445d9 v8::internal::Builtin_Impl_ArraySplice(v8::internal::BuiltinArguments, v8::internal::Isolate*) [/Users/j0o00um/.nvm/versions/node/v10.16.0/bin/node]
14: 0x2d9cdf5dbf9d
15: 0x2d9cdfcd5ec1
sh: line 1: 28244 Abort trap: 6 npm start
Environment
npx envinfo --npmPackages '*hapi*' --binaries
Binaries:
Node: 10.16.0 - ~/.nvm/versions/node/v10.16.0/bin/node
npm: 6.9.0 - ~/.nvm/versions/node/v10.16.0/bin/npm
npmPackages:
hapi-swagger: 10.0.1 => 10.0.1
Steps to Reproduce
npm i @hapi/vision
Expected Behavior
Swagger UI would not fail
Actual Behavior
Swagger failed
Reproducible Demo
If needed, I can cobble together an example, but I am unable to share the private repo where this is an issue.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:11
Top Results From Across the Web
hapi/vision package causes error with swagger ui · Issue #598
Issue Swagger UI fails when @hapi/vision package is installed but works when vision package is installed.
Read more >Can't read from file issue in Swagger UI - Stack Overflow
I was having issues to integrated Swagger with our OData endpoints (using ODataController for API and Swashbuckle.OData NuGet package). I had to write...
Read more >Troubleshooting issues when using Swagger as a REST API ...
One of the following errors is displayed: Failed to load API definition on Swagger UI Or Possible cross-origin (CORS) issue ...
Read more >REST API Documentation Tool | Swagger UI
Swagger UI allows development team to visualize and interact with the API's resources without having any of the implementation logic in place. Learn...
Read more >Get started with Swashbuckle and ASP.NET Core
NET Core web API project to integrate the Swagger UI. ... AspNetCore" package from the Browse tab and click Install.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Spencer814 i will try and recreate the issue using the example you posted. Much appreciated.
Closing since have not been able to reproduce. Please reopen if the issue persist.