-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
addressed: query filter behaves differently inside WSL Ubuntu environment than on Windows and Mac #382
Comments
Hi @GrayedFox. I can't speak for WSL Ubuntu as I do not run Windows (but I do run Ubuntu), nor rule out whether WSL is or isn't the cause of your issue, or whether it is something in your JS library - but your report is very confusing for me to follow. I'm sure it makes perfect sense to you as you understand the context though ;-) Firstly I do not understand why you would be looping the same search again and again for up to 30 times, and why the example of successfully finding an email only finds it on the 4th attempt? Is this because you're polling the API before the email arrives? Assuming that assumption is correct, does the message actually arrive in Mailpit in the WSL environment within the 30 attempts (ie: you can see it in the web UI)? Secondly, to help me to help you, the test needs to be simplified, and we need to eliminate all third part tooling (ie: the JS library):
I this issue can be reproduced within Mailpit natively, then that narrows down the issue. If it can't be reproduced in Mailpit directly, then you can continue to debug your JS library etc. Once I can reproduce the error then I should be able to say more, until then I'm just left with more and more questions :) |
@axllent cleaned up the original post a bit! Included logs the first time round just to demo that that query does indeed work but I see that this ended up being a bit noisy.
Event based arch with a lot going on, at the moment there's no easy or straight forward way to signal to the client that all necessary backend async ops have finished that mean the "email has been sent" - polling mailpit means the specs are more agnostic about the AUT, hence choosing that approach.
Yes.
Have eliminated all but PlayWright which runs the spec, I can write a sample PlayWright spec if you like? If this is a bug on the MailPit end I think any SMTP service will do, is that something you're fine to setup on your end? I can provide a full minimal reproduction sample in a repo but likely not until some time next week - all good if you just want to wait until then before further debugging, I'm a bit time poor at the moment but happy to do that so you can spend your time/energy on the investigation part instead of the reproduction part 🙇🏽 |
Thanks for the response/clarification @GrayedFox - I totally get the "time poor" situation (I have the same) :) If I understand the error correctly, your suspicion is that the Mailpit API is responding differently with Maybe an easy test for you to do is to do the following after your search for the message fails in Ubuntu:
If the web UI also returns no matches (while using
If, however, the web UI does return the match (which the automation fails to detect), then you should continue debugging the automation itself, as that's where the difference is. It could be something as simple as different utf8 encoded quotes in your scripts or a hidden character somewhere (just an example). As far as I can tell, the Take your time next week is fine, and we can take it from there based on your findings. |
Hello there! Big fan of mailpit, thanks.
The issue we've surfaced today is that for some reason, when we run specs on Windows (natively) or Mac OS we see the query string using
addressed: $email
works fine, but inside the WSL Ubuntu env it fails to match any messages. This issue occurs locally, that is, when running against a local mailpit API and against a local stack.The search query string that doesn't work in the WSL Ubuntu env is:
Changing it to the following works around the issue:
We use this utility method to hit the search endpoint:
And it's called like so:
If this really is a bug on the mailpit end I imagine it could be minimally reproduced simply by sending a test email with a specific subject, that uses a plus address, and using the following call:
The text was updated successfully, but these errors were encountered: