codesandbox / codesandbox/codesandbox-client

The Cannot read properties of undefined (reading 'renderers') error occurs on loading sandbox

Open
#8,771 27 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
13.6k
Forks
2.4k
Avg merge
6d 19h
Merged PRs (30d)
2

Description

🐛 bug report

Preflight Checklist

  • [ x ] I have read the Contributing Guidelines for this project.
  • [ x ] I agree to follow the Code of Conduct that this project
    adheres to.
  • [ x ] I have searched the issue tracker for an issue that matches the one I want
    to file, without success.

Description of the problem

Some examples with devextreme / devextreme-angular packages fail to load with the following error:
Cannot read properties of undefined (reading 'renderers')

Stack:

VM45:8 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'renderers')
    at Gi.getRendererIndex (eval at W (preview-protocol.js:2:61), <anonymous>:8:58136)
    at Gi.getFibers (eval at W (preview-protocol.js:2:61), <anonymous>:8:58454)
    at Gi.hasSourceInfo (eval at W (preview-protocol.js:2:61), <anonymous>:8:58605)
    at Object.enabled (eval at W (preview-protocol.js:2:61), <anonymous>:8:61806)
    at cp (eval at W (preview-protocol.js:2:61), <anonymous>:8:62428)
    at c.handleCodeInjection (preview-protocol.js:2:921)
    at s (preview-protocol.js:2:504)

Also the following errors may appear

[BABEL] Note: The code generator has deoptimised the styling of /node_modules/@angular/core/fesm2022/core.mjs as it exceeds the max of 500KB.
(anonymous)	@	babel.7.21.8.min.js:1
t	@	babel.7.21.8.min.js:1
Hm	@	babel.7.21.8.min.js:1
ZG	@	babel.7.21.8.min.js:14
(anonymous)	@	babel.7.21.8.min.js:14
l	@	babel.7.21.8.min.js:1
(anonymous)	@	babel.7.21.8.min.js:1
(anonymous)	@	babel.7.21.8.min.js:1
l	@	babel.7.21.8.min.js:1
D	@	babel.7.21.8.min.js:1
(anonymous)	@	babel.7.21.8.min.js:1
(anonymous)	@	babel.7.21.8.min.js:1
MB	@	babel.7.21.8.min.js:7
sync	@	babel.7.21.8.min.js:7
stopHiding - secret - don't use this - v1	@	babel.7.21.8.min.js:7
oV	@	babel.7.21.8.min.js:14
Kve	@	babel.7.21.8.min.js:14
(anonymous)	@	babel-worker.ts:518
n	@	asyncToGenerator.js:3
a	@	asyncToGenerator.js:22
(anonymous)	@	asyncToGenerator.js:27
(anonymous)	@	asyncToGenerator.js:19
Qe	@	babel-worker.ts:501
(anonymous)	@	babel-worker.ts:798
n	@	asyncToGenerator.js:3
a	@	asyncToGenerator.js:22
Promise.then		
n	@	asyncToGenerator.js:12
a	@	asyncToGenerator.js:22
(anonymous)	@	asyncToGenerator.js:27
(anonymous)	@	asyncToGenerator.js:19
(anonymous)	@	babel-worker.ts:789
(anonymous)	@	child-handler.ts:97
n	@	asyncToGenerator.js:3
a	@	asyncToGenerator.js:22
(anonymous)	@	asyncToGenerator.js:27
(anonymous)	@	asyncToGenerator.js:19
handleCallRequest	@	child-handler.ts:89
(anonymous)	@	child-handler.ts:64
n	@	asyncToGenerator.js:3
a	@	asyncToGenerator.js:22
(anonymous)	@	asyncToGenerator.js:27
(anonymous)	@	asyncToGenerator.js:19
handleMessage	@	child-handler.ts:44
(anonymous)	@	child-handler.ts:28
Additional information:

The issue doesn't occur for all users. Some are not affected for unknown reason
The issue can be fixed if you "fork" an example again

How has this issue affected you? What are you trying to accomplish?

We're sharing CSB sandboxes samples to our clients on demand

To Reproduce

Run a sample to see that Preview never displayed on the first load and the error occurs

Link to sandbox: link
Image
Your Environment
Software Name/Version
Сodesandbox n/a
Browser Chrome Version 138.0.7204.93 (Official Build) (arm64)
Operating System Mac OS Sequoia 15.5

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure in the linked CodeSandbox example and trace the stack through preview-protocol.js, babel-worker.ts, and child-handler.ts. Compare the initial load with a forked example, and consider the issue done when the Preview loads on the first attempt without the renderers error for the affected examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, javascript
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.