Skip to content
This repository has been archived by the owner on Nov 28, 2021. It is now read-only.

False positive appointment if "termine" screen is too slow #30

Closed
mkoderer opened this issue May 13, 2021 · 15 comments · Fixed by #32 or #34
Closed

False positive appointment if "termine" screen is too slow #30

mkoderer opened this issue May 13, 2021 · 15 comments · Fixed by #32 or #34
Labels
bug Something isn't working

Comments

@mkoderer
Copy link
Contributor

In case the Termine screen is still building up it if statement 1 wrongly matches.

Currently the system seems to be very slow. This is the reason this state could take some seconds:
image

@mkoderer
Copy link
Contributor Author

mkoderer commented May 13, 2021

I have a fix for this but I would need to get #29 resolved first.

@ghost
Copy link

ghost commented May 16, 2021

Bug is still not fixed!

@mkoderer
Copy link
Contributor Author

Hi @marcoklein, I really believe the logic is incorrect.
It should be logical AND and not OR.
I pushed my latest changes here:
https://github.com/mkoderer/impftermin/commit/004f7b3afcc04175960d33415d449d11d2a162a6

This worked for me at least.. but testing this is really tricky these days.

@marcoklein
Copy link
Owner

Okay, then I am reopening this issue. I thought the logic worked for me.. Maybe the website has changed?

@marcoklein marcoklein reopened this May 16, 2021
This was referenced May 17, 2021
marcoklein added a commit that referenced this issue May 17, 2021
* Addapt logic for appointments

If the system is slow the screen "Termine werden gesucht"
will stay for a long time. This is currently detected as
valid appointment.

Adapt the logic which used OR instead of AND.
Please note that I didn't had any successful hit so far.

Closes #30

* feat: adjust logging message

Co-authored-by: Marc Koderer <marc@koderer.com>
@marcoklein
Copy link
Owner

Thanks for your proposed change.. As you say it is hard to test - but looks better with the adjusted logic. I can't test it cause I got no code but I left the debug statements in place. Please let me know if this works now.

@mkoderer
Copy link
Contributor Author

Thanks - I hope someone could attach the debug log in case of a hit.

@Whindu
Copy link

Whindu commented May 17, 2021

With code the output looks like this:

impftermin:zentrum Performing a check for location with url https://xxx-iz.impfterminservice.de/impftermine/service?plz=xxxxx +30s
impftermin:appointments Checking impf location https://xxx-iz.impfterminservice.de/impftermine/service?plz=xxxxx +267ms
impftermin:appointments We are no longer in the waiting room +673ms
impftermin:appointments Checking with existing code xxxx-xxxx-xxxx +1s
impftermin:appointments No appointments +28s
impftermin:appointments DEBUG: appointmentText=  Derzeit stehen leider keine Termine zur Verfügung.

Die Impfzentren stellen regelmäßig neue Termine ein. Bitte prüfen Sie zu einem späteren Zeitpunkt mit Hilfe Ihres Vermittlungscodes, ob wieder Termine zur Verfügung stehen. +0ms

@Whindu
Copy link

Whindu commented May 18, 2021

With code but too slow web site and wrong assumption an appointment would be available:

impftermin:appointments Checking impf location https://xxx-iz.impfterminservice.de/impftermine/service?plz=xxxxx +378ms
impftermin:appointments We are no longer in the waiting room +6s
impftermin:appointments Checking with existing code xxxx-xxxx-xxxx +1s
impftermin:appointments Appointments available!! +33s
impftermin:appointments DEBUG: appointmentText=undefined +0ms

The site stopped before the klick on the button "Termine suchen"

@mkoderer
Copy link
Contributor Author

Thanks @Whindu. Have you captured the HTML source by any chance?
I saw this "undefined" appointmentText also for a valid hit.
So better to have a false alert than a missed hit..

@marcoklein unfortunately I would suggest to open the issue again.

@Whindu
Copy link

Whindu commented May 18, 2021

No, only the log output.

@marcoklein marcoklein reopened this May 18, 2021
@mhl66
Copy link

mhl66 commented May 18, 2021

Sorry, there seems to be no reproducible cause (whether the browser window is "slow" or anything). It is very annoying to wake up in the middle of the night.

@mkoderer
Copy link
Contributor Author

The real annoying thing is that the impfterminservice is absolutely unusable and unreliable these days.
For me it worked over night - could be related to the load of the service.

I tried to debug it today but had no success. I think we need to add more logging to find the root cause.

@marcoklein
Copy link
Owner

I currently see no effective way of avoiding false positives.. One way might be to check if the 'actual' appointments available page shows up. However, I do not have the HTML for this to implement the necessary steps. The risk with this is also that the impfterminservice.de site changes and you would get false negatives then (so you never get notified).

From my experience the tool yields a couple of appointments (also with code) during the day - however, this highly depends on the locations you choose. I am leaving this open for further discussions but see no effective fix for now.

@mkoderer
Copy link
Contributor Author

@marcoklein what we could do is log the full html in case of appointmentText == undef.
With that it would be easier to adapt the logic.

@marcoklein
Copy link
Owner

Yes that would be an option. I'll look into this if I find time but feel free to implement the log change.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
4 participants