aws-mobile-appsync-sdk-js icon indicating copy to clipboard operation
aws-mobile-appsync-sdk-js copied to clipboard

Cannot read property 'error' of null in realtime-subsription-handshake-link.js

Open simonbuerger opened this issue 4 years ago • 0 comments

Seems to happen after leaving app open for an extended period (eg in simulator, but I have seen it on device too) and observer is set to null when it tries to call observer.error

Think it might be this line, but I noticed there's no null check on any of the observer.error calls https://github.com/awslabs/aws-mobile-appsync-sdk-js/blob/f5c6e1a1be0bfa43fce5615deefe3a8777374268/packages/aws-appsync-subscription-link/src/realtime-subscription-handshake-link.ts#L722

Can I open a PR and add null checks for the observer.error calls?

simonbuerger avatar Oct 21 '21 06:10 simonbuerger