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.

Build fails with "Cannot read property 'opId' of undefined"

See original GitHub issue

Q&A (please complete the following information)

  • OS: ubuntu
  • Browser: chrome
  • Version: 83.0.4103.97
  • Method of installation: npm
  • Swagger-UI version: 3.26.2
  • Swagger/OpenAPI version: Swagger 2.0, OpenAPI 3.0

Content & configuration

Describe the bug you’re encountering

Our UI builds suddenly stopped working today, failing at the start of karma tests with the error:

HeadlessChrome 83.0.4103 (Linux 0.0.0) ERROR
  Uncaught TypeError: Cannot read property 'opId' of undefined
  at webpack:///home/jamie/piper/api-builder/node_modules/swagger-ui/dist/swagger-ui.js:8:0 <- test/loadtests.js:269997

I noticed that swagger-ui hadn’t changed in a few days, however, swagger-client changed only 7 hours ago. I also noticed this change: https://github.com/swagger-api/swagger-ui/commit/e3b3bf03d46f7288371cc505a73f7a49b75da1db#diff-c85b6c9e099af384a182e638a811c734R4 from July 6th.

Maybe it is possible that the opId change to swagger-client was a breaking change?

To reproduce…

Expected behavior

Screenshots

Additional context or thoughts

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
char0ncommented, Jul 7, 2020

We’ve just released swagger-client@3.10.11 that rectifies the issue. Please rerun your build and the problem should autoresolve. If you already have swagger-client@3.10.10 embeded in your package-lock.json or yarn.lock files please uninstall swagger-ui and then install it again.

Again, thanks for reporting this guys!

0reactions
char0ncommented, Jul 7, 2020

swagger-client fixing PR addressing this issue provided here: https://github.com/swagger-api/swagger-js/pull/1631

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot Read Property of Undefined in JavaScript - Rollbar
TypeError : Cannot read property of undefined occurs when a property is read or a function is called on an undefined variable.
Read more >
ng build throws "ERROR in Cannot read property 'kind' of ...
So I found the solution. I had to go in and edit the tsconfig.json. Under "angularCompilerOptions" I had to add "enableIvy": false ....
Read more >
How to Prevent the Error: Cannot Read Property '0' of Undefined
A guide on how to prevent the error "cannot Read Property '0' of Undefined", covering techniques such as try, catch, using const over...
Read more >
Cannot read property 'error' of undefined - Microsoft Q&A
I opted free Azure subscription and Configured LUIS in bot composer. when I am trying to run code from composer I am getting...
Read more >
Error: Cannot read property "attach_url" from undefined
I am using Flow designer to trigger custom API call using an Action to get an output and attach it to the Incident...
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