Skip to content
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

Slots are already full but still getting captcha #27

Closed
akshay8043 opened this issue May 16, 2021 · 16 comments
Closed

Slots are already full but still getting captcha #27

akshay8043 opened this issue May 16, 2021 · 16 comments
Assignees
Labels
bug Something isn't working question Further information is requested
Milestone

Comments

@akshay8043
Copy link

image

I am trying since 15 minutes and it is still coming up again and again even after slots are full

@SRvSaha
Copy link
Owner

SRvSaha commented May 16, 2021

Hi @akshay8043, this is happening because there is some inconsistency in the the available_capacity field in the CoWIN API
as mentioned here: cowinapi/developer.cowin#234, cowinapi/developer.cowin#231, cowinapi/developer.cowin#224, cowinapi/developer.cowin#226
They have made changes in the API, so this is happening.

I have made fix of this in the latest commit, changes will be release as a part of v4.0.0 tonight.

Sorry for the inconvenience caused. Also, Captcha Popup was coming since the Available Capacity was shown as 25 which is greater than the Minimum Available Capacity set in Config File.

@SRvSaha SRvSaha added the question Further information is requested label May 16, 2021
@akshay8043
Copy link
Author

@SRvSaha Hi,

I am still getting this message even if you see on website the count is zero.

image

image

@SRvSaha
Copy link
Owner

SRvSaha commented May 16, 2021

Hi @akshay8043, if you just go to F12, Network -> XHR and then refresh the page will will see there is a request to /calenderByDistrict Endpoint.

Just go to the Response of that Request, you'll see that there is 0 available capacity for Dose 1 and available_capacity = 25, that is why you are getting the captcha prompt. Also, in the screenshot, you can see in CoWIN that "Search Results for Dose Type 1", so the Available Capacity of Dose Type 1 available_capacity_dose1 will be 0 in the repsonse JSON.

This is the latest change that have made in the API, so there is this inconsistency. I have made the fix with commit: 44da530 and the change will be released with v4.0.0 tonight.

Sorry for the inconvenience caused.

@SRvSaha SRvSaha pinned this issue May 16, 2021
@akshay8043
Copy link
Author

Hi @akshay8043, this is happening because there is some inconsistency in the the available_capacity field in the CoWIN API
as mentioned here: cowinapi/developer.cowin#234, cowinapi/developer.cowin#231, cowinapi/developer.cowin#224, cowinapi/developer.cowin#226
They have made changes in the API, so this is happening.

I have made fix of this in the latest commit, changes will be release as a part of v4.0.0 tonight.

Sorry for the inconvenience caused. Also, Captcha Popup was coming since the Available Capacity was shown as 25 which is greater than the Minimum Available Capacity set in Config File.

Hey,

Please don't be sorry, I am providing you just a feedback so that more people should not face the issue. Since morning I am trying multiple ways to get these application running.

I have now build new Linux VM for bombardier-gif app.

@SRvSaha SRvSaha added the bug Something isn't working label May 16, 2021
@akshay8043
Copy link
Author

Hi @akshay8043, if you just go to F12, Network -> XHR and then refresh the page will will see there is a request to /calenderByDistrict Endpoint.

Just go to the Response of that Request, you'll see that there is 0 available capacity for Dose 1 and available_capacity = 25, that is why you are getting the captcha prompt. Also, in the screenshot, you can see in CoWIN that "Search Results for Dose Type 1", so the Available Capacity of Dose Type 1 available_capacity_dose1 will be 0 in the repsonse JSON.

This is the latest change that have made in the API, so there is this inconsistency. I have made the fix with commit: 44da530 and the change will be released with v4.0.0 tonight.

Sorry for the inconvenience caused.

You are absolutely correct but I got the information from another cowin bot.

image

@SRvSaha
Copy link
Owner

SRvSaha commented May 16, 2021

@akshay8043 Thanks for the feedback. Changes will be deployed and you can try booking the slot using the App tomorrow.

@JnaneshPrabhu
Copy link

What changes are you doing @SRvSaha ? Will the available_capacity be made equal to available_capacity_dose_1 + dose2?

@SRvSaha
Copy link
Owner

SRvSaha commented May 16, 2021

@JnaneshPrabhu No, basically it will detect based on the Dose Type. If the Dose Type of the User is 1, then it will check the available_capacity_dose1, else available_capacity_dose2

@JnaneshPrabhu
Copy link

@SRvSaha But the public api is still showing wrong data if I am not wrong. Like for instance 201301 is showing same available capacity for 18+ from last 6 hrs I have been observing. How are you circumventing that?

@SRvSaha
Copy link
Owner

SRvSaha commented May 16, 2021

@SRvSaha But the public api is still showing wrong data if I am not wrong. Like for instance 201301 is showing same available capacity for 18+ from last 6 hrs I have been observing. How are you circumventing that?

Hi, @JnaneshPrabhu, Public APIs are cached and hence they may not providing Real-Time Information.

Check the first paragraph here: https://apisetu.gov.in/public/marketplace/api/cowin/cowin-public-v2#/

@JnaneshPrabhu
Copy link

I am aware about that. But its cached only upto 30 minutes and not hours.. just asking if at all you are aware off it and have a solve for that.

@SRvSaha
Copy link
Owner

SRvSaha commented May 16, 2021

I am aware about that. But its cached only upto 30 minutes and not hours.. just asking if at all you are aware off it and have a solve for that.

Try hitting from multiple machines having Different IP Addresses. In general there a rate limit of 100 requests per 5 minute. So you need to arrange for sufficient machines with different IPs so that you can check for different different PIN/Districts without the throttling.

@akshay8043
Copy link
Author

@SRvSaha if this API shows cached data, then how are we gonna book a slot if the data is old?
I saw a WhatsApp msg saying that this it has 30 min delay which I initially didn't believe as it was a WhatsApp msg.

image

But you that @JnaneshPrabhu is saying that it's cached with data up to 30 mins.

How do we assure that we are getting current data?

What can be done to get improve your app?

@SRvSaha
Copy link
Owner

SRvSaha commented May 17, 2021

@akshay8043 We aren't using Public API so we will not face the issue of caching. It's a Real-Time system. Booking will still work, don't worry

@SRvSaha
Copy link
Owner

SRvSaha commented May 17, 2021

@akshay8043 @JnaneshPrabhu Version 4.0.0 is out now. Thanks for your patience. Check it out: https://github.com/SRvSaha/CoWinVaccineSlotFinder/releases/latest

@SRvSaha SRvSaha self-assigned this May 17, 2021
@SRvSaha
Copy link
Owner

SRvSaha commented May 17, 2021

Feature integrated in v4.0.0 https://github.com/SRvSaha/CoWinVaccineSlotFinder/releases/latest it should fix the issue.

@akshay8043 Check and share your feedback.

@SRvSaha SRvSaha closed this as completed May 17, 2021
@SRvSaha SRvSaha unpinned this issue May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants