Closed f1348y73 closed 2 years ago
Hello, ok, shame on me! This is what happens when you copy too much.
BR
how much time does it take to start reading emails from your inbox after setting this up? I also got the same localhost error, I copied the code from URL and passed it to the requested place.
Hello everyone,
I'm currently looking for ways to check emails within cypress and came across this library. Since I encountered a problem in my test project, I thought it might be due to the cypress version (10.3.1). So I cloned the gmail-tester repository and tried the cypress example inside. Steps:
path.resolve(__dirname, "../../credentials.json"),
path.resolve(__dirname, "../../gmail_token.json.json")
If I now run gmail.spec.js the console shows (see last line):
:
Authorize this app by visiting this url: https://accounts.google.com/o/oauth2/v2/auth?access_type=offline&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fgmail.readonly&response_type=code&client_id= 94167587089-mclmf5ic7i2uk8sbtv0v1umvq1rcju9b.apps.googleusercontent.com&redirect_uri=urn%3Aietf%3Awg%3Aoauth%3A2.0%3Aoob
Enter the code from that page here:
:
Here the console stops and the cypress test runs into a timeout. I have this behavior in my test project with Cypress V. 10.3.1 and gmail-test ^1.3.5 but also in the example project from https://github.com/levz0r/gmail-tester with Cypress ^5.1.0 and gmail- testing ^1.3.5.
Does anyone know what I'm doing wrong?
One more point: There is a ticket here from 07/22/2022 Title: localhost redirect (https://github.com/levz0r/gmail-tester/issues/97). Is it maybe because of the credentials.json? In each example, after the download, the JSON file contains:
"redirect_uris": [ "urn:ietf:wg:oauth:2.0:oob", "http://localhost" ]
If I download the JSON file, urn:ietf:wg:oauth:2.0:oob is not included and I enter it manually. Without this entry I had the same behavior as https://github.com/levz0r/gmail-tester/issues/97So maybe it's because of that or something else? I'm grateful for any advice!
Best regards