-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
[Bug]: Auth Setup File Not Being Found #31347
Comments
@joshmgrant Could you please share a full repro with us? I suspect this is related to import path from 'path';
test.use({ storageState: path.resolve(__dirname, '../../playwright/.auth/gmail.json') }) |
Here is my
|
@joshmgrant Unfortunately, we cannot repro with just a single file. We need to run the whole example, so need the whole project. Did you have a chance to try the absolute path suggestion? |
Let me try the absolute path suggestion. I can see if I can get a repo but it might take some work. |
Hello again. I tried an absolute file path and it doesn't seem to work. I'm also unable to share more than the config file above. |
In this case we won't be able to help, unfortunately. I'll leave this issue open for a few days, just in case you'd come up with a reproduction. Looking at the snippet above, it seems like you'd skip both |
@dgozman Hi again, thanks for the help. I've created a repo that hopefully reproduces the issue |
Just to add: I ended up deleting the |
Ok, turns out I can simply regenerate |
Version
1.44.1
Steps to reproduce
test.use({ storageState: 'playwright/.auth/gmail.json' });
in the spec fileplaywright test
Expected behavior
I expect tests to use the
test.use
storage state based on the .json file and login appropriately as needed.Actual behavior
Tests fail immediately with an error
Additional context
I have validated that the .auth file in question exists. This error occurs on developer machines, and so authentication does work but fails intermittently. As well, there are multiple auth setup functions to use multiple roles in testing based on this documentation
.
Environment
The text was updated successfully, but these errors were encountered: