'Playwright with Cucumber error creating context with storageState from file

Trying to create a new context with preivously saved storageStage file, is throwing an error. Cookie should have a valid expires, only -1 or a positive number for the unix timestamp in seconds is allowed at captureRawStack (C:\\tmp\\myProject\\node_modules\\playwright-core\\lib\\utils\\stackTrace.js:64:17)

In BeforeAll hook, I'm login to Microsoft Azure AD and the storageState file saved looks pretty.

But creating the context with storageStage option pointing to the saved file result in the error.

I'm not using playwright test runner, I'm integrating playwright with cucumber.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source