License installs but fails when script is run

Any questions? Need some help?
Post Reply
sanfly
Posts: 6
Joined: 11 May 2019, 10:37

License installs but fails when script is run

Post by sanfly »

Hi

I have purchased a license and it appears to have installed correctly.

Code: Select all

Activate License PXXXXXXX
Write [FileBot License PXXXXXXX (Valid-Until: 2020-05-19)] to [/home/pi/.filebot/license.txt]
FileBot License PXXXXXXX (Valid-Until: 2020-05-19) has been activated successfully.
However, when I run my script after the initial scan I get the cute Stegosaurus telling me I need to purchase a license.

Code: Select all

License Error: UNREGISTERED
 ________________________________________________ 
/ Please purchase a FileBot License:             \
\ https://www.filebot.net/purchase.html#deb      /
 ------------------------------------------------ 
      \                             .       .
       \                           / `.   .' " 
        \                  .---.  <    > <    >  .---.
         \                 |    \  \ - ~ ~ - /  /    |
               _____          ..-~             ~-..-~
              |     |   \~~~\.'                    `./~~~/
             ---------   \__/                        \__/
            .'  O    \     /               /       \  " 
           (_____,    `._.'               |         }  \/~~~/
            `----.          /       }     |        /    \__/
                  `-.      |       /      |       /      `. ,~~|
                      ~-.__|      /_ - ~ ^|      /- _      `..-'   
                           |     /        |     /     ~-.     `-. _  _  _
                           |_____|        |_____|         ~ - . _ _ _ _ _>
FileBot requires a valid license. Please run `filebot --license *.psm` install your FileBot license.
Bad License (>_<)
When I run the filebot -script fn:sysinfo script, I get the following output which tells me that my license is valid until 2020, but has a bunch of errors at the beginning which I have been googling but I don't really know where to start?!?!?

Code: Select all

FileBot 4.8.5 (r6224)
JNA Native: java.lang.ExceptionInInitializerError
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
p7zip: p7zip Version 16.02 (locale=C,Utf16=off,HugeFiles=on,32 bits,4 CPUs LE)
unrar: java.io.IOException: Cannot run program "unrar": error=2, No such file or directory
May 13, 2019 11:10:50 AM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
Chromaprint: fpcalc version 1.4.2
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-05 (r564)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 1.8.0_212
JVM: 32-bit OpenJDK Client VM
CPU/MEM: 4 Core / 224 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
HW: Linux raspberrypi 4.14.98-v7+ #1200 SMP Tue Feb 12 20:27:48 GMT 2019 armv7l GNU/Linux
DATA: /home/pi/.filebot
Package: DEB
License: FileBot License PXXXXXXX (Valid-Until: 2020-05-19)
Done ヾ(@⌒ー⌒@)ノ
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License installs but fails when script is run

Post by rednoah »

1.
Sounds like you're running as User A and it works, and then you're running as User B and it doesn't work.

If you're using any kind of automated setup, cron, etc then you need to make sure that you're running filebot as the user you're usually running it with, or run filebot --license once for each user that's gonna be running filebot.

The filebot -script fn:sysinfo command will tell you which filebot instance is using which $HOME folder to store its application data and license activation information:

Code: Select all

DATA: /home/pi/.filebot

2.
I recommend using the apt repository to install FileBot, to make sure apt install is also automatically installing any dependencies:
https://www.filebot.net/linux/apt.html
:idea: Please read the FAQ and How to Request Help.
sanfly
Posts: 6
Joined: 11 May 2019, 10:37

Re: License installs but fails when script is run

Post by sanfly »

#2. I did install via apt-get after following the instructions in one of your other posts to add the filebot apt repository

1#. Ahhh, okay. This could be it. When I installed my license I didn’t use sudo, but when I first ran the script I made I got permission denied so just ran with sudo without really thinking about it. I will test tonight when I get home.

I haven’t gotten to the point of running corn jobs yet, I wanted to ensure the scripts were working as expected first.

Thanks!
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License installs but fails when script is run

Post by rednoah »

If you run with sudo then it's very possible that you have screwed up the permissions in your own home folder. Just delete /home/pi/.filebot and start from scratch, this time without ever using root.
:idea: Please read the FAQ and How to Request Help.
sanfly
Posts: 6
Joined: 11 May 2019, 10:37

Re: License installs but fails when script is run

Post by sanfly »

Thanks, updating the script file permissions did the trick!

FYI I was unable to find /home/pi/.filebot
amonbofils
Posts: 2
Joined: 16 May 2019, 12:58

Re: License installs but fails when script is run

Post by amonbofils »

hi, i got the same problem here...

i purchase my licence, then i installed it with :

filebot --license /home/Config/ScriptHome/NAS/frenchRenamer/***.psm

then i tried to start my script (as service) and i had this :
LicenseError: UNREGISTERED
License Error: UNREGISTERED
FileBot requires a valid license. Please run `sudo -H -u root filebot --license *.psm` to install your FileBot license.
infos:

Code: Select all

root@Maison:/usr/bin# filebot -script fn:sysinfo
FileBot 4.8.5 (r6224)
JNA Native: 4.0.1
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load amd64 (64-bit) native library libmediainfo.so: Unable to load library 'zen': Native library (linux-x86-64/libzen.so) not found in resource path (/usr/share/filebot/jar/filebot.jar)
p7zip: p7zip Version 16.02 (locale=fr_FR.UTF-8,Utf16=on,HugeFiles=on,64 bits,4 CPUs AMD A8-7600 Radeon R7, 10 Compute Cores 4C+6G   (630F01),ASM,AES-NI)
unrar: java.io.IOException: Cannot run program "unrar": error=2, Aucun fichier ou dossier de ce type
Chromaprint: java.io.IOException: Cannot run program "fpcalc": error=2, Aucun fichier ou dossier de ce type
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: OpenJDK Runtime Environment 11.0.3
JVM: 64-bit OpenJDK 64-Bit Server VM
CPU/MEM: 4 Core / 1 GB Max Memory / 17 MB Used Memory
OS: Linux (amd64)
HW: Linux Maison 4.9.0-9-amd64 #1 SMP Debian 4.9.168-1+deb9u2 (2019-05-13) x86_64 GNU/Linux
DATA: /root/.filebot
Package: DEB
License: FileBot License *****(Valid-Until: 2020-05-23)
Done ヾ(@⌒ー⌒@)ノ
any help ?
amonbofils
Posts: 2
Joined: 16 May 2019, 12:58

Re: License installs but fails when script is run

Post by amonbofils »

nevermind, i've found it, need to run filebot with sudo ...
User avatar
rednoah
The Source
Posts: 22898
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: License installs but fails when script is run

Post by rednoah »

filebot --license will install the license for the current user. If you run filebot as root, then you need to install the license as root.

:!: Running as root is generally not recommended though.
:idea: Please read the FAQ and How to Request Help.
Post Reply