License problem while trying to build through linux terminal

Hi all,

I’m using a personal license and I can open, start, and build my project in Ubuntu. I’m trying to build in Ubuntu’s terminal unsuccessfully. I guess that it is a bug.
This is the terminal output:

my_machine:~/Build$ ~/Unity/Hub/Editor/2022.3.8f1/Editor/Unity -quit -batchmode -nographics -buildTarget EmbeddedLinux -executeMethod Builder.Build -projectPath -projectPath ~/Projects/My_project/editor
Unity Editor version:    2022.3.8f1 (b5eafc012955)
Branch:                  2022.3/staging
Build type:              Release
Batch mode:              YES
System name:             Linux
Distro version:          #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Jul 13 16:27:29 UTC 2
Kernel version:          6.2.0-26-generic
Architecture:            x86_64
Available memory:        11742 MB
[Licensing::Module] Trying to connect to existing licensing client channel...
[Licensing::IpcConnector] Connection attempt to the License Client on channel: "LicenseClient-sammonius" failed because channel doesn't exist; code: "0x80000002"
[Licensing::Module] Successfully launched the LicensingClient (PId: 5085)
[Licensing::IpcConnector] Successfully connected to the License Client on channel: "LicenseClient-sammonius" at "2023-08-30T08:53:54.852267Z"
[SignatureVerifier] Application signature verification not supported on this platform.
[Licensing::Client] Handshaking with LicensingClient:
  Version:                 1.13.1+ca5f299
  Session Id:              574fbc1b812c49beb736cacfa8dfdaf8
  Correlation Id:          faaf27f168423d0130e5fce3d0ef7343
  External correlation Id: 6581892707327129026
  Machine Id:              VWjPVZywpydhlUNbYNxH7zX/lW4=
[Licensing::Module] Successfully connected to LicensingClient on channel: "LicenseClient-sammonius" (connect: 0.82s, validation: 0.07s, handshake: 0.00s)
[Licensing::IpcConnector] Successfully connected to the License Notification on channel: "LicenseClient-sammonius-notifications" at "2023-08-30T08:53:54.919985Z"
[Licensing::Module] Connected to LicensingClient (PId: 5085, launch time: 0.00, total connection time: 0.88s)
[Licensing::Module] Error: Access token is unavailable; failed to update
[Licensing::Client] Successfully updated license
[Licensing::Client] Successfully resolved entitlements
[Licensing::Module] Serial number assigned to: <the serial number>
Pro License: NO
Initialize udev device monitor.

COMMAND LINE ARGUMENTS:
/home/sammonius/Unity/Hub/Editor/2022.3.8f1/Editor/Unity
-quit
-batchmode
-nographics
-buildTarget
EmbeddedLinux
-executeMethod
Builder.Build
-projectPath
-projectPath
/home/sammonius/Projects/My_project/editor
Couldn't set project path to: /home/sammonius/Build/

Aborting batchmode due to failure:
Couldn't set project path to: /home/sammonius/Build/

[Package Manager] Server::Kill -- Server was shutdown
Checking for leaked weakptr:
  Found no leaked weakptrs.
Memory Statistics:
[ALLOC_TEMP_TLS] TLS Allocator
  StackAllocators :
    [ALLOC_TEMP_CoreBusinessMetricsCache]
      Initial Block Size 64.0 KB
      Current Block Size 64.0 KB
      Peak Allocated Bytes 0 B
      Overflow Count 0
    [ALLOC_TEMP_Profiler.Dispatcher]
      Initial Block Size 64.0 KB
      Current Block Size 64.0 KB
      Peak Allocated Bytes 0 B
      Overflow Count 0
    [ALLOC_TEMP_AssetGarbageCollectorHelper] x 3
      Initial Block Size 64.0 KB
      Current Block Size 64.0 KB
      Peak Allocated Bytes 0 B
      Overflow Count 0
[ALLOC_MEMORYPROFILER]
  Requested Block Size 1.0 MB
  Peak Block count 1
  Peak Allocated memory 4.6 KB
  Peak Large allocation bytes 0 B
##utp:{"type":"MemoryLeaks","version":2,"phase":"Immediate","time":1693385636300,"processId":5079,"allocatedMemory":91920,"memoryLabels":[{"Default":730},{"Permanent":32},{"Thread":64},{"Manager":6874},{"GfxDevice":408},{"Serialization":52},{"BaseObject":12376},{"String":5654},{"DynamicArray":132},{"HashMap":17034},{"Utility":1024},{"GI":2920},{"CloudService":168},{"VR":80},{"EditorUtility":3232},{"RestService":1022},{"License":3608},{"UnityConnect":25432},{"Collab":25},{"LocalIPC":222},{"ProfilerEditor":10831}]}
my_machine:~/Build$

Can anybody help me please? I need this.

Thanks!

i am confused reading the command with double -projectPath passed in argument. is that a mistake?
also the error is pointing to a different path than the path you passed in command.

the project path should be the same dir that contains the library and asset folder.

Try to add flags:
-serial YOUR_SERIAL_CODE -username your_username -password your_password