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

[x-license] Getting "MUI X: License key expired" while using a legit key #15998

Open
RahavLussato opened this issue Dec 25, 2024 · 4 comments
Open
Labels
package: x-license Specific to @mui/x-license. support: commercial Support request from paid users support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/

Comments

@RahavLussato
Copy link

RahavLussato commented Dec 25, 2024

The problem in depth

Hello, we renewed our license for MUI X, we got a new key “624ef......”, when I update our mui x data grid pro
we get a placeholder of “MUI X: License key expired” when we use the components.
previously we used @mui/[email protected] and I did an upgrade to "@mui/x-data-grid-pro": "^5.15.0".
when I upgrade to the latest I get "MUI X: Expired package version",
I've tried setting the license using "@mui/x-license" and also "@mui/x-license-pro" which did not work.

Your environment

No response

Search keywords: License key expired

Order ID: 103279

Context

https://mui.zendesk.com/agent/tickets/24626

@RahavLussato RahavLussato added status: waiting for maintainer These issues haven't been looked at yet by a maintainer support: commercial Support request from paid users labels Dec 25, 2024
@github-actions github-actions bot added component: data grid This is the name of the generic UI component, not the React module! support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/ labels Dec 25, 2024
@RahavLussato
Copy link
Author

RahavLussato commented Dec 25, 2024

When debugging the licenseInfo object you can see that although we set it with key "62...", when it tries to get the key for verification it gets a weird key of "65...."

@RahavLussato
Copy link
Author

RahavLussato commented Dec 25, 2024

Screenshot_2024-12-24_at_15_36_16 Screenshot_2024-12-24_at_15_36_57

@RahavLussato
Copy link
Author

for now rolling back to "@mui/x-data-grid-pro": "5.17.5" works.

@oliviertassinari oliviertassinari added package: x-license Specific to @mui/x-license. and removed component: data grid This is the name of the generic UI component, not the React module! labels Dec 25, 2024
@oliviertassinari oliviertassinari removed the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Dec 25, 2024
@oliviertassinari oliviertassinari changed the title [question] Getting "MUI X: License key expired" while using a legit key [x-license] Getting "MUI X: License key expired" while using a legit key Dec 25, 2024
@oliviertassinari
Copy link
Member

Thanks for opening a Zendesk ticket, I propose we continue this thread there https://mui.zendesk.com/agent/tickets/24626, until we find if there is a root cause or not in the code. We will report the solution here for future developers, to continue to build up a knowledge base.


Off-topic. Fun observation on this:

This is bound to fail, one day or another. It won't work if a developer uses two versions of an MUI X component because he's migrating from one to another or adding a new one while not migrating an old one and we changed the way the license key structure (needed one day or another). We only have a few options:

  1. We don't allow progressive migration on the same page. This wouldn't be great. It pretty much feels like the current state of things. Progressively migration isn't truly supported.
  2. We make it so that license key logic is always backward compatible (it's impossible to guarantee to be always future-proof). We have done this so far. This would mean that someone could add a brand new component, by updating @mui/x-license. Now, the problem is that for this to work, we can't simply have this package as a dependency:

"@mui/x-license": "workspace:*",

Hence why we are on 1. Now, we could make changes to make it work is:

  • 2.a When using setLicenseKey() from the component npm package itself, it doesn't use any singleton, it scopes it to local values. If there is any kind of npm package duplication, it stops working. The use case can be micro-frontend or as an escape hatch.
  • 2.b When using setLicenseKey() from the @mui/x-license package, we have a global variable (like today)
  1. A variation of 2. where in 2.b instead of a single global variable, we store the license keys in the global variable based on releaseInfo. This way, we can set multiple of them, and components can retrieve the oldest most recent release info, relative to their own release info.
    This might be overkill. Maybe 1. is just fine, if not 2. 3. is kind of a last resort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: x-license Specific to @mui/x-license. support: commercial Support request from paid users support: pro standard Support request from a Pro standard plan user. https://mui.com/legal/technical-support-sla/
Projects
None yet
Development

No branches or pull requests

2 participants