Giter Club home page Giter Club logo

Comments (13)

mtthidoteu avatar mtthidoteu commented on July 18, 2024

from wizarr.

enrico1203 avatar enrico1203 commented on July 18, 2024

Another example: This invite with the duration of 186 days
1
on the user panel i see this:
2
where I drew the question mark there should be the date like in all the others. when the current date passes those dates the user is taken off plex. but in this case it is not there and therefore it remains forever

from wizarr.

DjBuRnOuT avatar DjBuRnOuT commented on July 18, 2024

I've got the same problem, not sure what would cause this. Here's the invitations table:
image

and here's the users table:
image

You can see that the invitation code gets used but it doesn't reflect in the users table.

I'm also using the latest version of the docker image as of today

from wizarr.

realashleybailey avatar realashleybailey commented on July 18, 2024

from wizarr.

DjBuRnOuT avatar DjBuRnOuT commented on July 18, 2024

Is this issue occurring with the V3-alpha or are you using the default provided version of Wizard

On 24 Jul 2023, at 10:05 pm, DjBuRnOuT @.***> wrote: I've got the same problem, not sure what would cause this. Here's the invitations table: https://user-images.githubusercontent.com/1522047/255718109-b0e1693b-f176-4ce1-b8f0-11bf0604b1fb.png and here's the users table: https://user-images.githubusercontent.com/1522047/255718347-73ae8919-5fff-4d2c-a206-e52b1b4da8d7.png You can see that the invitation code gets used but it doesn't reflect in the users table. — Reply to this email directly, view it on GitHub <#165 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AD65Q3FV4CFCKTEQYZDJN7LXR3PTFANCNFSM6AAAAAAZP2WOJ4. You are receiving this because you are subscribed to this thread.

it's happening in the latest "stable" version available in the master branch of the default repo: https://github.com/Wizarrrr/wizarr

Specifically this image in the docker compose file: image: ghcr.io/wizarrrr/wizarr

from wizarr.

realashleybailey avatar realashleybailey commented on July 18, 2024

I think like @mtthidoteu mentioned, theres two forms of "expiration", theres what Wizarr calls expiration, and that is the duration of validity for an invite, this is not ignored if unlimited is set to true, and theres duration, this is the length of validity for any created accounts using that invite, after this duration the account is removed from the media server and the user no longer maintains access.

wizarrrrrrr

from wizarr.

DjBuRnOuT avatar DjBuRnOuT commented on July 18, 2024

I think like @mtthidoteu mentioned, theres two forms of "expiration", theres what Wizarr calls expiration, and that is the duration of validity for an invite, this is not ignored if unlimited is set to true, and theres duration, this is the length of validity for any created accounts using that invite, after this duration the account is removed from the media server and the user no longer maintains access.

wizarrrrrrr

No it's not the case, I didn't mismatched the two forms of expiration and it's why I replied to this very ticket because it looks like a real bug, I made sure to not make any mistakes before posting.

I've tried to look up at the logs but except for some Plex API limits being reached I don't see anything else. It's really a random bug that I cannot even reproduce because some users are getting expected results while some don't. I have a pretty big plex server so I did remove everyone to re-invite them back using wizarr and it doesn't look like there's a pattern I can identify for the moment.

Here's more proof directly from wizarr's interface (sorry for the unusually large and wide screenshot)
image

As you can see with the comments, annotations and relations that I drew. Invitations are getting used and matched to the correct email but in the users table in the database, it misses the code used by that user and the date it's supposed to expire. (hence why I posted the values from the databse using DB Browser for SQLite some posts above)

I'm new to Python, I wish I could do better to help you out (or fix it myself) but I can only provide useful informations (maybe?) for now.

from wizarr.

realashleybailey avatar realashleybailey commented on July 18, 2024

@DjBuRnOuT Don't worry I believe you, often times we get bug reports that turn out to be just user error so its great to make sure everyone is 100% on the same page before any in depth debugging, if this bug is occurring in a somewhat sporadic nature I would most likely pin point it to the way Wizarr currently stores these values.

