-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Extended expiry date rolls back to Original expiry && expiry date disappears after restart #77
Comments
Sometimes it might even take 2 restarts for the expiry date to roll back to original but its definitely not persistent for me |
Could you post the contents of |
nvm, just happened to me as well after like 3 restarts. |
Sorry i missed to reply quickly but good to know that you were able to reproduce it |
Weird, I can't repeat the issue now. Could you check the logs ( |
I can't seem to find any error starting with such keywords but here's the log file nevertheless |
Yeah, your logs look normal. I think i might have just read the date the wrong way round when I thought it happened to me. I've added some extra log lines and I'll keep mine running for a while to see if it happens again. |
Could you check the file I mentioned above and see how many entries there are? |
Actually can you do this as well? |
@hrfee firstly the expiry which was showing blank yesterday started showing up fine today when i wake up but lets just ignore it for now . So now when initially everything was okey , i took a backup of users.json and after around 2 restarts , i was able to make the expiry date again so blank so i took the users.json file backup again. And expectedly both of the file had difference in size . These both backups were literally taken after a 30 seconds gap ( 2 restarts ) users_before.txt Although the docker logs doesn't seem to be showing anything unusual but here it is nevertheless ( could check from bottom as the issue was reproduced just a min ago ) |
One of the expiry dates was deleted from the file, despite it's expiry being later than all of the others. This is super confusing, as the program will should log in all the places where any modifications occur to the file. I've added some more logging and some other stuff that should help us figure out the problem in 76b8222, give that a try once its built. |
I tested the latest docker: unstable build . The User expiry for a test user which was showing normally immediately upon creation vanished after a single restart Here's the docker logs . You can see line 165 where user test got created The users.json file was same before and after the restart. I know it doesn't help much but i managed to record a small screen recording of 50 seconds showing the issue. You can watch it here - https://drive.google.com/file/d/1C_DeLMJsUR_exura1jx_9-SUk9DO_4Ki/view?usp=drivesdk ( keep on on Test user having the email xd003@mail.com ) |
Thanks for the video. After you've restarted and the expiry time has disappeared, if you select that use, does the "Extend Expiry" button still appear? |
No the Extend expiry button doesn't appear at top after selecting that user |
I did a interesting test if its helpful .In jfa-go , i have set any user to get deleted on expiry . So i created a test user with 2 min Expiry and got its expiry date vanished after 1 restart and waited for 2 more mins . The test user did got deleted even though expiry date was absent for it at that very moment I will do similar test for a longer Expiry duration for 12 hours and see how it does |
ooh, thats good news then i guess. I've just put a special build for you on docker hub ( |
Yeah sure |
Analysis on jfa:debug ( User Test is the one being evaluated ) I am not sure if you just enabled more verbose logging or did some other changes too as the behaviour was little different this time. So firstly i created the user and set expiry for 5 mins and as always upon creation the expiry was showing fine . Now I restarted 3,4 times in a row ,but the expiry date was still persistent , looked good till now. Then i extended expiry for 1 month , all good till here , restarted again and it waa still displaying expiry well (5 Mins + 1 Month ) . Now i extended expiry for 1 day to test and upon restart the account itself got deleted somehow. . To summarise , this time there was no Expiry disappearance nor expiry rollback issue but user account got deleted as per the original expiry , it ignored the extensions . I have logged it all properly . I think we might be pretty close to get it fixed users-before.txt |
I think i've figured it out, your logs were super helpful. I noticed the user daemon ( jfa-go doesn't actually restart when you press restart, it basically ends the main function and then runs it again. The user daemon isn't being stopped when a "restart" happens, so gradually more and more instances are being run. I think this is where the weird behaviour when you restarted like 3-4 times came from. I'll work on a fix now. |
That's good to here that my logs were helpful , i will test the upcoming version tonight if possible but here its almost 11 pm so i might send the next report tomorrow morning |
Its up on the same docker tag now, np if you need to do it tomorrow. |
Analysis on jfa-go:debug ( User Test is the one being evaluated ) I did this test with a preplanned 3 stage process to verify eveything properly in 1 go
So after running the debug build , i invited the test user with a duration of 15 mins . Within 2,3 mins itself , i did like 2,3 restarts and didin't noticed any expiry disappearance . So it did fine here So as of now ,it has passed all 3 tests that i did . Although i think its a good idea to upload logs even when result is positive Logs users.json ( after all the tests + extension ) Jfa-go:debug docker logs here - https://del.dog/jfa-go-debug.txt |
i think it would now fine to merge all the debug commits in unstable, lemme know when you do so . i will switch back to unstable. This issue was seemingly bit tricky to get hold of but now seems to have been resolved finally : ) |
Already did merge, even if it wasn't the fix it still should've been there. You can switch back to |
yes , this could be closed now . I just had one one last question , its kinda related to expiry so i thought better to ask it here instead of opening a new issue altogether as its a very small thing . So the thing is the time displayed in expiry never matches my time zone . Sure when i set it to 1 min , it deletes invited user after 1 min only but the timing is something else together . So this time-zone mismatch is a jfa-go thing ? or i will have do something on my vps to fix it ? ( Assuming jfa-go fetches the time from my vps . This is the docker command i use to run jfa-go if it helps - |
Does the |
I've just realised how weird my date handling is, right now a date is converted to DD/MM/YY on the server instead of the client, so if your server is in a different timezone it'll appear weird. I'll start changing it now. |
it displays Coordinated Universal Time (UTC) by default . i just changed my timezone to display the correct one - https://linuxize.com/post/how-to-set-or-change-timezone-in-linux/ . Now its just 2 commands if you want to add it directly
|
@hrfee i just updated to unstable. Saw some time related commits . Earlier i was having just timezone mismatch issue which had got fixed by changing my timezone although the format was fine still then ( it was just UTC timezone ) Now coming back to topic , the time format currently has become quite weird now . It's looking like some random numbers . Here's a pic |
Could you try updating? This should be fixed. |
I was already on latest jfa-go:unstable .That pic was from last night . I checked just now its not displaying those random numbers , maybe jfa-go was adjusting timezone or something when i checked it yesterday. Although i noticed one thing , currently the expiry date format is MM/DD/YY , i think earlier DD/MM/YY was better Or better yet if you can provide these as options options in jfa-go ( like there's one for 12/24 hr ) , that would be most ideal |
I mistakenly thought the function I used would respect the browser language/locale, but it didn't. 7196361 should fix that. Currently the 12/24 selection is only for emails, but I think i'm going to expand the language menu (in the top left) to integrate with time formatting and also have a 12/24h selector. |
Added a 12/24h selector to the language menu in 66b7df7. |
That's nice , do you want me to test it now or i can do it all together when expiry date format also gets added |
don't mind, the expiry one should be done in 5 mins though so you may as well wait |
You can select the "English (GB)" to get DD/MM/YY back. |
That's great , will give it a try now |
I just tested both 12/24 and the language option If i select either of 12/24 h time format and reload the page , the earlier saved option is retained , that's pretty good I can propose 2 ideas to fix this issue
Then upon loading https://signup.jfa.xyz , it could automatically load https://signup.jfa.xyz/?lang=en-gb ( invite page ) Obviously you might know some even better way around this , i am not a developer .. These are my inputs just as a user |
For now you can just set the default language in settings, but remembering the clients choice is a good idea too. |
language preference now stored in a cookie as of a8f71c8. |
Describe the bug
As implied by the title ,the expiry duration when extended rolls back to the original expiry after restart
To Reproduce
Platform/Version
jfa-do docker:unstable
The text was updated successfully, but these errors were encountered: