Issue
I am getting the following error when testing my Ionic Angular app with Firebase when I try to log in.
"Failed to get document because the client is offline"
The app is hosted on http://localhost:8100/ and works fine with the same login details used manually. The Cypress testing was working fine last time I did it about a month ago. I have not changed any code/packages in the app since then.
Any suggestions on what this could be? Could it be
- Related to my internet connection
- Something about the app or Cypress
- Something changed on the Firebase backend
- Other
My Ionic Angular app is using Firebase 8.2.5 with Angularfire 6.1.5 and Cypress 12.9.0.
Solution
Turns out it was 2 the cypress test code. I had to remove the following:
cy.intercept({ resourceType: /xhr|fetch/ }, { log: false })
And add the following:
cy.wrap(Cypress.automation('remote:debugger:protocol', {
command: 'Network.clearBrowserCache',
}))
indexedDB.deleteDatabase('firebaseLocalStorageDb');
to the beforeEach(() =>
Answered By - MadMac
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.