https://github.com/Wizarrrr/wizarr/blob/master/app/admin.py#L76

current_date = date.today()
            expires_options = {
                "day": (current_date + timedelta(days=1)),
                "week": (current_date + timedelta(weeks=1)),
                "month": (current_date + timedelta(days=30)), # Approximation for 1 month
                "6months": (current_date + timedelta(days=30*6)), # Approximation for 6 months
                "year": (current_date + timedelta(days=365)),   # Approximation for 1 year     
                "never": None
            }
            expires = expires_options.get(request.form.get("expires"))
            unlimited = 1 if request.form.get("unlimited") else 0
            plex_home = 1 if request.form.get("plex_home") else 0
            allowsync = 1 if request.form.get("allowsync") else 0
            duration = request.form.get("duration")
            specific_libraries = None
            library_count = int(request.form.get("library_count", 0))
            if library_count > 0:
                specific_libraries = ', '.join(filter(None, [
                    request.form.get("library_" + str(library))
                    for library in range(library_count + 1)
                ]))

            # Create invitation
            Invitations.create(
                code=code,
                used=False,
                created=datetime.datetime.now().strftime("%Y-%m-%d %H:%M"),
                expires=expires.strftime(
                    "%Y-%m-%d %H:%M:%S") if expires else None,
                unlimited=unlimited,
                plex_home=plex_home,
                duration=duration,
                specific_libraries=specific_libraries,
                plex_allow_sync=allowsync
            )

I have a feeling that expires = expires_options.get(request.form.get("expires")) might not be correctly parsing the expires correctly.

Because this issue is difficult to replicate is it possible that you could provide me with a copy of your database.db so that I can inspect the formatting of the expire values.

You can use this link to upload your file securely, https://cloud.gitcloud.org/url/zuddpigp6gfjqiiy, [Privacy Policy Stuff] your file will be deleted immediately once I have completed my debugging. Your personal data will not be shared with anyone whether that be public or on the Wizarr team without your express approval beforehand.

from wizarr.

DjBuRnOuT avatar DjBuRnOuT commented on July 18, 2024

Doesn't look like that link works for me, it sends me back to the issues page of the repo. Is that alright if I send it to you using the email listed on your profile?

I mean it's not top secret stuff but I want to avoid posting the emails of my friends at the very least otherwise I would've just attached it to my post lol

from wizarr.

realashleybailey avatar realashleybailey commented on July 18, 2024

Yes feel free to email it over to me, if your outside of europe that maybe why the link does not work for your apologies for that.

from wizarr.

DjBuRnOuT avatar DjBuRnOuT commented on July 18, 2024

That's a probability, i'm from Canada. I've just sent you an email with my current database attached. Thanks for your time!

from wizarr.

realashleybailey avatar realashleybailey commented on July 18, 2024

@DjBuRnOuT Okay I have looked at the database, one thing that strikes me as odd is that the only users that don't have expire dates also don't have Plex tokens, or invite codes associated with them. My first thoughts on analysis is weather these users were automatically imported from Plex to Wizarr, instead of the accounts being created through the Wizarr signup process, I am currently working on V3 and so it will give me time to closely go over the code for the Plex signup process, if this is a bug then I am hopeful to catch it before that release. Ill keep this thread open until I have resolved the issue and will get back to you.

from wizarr.

DjBuRnOuT avatar DjBuRnOuT commented on July 18, 2024

Just sent you another mail with my refreshed database since i've got two new users that registered in the past 24 hours. As you'll be able to see, one had it's expiration date correctly as expected and the other one didn't. Still no clue as to why it happens.

One thing to keep in mind is that I have a managed account for my girlfriend which didn't went through Wizarr and two of the first users that were added manually to Plex (User ID 1 to 3 to be exact), so you can overlook those, they are not bugged. All the other users got registered through Wizarr.

I will keep trying to find out more and provide the info to you. Does the "token" really necessary? I ask this because I wanted to know if I can add the invitation code and the expiration timestamp manually or it needs the token for it to work.

from wizarr.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.