reactpy icon indicating copy to clipboard operation
reactpy copied to clipboard

Prevent JavaScript components from crashing ReactPy by adding error boundaries

Open Archmonger opened this issue 3 years ago • 4 comments
trafficstars

Current Situation

Currently, if an invalid hook call occurs then ReactPy completely breaks.

Reference

  • #646
  • #610

Proposed Actions

Add an error boundary to tree nodes to prevent complete failure upon tree exceptions. Probably only want to apply this to things that have been exported via module_from_template(...). We have no reason to assume this exception can happen with any pure ReactPy code.

Archmonger avatar Feb 17 '22 03:02 Archmonger

I've had this happen once again, despite pinned versions of react bootstrap. I'm still not entirely sure why this occurs.

A potential solution is naming the files on disk based on a calculated hash, rather than NPM package name.

Archmonger avatar Mar 25 '22 06:03 Archmonger

Since this can break idom until the user clears his browser cache, I'm going to change the priority/milestone for this.

Archmonger avatar Mar 25 '22 06:03 Archmonger

@rmorshea This seems to be almost a weekly breaking issue for me, assuming that I'm not clearing cache on each page load.

The only way I've found to replicate this issue is very artificial and I'd almost expect it to fail. The less consistent but more realistic way involves me just waiting for it to randomly happen.

Archmonger avatar Apr 04 '22 06:04 Archmonger

Related to:

  • #646

Archmonger avatar Apr 16 '22 07:04 Archmonger