Skip to content

Commit 8f4bd3b

Browse files
mcollovatimshabarov
andcommitted
docs: clarify mid vs mid2 offline license key compatibility (#5404)
* docs: clarify mid vs mid2 offline license key compatibility The download-offline-license Maven goal always generates a mid2 machine ID, but Vaadin 24.9 and earlier only accept mid keys. This causes confusing "Invalid offline key" errors. Add a version compatibility table to the offline license section, a warning that the Maven goal only works for Vaadin 25+, and improve the related troubleshooting entry in the knowledge base. * Apply suggestions from code review Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com> --------- Co-authored-by: Mikhail Shabarov <61410877+mshabarov@users.noreply.github.com>
1 parent 6173b3f commit 8f4bd3b

File tree

2 files changed

+57
-2
lines changed

2 files changed

+57
-2
lines changed

articles/flow/configuration/licenses/index.adoc

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@ The banner links to the https://vaadin.com/commercial-license-info[Commercial Li
6262
<source-info group="Maven"></source-info>
6363
mvn package -Pproduction -Dvaadin.commercialWithBanner
6464
----
65-
[source,groovy]
65+
[source,terminal]
6666
----
67-
<source-info group="Groovy"></source-info>
67+
<source-info group="Gradle"></source-info>
6868
./gradlew build -Pvaadin.productionBuild -Pvaadin.commercialWithBanner
6969
----
7070
--
@@ -106,6 +106,23 @@ If your local development environment is offline and can't reach `vaadin.com`, y
106106

107107
Each offline license key is tied to the machine ID, in the form of `mid-xxxxxxxx-xxxxxxxx` (deprecated) or [since:com.vaadin:vaadin@V24.10]##`mid2-xxxxxxxx-xxxxxxxx` (`V2` key)##. You'll have to submit that to `https://vaadin.com/myaccount/licenses`, so as to download an offline license key.
108108

109+
The machine ID format you need depends on your Vaadin version:
110+
111+
[cols="1,1,1"]
112+
|===
113+
|Machine ID Format |Key File |Vaadin Version
114+
115+
|`mid-xxxxxxxx-xxxxxxxx`
116+
|[filename]`offlineKey`
117+
|24.9 and earlier
118+
119+
|`mid2-xxxxxxxx-xxxxxxxx`
120+
|[filename]`offlineKeyV2`
121+
|24.10 and later
122+
|===
123+
124+
Using the wrong key type causes an "Invalid offline key" error. If you work with both old and new Vaadin versions, download both key types.
125+
109126
Once you've downloaded the [filename]`offlineKey` or [filename]`offlineKeyV2` file -- remove any [filename]`.txt` suffix -- you should place it in your home directory:
110127

111128
[.example]
@@ -162,6 +179,16 @@ mvn dependency:get -Dartifact=com.vaadin:license-checker-machineid:1.8.1 && java
162179
----
163180
--
164181

182+
[IMPORTANT]
183+
====
184+
The `download-offline-license` goal is only available in the Vaadin 24.10+ Maven plugin and always generates a `mid2` machine ID. This key does not work with Vaadin 24.9 or earlier.
185+
186+
For **Vaadin 24.9 or earlier** projects, you must obtain the `mid` machine ID manually:
187+
188+
. Attempt to build or run your project with a commercial component while offline. The `mid` machine ID is printed in the build error output.
189+
. Use that `mid` machine ID to download the correct offline key from https://vaadin.com/myaccount/licenses.
190+
====
191+
165192

166193
[[server-license-key]]
167194
== Validation on CI/CD or Build Server

articles/flow/kb/index.adoc

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,32 @@ This is a known error in `SSLHandshakeException` reported by users of WebSphere
120120
See the following discussion for more details: https://vaadin.com/forum/t/running-mpr-project-on-websphere-liberty-fails-with-suncertpathbuilderexcep/160675.
121121
====
122122

123+
[[offline-license-legacy-key]]
124+
.+++<h3>Detected an Offline License Version 1, but Version 2 is required</h3>+++
125+
[%collapsible]
126+
====
127+
License Checker 3 requires version 2 offline key (`mid2-xxxxxxxx-xxxxxxxx`), but it detected locally only a version 1 key (`mid-xxxxxxxx-xxxxxxxx`).
128+
Go to https://vaadin.com/myaccount/licenses#offline-license-key and download and install a version 2 key.
129+
====
130+
131+
[[offline-license-invalid-format]]
132+
.+++<h3>Invalid Machine ID Format</h3>+++
133+
[%collapsible]
134+
====
135+
Either `offlineKey` contains a version 2 offline key (`mid2-xxxxxxxx-xxxxxxxx`) or `offlineKeyV2` contains a version 1 key (`mid-xxxxxxxx-xxxxxxxx`).
136+
Verify that you have a valid license by going to https://vaadin.com/myaccount/licenses#offline-license-key and download and install the correct key type.
137+
====
138+
139+
[[offline-license-invalid-key]]
140+
.+++<h3>Invalid Offline Key</h3>+++
141+
[%collapsible]
142+
====
143+
This error can occur in the following situations:
144+
145+
- **Version mismatch**: The offline key type does not match your Vaadin version. Vaadin 24.10 and later require a `mid2` (v2) key, while Vaadin 24.9 and earlier require a `mid` (v1) key. For Vaadin 24.10 or later, run `mvn com.vaadin:vaadin-maven-plugin:download-offline-license` to obtain the `mid2` machine ID. For Vaadin 24.9 or earlier, obtain the `mid` machine ID from the build error output and download the correct key from https://vaadin.com/myaccount/licenses.
146+
- **Wrong key file**: The [filename]`offlineKey` or [filename]`offlineKeyV2` file contains an invalid or corrupted key.
147+
148+
See <<{articles}/flow/configuration/licenses#offline-license-key,Offline License Key>> for details on which key type to use for your Vaadin version.
149+
====
150+
123151
// end::licenses[]

0 commit comments

Comments
 (0)