Closed fraz3alpha closed 1 year ago
Ah, that's a bit of a shame. I was hoping you might solve that but at least it's an explanation! At least it's possible to run locally, I guess.
I'm trying to host a set of static pages from the repository that I've pulled down myself, and making them available via an nginx container - limited success so far, I'm being thwarted by the use of HTTPS requests, but maybe I'll work something out.
On Thu, 19 May 2022, 22:20 Russell Boyatt, @.***> wrote:
Ah, that's a bit of a shame. I was hoping you might solve that but at least it's an explanation! At least it's possible to run locally, I guess.
— Reply to this email directly, view it on GitHub https://github.com/fraz3alpha/running-challenges/issues/333#issuecomment-1132217858, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAVIFWYH76WFTLS7IFJTMZTVK2WB7ANCNFSM5WNLAGPA . You are receiving this because you authored the thread.Message ID: @.***>
One thing that has become apparent is that the error messages that get printed to the page aren't good enough to debug it when you don't have the developer console available! The 'ol Error: Object message isn't useful. I think the next bit I have to solve is that I was getting away with hosting the parkrun page under http (because I could change it in the test), but the volunteer data is always (sensibly) fetched from Https, as per good practice, so now I'm back to needing to work around that.
Good news, I think I've got something that might be working - it's hosting a copy of the page I've pulled down myself, and committed to the repo. It generates a certificate as part of the action, and then the test ignores the fact that cert isn't signed by a CA.
Currently it's testing the UK site and the German site - UK one works, German one doesn't because the extension is a little broken in this branch
Well, it's not perfect, but it does seem to be showing promise
Edit: Oh wait, no I'm wrong, the German one works properly, it's the UK one that was giving errors for some reason
Neat, that sounds great. What errors are you hitting on the UK site?
It turns out that the UK parkrun site tests worked fine when I re-ran it, so perhaps we are on to a winner here after all: https://github.com/fraz3alpha/running-challenges/actions/runs/2360821943
OK, I've merged my first PR to get things working, it'll run the parkrun.org.uk and parkrun.com.de tests.
I think in order to fully insulate ourselves from the vagaries of the parkrun website not working at various points, and the tests being flaky, we should keep a mock copy of all the pages, and have to periodically manually update them until we can work on something that checks the differences between our test pages, and what is live on the parkrun website. This does unfortunately mean that we aren't testing to check if the extension works with the current parkrun site, but we are at least testing the extensions isn't completely broken before we publish it.
Implemented some testing in https://github.com/fraz3alpha/running-challenges/pull/379
I guess it was probably inevitable, the parkrun website blocks our automated tests through Selenium via Github Actions
It does work just fine on my laptop, so I suspect it's a source IP thing, unless somehow the user-agent is showing up as something different when run from within the Github Actions environment
I've spent so long trying to get the tests to work, they've caught up with us!
I suspect it might be an AWS WAF: https://medium.com/webstep/lets-confirm-you-are-human-5c3341012187 , in which case, I don't think there is a lot I can do because they probably have a lot of traffic coming from Github IPs and they are known to be automation, and are triggering the human test regardless of the amount of traffic.