yashwanthm / cowin-vaccine-booking

The app enables tracking coivid vaccine availability and automatically book a vaccination slot. This is based on Cowin API and supports the recently added Captcha code of Cowin.
https://yashwanthm.github.io/cowin-vaccine-booking/
BSD 3-Clause "New" or "Revised" License
152 stars 61 forks source link

Session Auto Logout & Sign In stops #56

Closed makmaddy17 closed 3 years ago

makmaddy17 commented 3 years ago

I observed a behaviour when the session gets auto logout after 45mins - 1 hour and it stops signing you in through your dashboard. Although i was able to sign in COWIN website.

Even after 15 mins i was not able to login, even after clicking the submit button. It was in freeze state

yashwanthm commented 3 years ago

Could you press on stop button for tracking? @makmaddy17

makmaddy17 commented 3 years ago

Yes i was able to stop that, and retried on other browsers with private sessions. Nothing worked.

yashwanthm commented 3 years ago

@yashtibrewal The 3050 polling interval is still resulting in these 403s. Can you please check?

yashtibrewal commented 3 years ago

Tested 3250 for 2 hours ( 0 errors ) Tested 3150 for approximately 1 hour (0 errors) @yashwanthm I think 3050 is cut to cut..

Observation: Only if you open cowin site seperately on 2nd tab you are technically adding your api calls So please do not try that. Either use this app or cowin site.

yashwanthm commented 3 years ago

3200 seems reasonable from my tests. Thanks @yashtibrewal @sivagontla You will ahve to wait for about 10 mins before the rate limiter enables your IP again.

yashwanthm commented 3 years ago

Update deployed

makmaddy17 commented 3 years ago

I faced the issue again today. -->

Screen Shot 2021-05-25 at 5 12 29 PM

And i was not logged into COWIN by any medium

Also while it is tracking the availability suddenly i see such errors, I dont know if it is expected

Screen Shot 2021-05-25 at 5 24 58 PM
yashwanthm commented 3 years ago

are you using a custom polling frequency using localstorage.pollFreq?

makmaddy17 commented 3 years ago

I have not changed anything at the code level. also observed i didn't get a response on the mentioned PIN CODE while i got PAYTM, Twitter alerts for slot openings. This happened twice for me today. I think the API polling becomes invalid after few mins.

_XHRGEThttps://cdn-api.co-vin.in/api/v2/appointment/sessions/calendarByPin?pincode=560011&date=25-05-2021 CORS Missing Allow Origin Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://cdn-api.co-vin.in/api/v2/appointment/sessions/calendarByPin?pincode=560011&date=25-05-2021. (Reason: CORS header 'Access-Control-Allow-Origin' missing)._

I see a lot of such errors.

Update - 6:55 PM 25th May "I logged out and logged in again, the errors started coming for me within seconds now"

yashwanthm commented 3 years ago

Try switching between the tracking modes. I used the alternate tracking mode and got a slot for myself today.

On Tue, May 25, 2021 at 6:52 PM Mayank Madhur @.***> wrote:

I have not changed anything at the code level. also observed i didn't get a response on the mentioned PIN CODE while i got PAYTM, Twitter alerts for slot openings. This happened twice for me today. I think the API polling becomes invalid after few mins.

— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/yashwanthm/cowin-vaccine-booking/issues/56#issuecomment-847865596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJJ6MS4WKD3N2CDKNACAX3TPOQBBANCNFSM45LWMNEQ .

--

Regards,

Yashwanth Maheshwaram

Phone: +91-9701899909

Skype: yashwanth.maheshwaram

https://www.linkedin.com/in/myashwanth/

makmaddy17 commented 3 years ago

Update - 6:55 PM 25th May "I logged out and logged in again, the errors started coming for me within seconds now"

Trying a fresh login with another browser , other filters. I am at "Alternate Tracking Mode" from morning :(

yashwanthm commented 3 years ago

image image

I just tried your search. I can see centers in both tracking.

Btw, only one device can use the application per public IP. The rate limiter is set against the public IP. If multiple users/devices/browser tabs are using it, that will lead to your situation.

makmaddy17 commented 3 years ago

I am in a single user login, with only 1 active session, but sadly its the same for me. It missed another slot availability just now. Let me check it tomorrow too and update you by EOD.

sivagontla commented 3 years ago

@makmaddy17 this CORS issue happened to me on COWIN portal too .... for sometime it will work but suddenly a flood of CORS issues will popup and the slots opened in that timeframe cannot be seen

makmaddy17 commented 3 years ago

Ok so this issue was not reported since morning. It started for me after 3:30 PM, I am active since morning 9:00 AM. It logged me out and not allowing me to sign in.

Access to XMLHttpRequest at 'https://cdn-api.co-vin.in/api/v2/auth/generateMobileOTP' from origin 'https://yashwanthm.github.io' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

yashwanthm commented 3 years ago

Once in a while is normal. You can ignore it. Closing the issue.