React, Redux Tutorials Tests are not executing

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.

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
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.

Firefox 70 on Ubuntu

Hey @HystericalMisfit do you confirm you’re using Google Chrome? What’s the operational system?

I am using chrome on windows 10, I have also tried on 2 other PCs and the same problem. but it is only in the React section.

1 Like

We have just invalidated our CDN cache to fix this, can you all please try and check again? Here is a thread if you want to learn more:

Hi, I have just checked and it still is not working. I have tried the next tutorial as well and the same result.

Hi @HystericalMisfit can you please share your country and region (general area / city should be fine)? I will check once again, but I believe we have invalidated all the caches on our CDN servers.