react-context-devtool icon indicating copy to clipboard operation
react-context-devtool copied to clipboard

TypeError: Cannot set properties of undefined (setting 'hook')

Open mark-night opened this issue 2 years ago • 2 comments

Describe the bug Getting mass TypeError: Cannot set properties of undefined (setting 'hook') error messages in an app with many React Contexts. Most were traced to this line. I haven't taken a deep look (am in a tight schedule), but it might be worth having some fallback value for debugObj 2 lines above where it was initialized.

To Reproduce The issue was discovered in a complex react project that has many react contexts, not sure which component was the source component that led to this issue, kinda hard to set up a simple project just try to reproduce the issue. But I did find some detail (described above) that might explain the issue a bit, if that'd be helpful.

Expected behavior debugObj in the source code should be guaranteed to be a defined object when assigning value to its .hook property.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: macOS 13.2.1
  • Browser: Chrome Version 110.0.5481.177 (Official Build) (x86_64)
  • Extension version: 3.5

Additional context Add any other context about the problem here.

mark-night avatar Mar 06 '23 22:03 mark-night

I am seeing this too

somewhatabstract avatar Jun 01 '23 17:06 somewhatabstract

Thanks for reporting the issue. will check and update here when fixed.

deeppatel234 avatar Jul 30 '23 15:07 deeppatel234

@somewhatabstract @mark-night

Please update your extension to latest version and check.

Closing this issue. please re-open if you still found this issue

deeppatel234 avatar Jun 21 '24 06:06 deeppatel234