codesandbox / codesandbox/codesandbox-client
Hot reloading fails: TypeError: Cannot read property 'Ctor' of undefined
Open
Nobody has claimed this yet.
🎒 Bundler
🐛 Bug
- Dominant language
- JavaScript
- Stars
- 13.6k
- Forks
- 2.4k
- Avg merge
- 6d 19h
- Merged PRs (30d)
- 2
Description
🐛 bug report
Description of the problem
A previously working Codesandbox is now crashing with:
Cannot read property 'Ctor' of undefined
sandbox.115b0c69.js:1 TypeError: Cannot read property 'Ctor' of undefined
at VueComponent.eval (eval at de (sandbox.115b0c69.js:1), :88:19)
at invokeWithErrorHandling (VM3644 vue.common.dev.js:1859)
at callHook (VM3644 vue.common.dev.js:4210)
at VueComponent.Vue._init (VM3644 vue.common.dev.js:4988)
at new VueComponent (VM3644 vue.common.dev.js:5137)
at createComponentInstanceForVnode (VM3644 vue.common.dev.js:3286)
at init (VM3644 vue.common.dev.js:3117)
at createComponent (VM3644 vue.common.dev.js:5963)
at createElm (VM3644 vue.common.dev.js:5910)
at VueComponent.patch [as __patch__] (VM3644 vue.common.dev.js:6460)
at VueComponent.Vue._update (VM3644 vue.common.dev.js:3936)
at VueComponent.updateComponent (VM3644 vue.common.dev.js:4057)
at Watcher.get (VM3644 vue.common.dev.js:4468)
at new Watcher (VM3644 vue.common.dev.js:4457)
at mountComponent (VM3644 vue.common.dev.js:4064)
at VueComponent.Vue.$mount (VM3644 vue.common.dev.js:9034)
at VueComponent.Vue.$mount (VM3644 vue.common.dev.js:11919)
at mount (vue-test-utils.js:6187)
at shallowMount (vue-test-utils.js:6218)
at Object.eval (MyComponent.spec.js? [sm]:11)
at vendors~sandbox.b6b2495b.chunk.js:310
at new Promise ()
at t.callAsyncFn (vendors~sandbox.b6b2495b.chunk.js:310)
at sandbox.115b0c69.js:1
at g (common-sandbox.52624a55.chunk.js:15)
at Generator._invoke (common-sandbox.52624a55.chunk.js:15)
at Generator.e. [as next] (common-sandbox.52624a55.chunk.js:15)
at o (common-sandbox.52624a55.chunk.js:15)
at u (common-sandbox.52624a55.chunk.js:15)
at common-sandbox.52624a55.chunk.js:15
at new Promise ()
at common-sandbox.52624a55.chunk.js:15
at sandbox.115b0c69.js:1
at sandbox.115b0c69.js:1
at g (common-sandbox.52624a55.chunk.js:15)
at Generator._invoke (common-sandbox.52624a55.chunk.js:15)
at Generator.e. [as next] (common-sandbox.52624a55.chunk.js:15)
at o (common-sandbox.52624a55.chunk.js:15)
at u (common-sandbox.52624a55.chunk.js:15)
at common-sandbox.52624a55.chunk.js:15
at new Promise ()
at common-sandbox.52624a55.chunk.js:15
at sandbox.115b0c69.js:1
at sandbox.115b0c69.js:1
at g (common-sandbox.52624a55.chunk.js:15)
at Generator._invoke (common-sandbox.52624a55.chunk.js:15)
at Generator.e. [as next] (common-sandbox.52624a55.chunk.js:15)
at o (common-sandbox.52624a55.chunk.js:15)
at u (common-sandbox.52624a55.chunk.js:15)
at common-sandbox.52624a55.chunk.js:15
Related: #1329
How has this issue affected you? What are you trying to accomplish?
This prevents me from running unit tests in Codesandbox.
Link to sandbox: link
Your Environment
| Software | Name/Version |
|---|---|
| Сodesandbox | PROD-1559903240-93ff18a72 |
| Browser | Chrome Version 74.0.3729.169 (Official Build) (64-bit) |
| Operating System | macOS Mojave 10.14.5 |
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The report points to the linked CodeSandbox and MyComponent.spec.js; begin by reproducing the failure in the test preview and inspect the component mount path shown in the stack trace. Done means the sandbox hot-reloads and its unit tests run without the “Ctor” TypeError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100