React, Redux Tutorials Tests are not executing

Getting below error in console while running test for all the react, redux tutorials:
I am using Chrome Version 77.0.3865.120 (Official Build) (64-bit).
Seeing this issue for last 2 days.

Uncaught (in promise) TypeError: Cannot read property 'call' of undefined
    at o (VM418 frame-runner.js:1)
    at Object.<anonymous> (VM426 vendors~enzyme~enzyme-adapter.js:8)
    at Object.<anonymous> (VM426 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM418 frame-runner.js:1)
    at Object.<anonymous> (VM426 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM418 frame-runner.js:1)
    at Object.<anonymous> (VM426 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM418 frame-runner.js:1)
    at Object.<anonymous> (VM426 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM418 frame-runner.js:1)

Your code so far


const JSX = <div></div>;

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.120 Safari/537.36.

Challenge: Create a Simple JSX Element

Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/react/create-a-simple-jsx-element

Make sure you are using Chrome or Firefox. Safari does not work well with these challenges.

I’ve been having the same issue. Im using Chrome. I think it’s related to bootstrap?

Uncaught (in promise) TypeError: Cannot read property 'call' of undefined
    at o (VM520 frame-runner.js:1)
    at Object.<anonymous> (_stream_readable.js:72)
    at Object.<anonymous> (vendors~enzyme~enzyme-adapter.js:8)
    at o (VM520 frame-runner.js:1)
    at Object.<anonymous> (readable-browser.js:1)
    at o (VM520 frame-runner.js:1)
    at Object.<anonymous> (index.js:28)
    at o (VM520 frame-runner.js:1)
    at Object.<anonymous> (parser_stream.js:3)
    at o (VM520 frame-runner.js:1)
o	@	bootstrap:63
(anonymous)	@	_stream_readable.js:72
(anonymous)	@	vendors~enzyme~enzyme-adapter.js:8
o	@	bootstrap:63
(anonymous)	@	readable-browser.js:1
o	@	bootstrap:63
(anonymous)	@	index.js:28
o	@	bootstrap:63
(anonymous)	@	parser_stream.js:3
o	@	bootstrap:63
(anonymous)	@	index.js:41
o	@	bootstrap:63
(anonymous)	@	parse.js:5
(anonymous)	@	vendors~enzyme~enzyme-adapter.js:1
o	@	bootstrap:63
(anonymous)	@	cheerio.js:5
o	@	bootstrap:63
(anonymous)	@	index.js:5
o	@	bootstrap:63
(anonymous)	@	ReactWrapper.js:15
(anonymous)	@	vendors~enzyme~enzyme-adapter.js:8
o	@	bootstrap:63
(anonymous)	@	index.js:3
o	@	bootstrap:63
o.t	@	bootstrap:161

I am using Chrome Version 77.0.3865.120 (Official Build) (64-bit).
Seeing this for last 2 days in more than one device.

Will need to see your full code for the challenge then.

This is code from challenge :https://www.freecodecamp.org/learn/front-end-libraries/react/create-a-simple-jsx-element
My full code : const JSX = <h1>Hello JSX!</h1>;
When i click button Run The Tests!
// running tests message comes and the error popus up in browser console and nothing happens.
Error is there for all react and redux challenges

It could be worth clearing your browser’s cache. So, for Chrome, please open the dev console (f12), click on the ‘Network’ tab and then make sure the ‘Disable cache’ box is ticked. Once you’ve done that, reload the page and try to run the tests again. You should see something like this:


in the Network tab.

If that doesn’t fix it (or even if it does) please let us know what happens.

@ojeytonwilliams I tried your suggestion and still not able to pass the tests with valid code.

@ojeytonwilliams
The suggestion is not working for me too.
I have tried in multiple computers, windows and mac os and is also facing issue in chrome and firefox browsers.

This seems like a caching issue. I noticed that our webpack config for the client/src/client (workers, frame-runner, etc) do not create a hashed binary. A recent PR seems to have updated the enzyme package. But webpack builds a non-hashed version '[name].js' instead of '[name].[hash].js'

Our CDN caching aggressively caches JavaScript and this is the root cause. As an immediate fix I have invalidated our cache, which means a perf hit to us.

But the real issue is we need to see why webpack is behaving like it is. Can someone please report a GitHub issue for tracebility and add it here in comments.

Thanks.

Just to add Gatsby’s webpack config is indeed generating the hashed binaries, its our internal webpack config using the webpack-cli wiring that is not playing well.

Since we are on Cloudflare we are able to aggressively cache all JavaScript for fast load times but we need them to be hashed for invalidation. Now, as seen since some of the JS binaries do not have the hash, its most likely breaking the UX.

Anyways the manual invalidation from my end on the CDN should have fixed this for now, but we want to fix the config to avoid doing that again.

Tell us what’s happening:

Your code so far


const ChildComponent = () => {
return (
  <div>
    <p>I am the child</p>
  </div>
);
};

class ParentComponent extends React.Component {
constructor(props) {
  super(props);
}
render() {
  return (
    <div>
      <h1>I am the parent</h1>
      { /* change code below this line */ }
        <ChildComponent/>
       

      { /* change code above this line */ }
    </div>
  );
}
};

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36.

Challenge: Create a Component with Composition

Link to the challenge:
https://www.freecodecamp.org/learn/front-end-libraries/react/create-a-component-with-composition

Are you receiving any error messages?

Nope never received any errors. Checking the console in chrome though brings up an error…

Uncaught (in promise) TypeError: Cannot read property 'call' of undefined
    at o (VM250 frame-runner.js:1)
    at Object.<anonymous> (VM256 vendors~enzyme~enzyme-adapter.js:8)
    at Object.<anonymous> (VM256 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM250 frame-runner.js:1)
    at Object.<anonymous> (VM256 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM250 frame-runner.js:1)
    at Object.<anonymous> (VM256 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM250 frame-runner.js:1)
    at Object.<anonymous> (VM256 vendors~enzyme~enzyme-adapter.js:8)
    at o (VM250 frame-runner.js:1)` 

I’ve just copied your code and it passed.

If I click on “run test” it doesn’t complete. It is really weird.

I am having the same issue in the React section. “Run the test” button is not working…

I copied your code and it passed. Maybe it’s a bug specific to your browser/OS?

I do get this in the console everytime I run the tests:
act(...) is not supported in production builds of React, and might not behave as expected.

@Ne0nWinds What browser and version are you using?

Firefox 70 on Ubuntu