ERROR Error: Uncaught (in promise): TypeError: Cannot assign to read only property 'readyState' of object"
JeCap opened this issue · comments
Describe the bug
In different situations (timeout/connections lost/network disconnected) it is written on "readonly" member on a trusted event object and exceptions are thrown.
To Reproduce
Steps to reproduce the behavior:
- Open chrome console log
- Force a 45s timeout (Set server heartbeat to 120s)
- See errors
- Exception "No activity within 45000 milliseconds" is ok and caught.
- Exception "ERROR Error: Uncaught (in promise): TypeError: Cannot assign to read only property 'readyState' of object" is NOT ok and not caught.
Expected behavior
No exception at this point and do not try to write on read only, trusted objects
Screenshots
This is not trusted event object, just the plain EventSourcePolyfill object.
Have you made the property read-only somehow? var es = Object.freeze(new EventSource(...)) ?
or you have created a read-only property Object.prototype.readyState...
This is not trusted event object, just the plain EventSourcePolyfill object.
Have you made the property read-only somehow? var es = Object.freeze(new EventSource(...)) ?
or you have created a read-only property Object.prototype.readyState...
Sorry, my mistake. Too many open repositories(forks) for "EventSource" at the same time. I post this issue in the wrong repo.
I used a fork of "EventSource" (https://github.com/sguiheux/EventSource) with Angular 11. I'm now trying to integrate this implementation.
thx4hlp