-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error: Cannot read property 'headers' of undefined in Client.js when offline #389
Comments
the issue is quite obvious and easy to see in the code (Client.js)
the response object is defined with In one of our applications I have customer reports (sent through sentry.io) which describe the same error. I am not sure if it is related to an offline issue (their browser was able to send me the sentry.io report, so they should have been online somehow). It may occur when switching networks or trying to refresh tokens. |
Just stumbled into the same issue. The most disappointing part is that right now there is no way to catch that error. |
I solved it by downgrading |
This issue was fixed on this PR #605 |
This issue has been automatically locked since there hasn't been any recent activity after it was closed. Please open a new issue for related bugs. Looking for a help forum? We recommend joining the Amplify Community Discord server |
Do you want to request a feature or report a bug?
bug
What is the current behavior?
When CognitoUser refreshSession gets called while being offline, Client.js on line 67 tries to use an empty response object resulting in an uncaught error:
What is the expected behavior?
Returning null or throwing an error / rejecting.
Which versions of Amplify, and which browser / OS are affected by this issue? Did this work in previous versions?
aws-amplify 0.2.9
Linux (Ubuntu 16.04) in Chrome 64 and Electron 1.8.2
The text was updated successfully, but these errors were encountered: