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

update OVERLEAF_COOKIE input format #4

Merged
merged 2 commits into from
Feb 15, 2023
Merged

update OVERLEAF_COOKIE input format #4

merged 2 commits into from
Feb 15, 2023

Conversation

emhl
Copy link
Contributor

@emhl emhl commented Oct 4, 2022

when the session cookie runs out i always need to go back to this repository to check the syntax for the OVERLEAF_COOKIE secret. just pasting in the cookie would be much easier.

btw i've seen that you haven't created another tag so all the features added after the initial commit aren't acessible without forking the project

@subhamX
Copy link
Owner

subhamX commented Oct 4, 2022

Do note that if you run the workflow say, every day, then this expiration shouldn't happen. (At least that's how things were earlier). Overleaf used to extend the same cookie expiration time. Let me confirm it in 7 days.

when the session cookie runs out i always need to go back to this repository to check the syntax for the OVERLEAF_COOKIE secret. just pasting in the cookie would be much easier.

Even I was thinking about it the last time. Now the issue is everyone must be using master branch and the old cookie format. Let me try to make the change and also keep it backwards compatible.

btw i've seen that you haven't created another tag so all the features added after the initial commit aren't acessible without forking the project

Hmm. Let me make another release soon.

@emhl
Copy link
Contributor Author

emhl commented Oct 4, 2022

Do note that if you run the workflow say, every day, then this expiration shouldn't happen.
(At least that's how things were earlier). Overleaf used to extend the same cookie expiration time. Let me confirm it in 7 days.

i had set the cookie almost exactly a month ago and i used the workflow ~15 times per day

Even I was thinking about it the last time. Now the issue is everyone must be using master branch and the old cookie format. >Let me try to make the change and also keep it backwards compatible.

i use the v1.0.0-alpha tag (and didn't know zou could use the master as well). well if most build directly from the latest commit their workflows would break for sure if this got merged :D

@emhl
Copy link
Contributor Author

emhl commented Oct 11, 2022

Let me confirm it in 7 days.

Has your cookie expired yet?

btw i have added backwards compatibility in the last commit

@subhamX
Copy link
Owner

subhamX commented Oct 11, 2022

Ah. I just saw the workflow. It looks like I have a lot of unnecessary CRON actions, and my private actions quota is over. :( The workflow did run fine for 3 days though.

Sorry for the trouble. Let me start the workflow again.

@emhl
Copy link
Contributor Author

emhl commented Oct 20, 2022

any updates?

@emhl
Copy link
Contributor Author

emhl commented Nov 19, 2022

@subhamX my workflow hasn't crashed since last time

@subhamX
Copy link
Owner

subhamX commented Dec 16, 2022

@subhamX my workflow hasn't crashed since last time

@emhl; Ah. That's so cool. My apologies for the delayed response. I was in the middle of transitioning to a new job, and didn't have the bandwidth to work on my side projects.

My workflow again got crashed (as there are some other internal services using the limited free resources in PRO account), and when I tried to run it again (after 18-19 days) the cookie was expired.

I suspect if we run the workflow on regular interval it keeps the cookie active. Also, maybe we shouldn't create any new session or not use the same session whose cookie is being used.

Do share what's the status of your workflow right now, and any hypothesis to this problem?

Let me start a new workflow on a public repo this time. :)

@subhamX
Copy link
Owner

subhamX commented Dec 16, 2022

Testing this action on this public repository.

Insights

  1. If you're using some session credentials in this github action, and you're logged in the browser using the same credentials, then please ensure that you don't LOGOUT from the browser. If you logout from the browser, then the credentials gets expired/revoked. So I would recommend that after you copy overleaf_session2 cookie and put it in the GitHub actions secret, please delete the cookie from the browser. And then start a new browser session (by logging in again) if required.
  2. I can confirm that starting a new overleaf session doesn't revoke the previously generated credentials. So, theoretically you can still work on www.overleaf.com, and keep this action running without an additional hassle.
  3. TODO: Shall post an update on how long does the credential remain valid. Many companies ask their users to (force) login again after 30 days (for example). Let's see what's the number for overleaf... This interval is definitely more than 2 months, as the workflow worked for more than 2 months without any intervention.

@emhl
Copy link
Contributor Author

emhl commented Dec 17, 2022

Do share what's the status of your workflow right now, and any hypothesis to this problem?

the action has been continuously working since Oct 4 without the need to update the token, there probably isn't a maximum time any token can be used, if it gets used continuously.

the "This cookie is to be only valid for a limited time and needs to be replaced after a while." line should be removed and/or replaced by a more detailed explanation what could cause the token to be reset

@subhamX
Copy link
Owner

subhamX commented Dec 17, 2022

@emhl;

the "This cookie is to be only valid for a limited time and needs to be replaced after a while." line should be removed and/or replaced by a more detailed explanation what could cause the token to be reset

I agree. Hoping to have better insights from this latest run. :) Shall post an update as soon as the workflow breaks because of revoked credentials.

@subhamX
Copy link
Owner

subhamX commented Feb 15, 2023

It has been more than 2 months, and the workflow is working flawlessly. :)

@subhamX subhamX changed the title change required content of OVERLEAF_COOKIE update OVERLEAF_COOKIE input format Feb 15, 2023
@subhamX
Copy link
Owner

subhamX commented Feb 15, 2023

Thank you @emhl for contributing to this repo. 🤗

I think I need to be more active on the platform. Kinda missing open source. 😊.

@subhamX subhamX merged commit e04e220 into subhamX:master Feb 15, 2023
@emhl
Copy link
Contributor Author

emhl commented Feb 15, 2023

It has been more than 2 months, and the workflow is working flawlessly. :)

my workflow hasn't crashed since October either.

Thank you @emhl for contributing to this repo. 🤗

I think I need to be more active on the platform. Kinda missing open source. 😊.

Thanks alot for creating this awesome workflow :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants