Page 1 of 1
[FileBot Node] DSM 6.2.4 authentication workaround
Posted: 04 Apr 2021, 07:07
by rednoah
⭑⭑ UPDATE ⭑⭑
rednoah wrote: 22 May 2021, 05:04
⭑⭑ FileBot packages for Synology DSM 6.2.4 are in beta and available for testing ⭑⭑
Packages for DSM 6.2.4:
Add Package Source:
- Package Center ➔ Settings ➔ Package Sources ➔ Add ➔ Name: FileBot Node
Code: Select all
https://raw.githubusercontent.com/filebot/filebot-node/master/syno-dsm6.json
⭑⭑ UPDATE ⭑⭑
DSM 6.2.4 breaks DSM authentication for FileBot Node, thus the client-side Web UI won't be able to communicate with the server-side node service, i.e. nothing happens when I click on
Execute or any other button.
Option A for docker capable devices:
If you are familiar with
docker and have an
x86_64 device, then you can just use the generic
filebot-node docker container instead:
https://hub.docker.com/r/rednoah/filebot/
e.g. Run a custom
filebot-node service at
http://<IP>:5452/filebot/
Code: Select all
docker run --rm -it -v /volume1:/volume1 -v data:/data -p 5452:5452 -e FILEBOT_NODE_AUTH=BASIC -e FILEBOT_NODE_AUTH_USER=alice -e FILEBOT_NODE_AUTH_PASS=wxy87rFb
Option B for FileBot Node 0.3.1 and lower:
If you're familiar with SSH, then you can configure the FileBot Node server-side service to use HTTP BASIC authentication instead of Synology authentication.
Edit
/var/packages/filebot-node/target/start
Code: Select all
sudo vi /var/packages/filebot-node/target/start
and configure
FILEBOT_NODE_AUTH from
to use
HTTP BASIC authentication with a custom username and password
Code: Select all
export FILEBOT_NODE_AUTH=BASIC
export FILEBOT_NODE_AUTH_USER=alice
export FILEBOT_NODE_AUTH_PASS=wxy87rFb
Restart the FileBot Node server-side service by restarting your NAS.

You can now open
http://<IP>:5000/webman/3rdparty/filebot-node/index.html directly without having to log in via Synology DSM first.
Re: [FileBot Node] DSM 6.2.4 workaround
Posted: 06 Apr 2021, 17:52
by aglyons
I tried Option B.
This does not work. Yes, Filebot Node is accessible but Node, for some reason cannot communicate with Filebot.
When I start FB on a pre 6.2.4 DSM, Node displays the FB version showing that it can call the service. on 6.2.4 DSM version, that does not happen and calling the script does nothing.
*** Pre 6.2.4 - Displays FB Version info****
**** Post 6.2.4 - No FB version info displayed****
**** Post 6.2.4 following Option B - No FB version info displayed*****

Re: [FileBot Node] DSM 6.2.4 workaround
Posted: 06 Apr 2021, 19:45
by colpepe
Hello. I am having similar issues with option B. Here is my full dump from '/var/packages/filebot-node/target/start':
Code: Select all
#!/bin/sh
export FILEBOT_NODE_HOST="127.0.0.1" # bind to local nginx reverse proxy
export FILEBOT_NODE_AUTH="BASIC"
export FILEBOT_NODE_AUTH_USER=MyUser
export FILEBOT_NODE_AUTH_PASS=MyPa$$
export FILEBOT_NODE_HTTP="YES"
export FILEBOT_NODE_HTTP_PORT="5452"
export USER="admin" >
export JAVA_OPTS=`awk '/MemTotal:/ { xmx = ($2*0.8)/1024; if (xmx < 1024) { printf "-Xmx%dm", xmx }; exit}' /p>
export FILEBOT_NODE_DATA="/usr/local/filebot-node/data"
export FILEBOT_TASK_CMD="/usr/local/filebot-node/task"
export FILEBOT_CMD="filebot"
export FILEBOT_CMD_CWD="/volume1"
export FILEBOT_CMD_UID=`id -u $USER`
export FILEBOT_CMD_GID=`cat /etc/group | grep 'administrators' | cut -d: -f3` # cannot use `id>
export FILEBOT_NODE_CLIENT="client"
# sanity check
if [ -z "$FILEBOT_CMD_UID" ]; then
echo "id -u $USER must not be empty"
exit 1
fi
# debug output
if ! ls -l "$(which node)"; then
echo "Node.js is not installed. Please install Node.js in the Package Center."
fi
# set working dir
cd "/usr/local/filebot-node"
# --optimize_for_size (Enables optimizations which favor memory size over execution speed.)
node --optimize_for_size "server/app.js"
It loads up ok when ran, no errors in pkgctl logs, but terminal is blank and the buttons do not a thing.
Edit: I get the same thing when I access from 'http://<IP>:5000/webman/3rdparty/filebot-node/index.html' just a bigger window.
Thanks in advance!
Re: [FileBot Node] DSM 6.2.4 workaround
Posted: 07 Apr 2021, 02:31
by rednoah
1.
Did you restart the FileBot Node service after you mode your code changes?
2.
If you continue to have trouble, please open the
Developer Tools in your Browser so you can see each HTTP request and the corresponding error message:

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 07 Apr 2021, 09:26
by davemccreath
For rednoah
I too have the same issue with FileBot post the 6.2.4 update last night.
I'm not that savvy when it comes to SSH or Docker, is it worth waiting for an update for FileBot to fix the issue or are you focussed on the forthcoming DSM 7 release (finger's crossed).
Regards
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 07 Apr 2021, 10:11
by rednoah
DSM 6.2.4 seems to be rolling out to more devices since yesterday. I'll start working on a fix for DSM 6.2.4 once my DS213J auto-updates.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 07 Apr 2021, 13:00
by colpepe
On my Node page I get the following errors:
Firstly,
Code: Select all
app.js?_dc=20200824200454:1 Uncaught RangeError: Maximum call stack size exceeded
at String.replace (<anonymous>)
at Object.encodeString (app.js?_dc=20200824200454:1)
at Object.doEncode [as encodeValue] (app.js?_dc=20200824200454:1)
at encodeObject (app.js?_dc=20200824200454:1)
at Object.doEncode [as encodeValue] (app.js?_dc=20200824200454:1)
at encodeObject (app.js?_dc=20200824200454:1)
at Object.doEncode [as encodeValue] (app.js?_dc=20200824200454:1)
at encodeObject (app.js?_dc=20200824200454:1)
at Object.doEncode [as encodeValue] (app.js?_dc=20200824200454:1)
at encodeObject (app.js?_dc=20200824200454:1)
Followed by a lot of,
Code: Select all
tasks:1 Failed to load resource: the server responded with a status of 401 (Unauthorized)
Thanks Noah!
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 07 Apr 2021, 15:51
by colpepe
Alright I will take back what I said Noah. I am up and working at present.
1. Killed Filebot Node service
2. Updated '/var/packages/filebot-node/target/start' with local device admin creds
3. Started Filebot Node service back up
4. Logged into web page; text is now showing in terminal window
5. Imported license back in, dry run good, execute works!
Not sure what I did wrong yesterday but your SSH workaround worked just fine for me today! Thanks for your hard work and your great product!
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 07 Apr 2021, 20:52
by aglyons
I restarted Filebot-Node and saw the same thing.
I adjusted the changes to the start file, mainly wrapped the cars in quotes as that's how they are in the original. I missed that BASIC was in caps so fixed that. Upon loading the page I was prompted for web auth U and P but only once. Subsiquent loads didn't ask for credentials.
Now, while I did manage to get Node talking with Filebot as there is output in the CLI window, it appears that Filebot cannot access the DIR's configured.
Plot thickens.
Code: Select all
filebot -script 'fn:amc' '/Sync/Seedbox/2-To Process' --output /Sync/Seedbox/3-Processed --action duplicate -non-strict --order Airdate --conflict auto --lang en --def 'unsorted=y' 'skipExtract=y' 'seriesFormat=TV/{n}/{n} - {s00e00} - {t}' 'movieFormat=Movies/{n} {y}' 'excludeList=.excludes' --apply refresh -no-probe -no-index --log all --log-file '/usr/local/filebot-node/data/filebot.log'
------------------------------------------
OpenJDK 64-Bit Server VM warning: Option --illegal-access is deprecated and will be removed in a future release.
File does not exist: /Sync/Seedbox/2-To Process
Run script [fn:amc] at [Wed Apr 07 15:49:09 COT 2021]
Parameter: unsorted = y
Parameter: skipExtract = y
Parameter: seriesFormat = TV/{n}/{n} - {s00e00} - {t}
Parameter: movieFormat = Movies/{n} {y}
Parameter: excludeList = .excludes
Invalid usage: output folder must exist and must be a directory: /Sync/Seedbox/3-Processed
Abort (×_×)
------------------------------------------
[Process error]
🔺 Exit Code: 4
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 08 Apr 2021, 02:43
by rednoah
These errors would suggest some kind of generic file system / user permission issue somewhat unrelated to FileBot Node or FileBot specifically:
Code: Select all
File does not exist: /Sync/Seedbox/2-To Process
...
Invalid usage: output folder must exist and must be a directory: /Sync/Seedbox/3-Processed
...
EDIT:
This is likely related to DSM 6.2.4 encouraging you to disable the
admin user.
FileBot Node runs
filebot as
admin so strange things may happen if
admin is disabled.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 08 Apr 2021, 05:38
by rednoah
FileBot Node for
Synology DSM 6.2.4 is available for testing:
filebot-node-0.4.0-noarch.spk

You may need to uninstall older versions of FileBot Node, before manually installing the latest beta package. Upgrading the package may result in broken permissions caused by previously created user data.

FileBot Node is no longer integrated into the DSM nginx service. You therefore
cannot use Quick Connect to access the FileBot Node WebUI.
EDIT:
You may or may not need to disable CSRF authentication token feature for Synology authentication integration to work:

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 08 Apr 2021, 13:42
by aglyons
Hey renoah, thanks for putting some time into fixing the debacle Synology has handed us all.
I also use MODs to trigger filebot so I can have a one-click desktop shortcut. Perhaps you guys can chat for a bit and figure out how to incorporate what he's been doing with what you're doing. His approach basically triggers the same script that Node creates for the scheduled tasks. While great, any changes to Node creates a new schedule and breaks MODs which requires editing a text file via SSH in order to get it to run the right script.
https://github.com/vletroye/SynoPackage ... t%20Runner
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 08 Apr 2021, 15:04
by colpepe
@rednoah - my syno 'admin' account is disabled and FBN runs fine in my case, just for the record.
@Aglyons - That is the first I heard about the MODS tools, thanks for that. Is there any reason you wouldn't just schedule filebot to run a task every 5-10 mins so you don't have to hassle with running it manually? I am just curious of your usage scenario.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 08 Apr 2021, 18:05
by Dmx
Hi rednoah,
thanks for still putting effort in DSM 6.2.4, I think its good since DSM 7 is still some time away. I saw that you uploaded a testversion and I want to give you feedback on it. This is v. 0.4.0 from your previous post. I had the latest online available version installed and updated it manually via Syno Package Center. A new window pops up after upgrading saying you need to give the System Internal Filebot User Read/Write Permissions on your working shares. This is very good advice at this point as otherwise it wouldn't work (see next paragraph)!
Filebot Node opens in a new Browser tab from now on (not like before in the Syno GUI), so I could confirm that authentication works properly again without changing anything manually. I tried a Dry run in Node before giving the Filebot User Read/Write access just to test and as expected it gave me an error due to missing permissions. Gave permission to the user and rebooted (the reboot was necessary at least for me, otherwise I would still get the same Permission error). Creating Tasks and Scheduling them seems to also work properly with this version.
Only thing I noticed which I'm not sure of is that a warning appears if you do something in the Filebot Node GUI saying you shouldn't run filebot.sh as root. I believe it wasn't like this in the old version, only if you really ran filebot.sh as root via SSH or your scheduler for example.
Example from opening the Filebot Node GUI:
Code: Select all
$ filebot -version
/volume1/@appstore/filebot/filebot.sh must NOT run as root
FileBot 4.9.3 (r8338) / OpenJDK Runtime Environment 14.0.1 / Linux 4.4.59+ (amd64)
Additional Sidenote:
- I didn't need to disable CSRF protection
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 08 Apr 2021, 23:03
by darko
Thank you for this update, @rednoah! Like many others, I was stuck with DSM 6.2.4 and a broken FileBot Node installation. I now have FileBot Node 0.4.0 working smoothly with DSM 6.2.4.
Here are my notes with respect to getting 0.4.0 working:
• I needed to change permissions on /var/packages/filebot-node/target/*, as I was getting an access denied error when trying to set my license and when writing to log files.
• I also needed to do the same for .excludes files, which FileBot was not able to write to at first.
• For new users, I think the new UI and process around scheduling tasks will be a bit counter-intuitive compared to previous versions. If this is temporary/beta-only, disregard.
Thanks again for getting this out quickly!
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 02:54
by rednoah
Dmx wrote: 08 Apr 2021, 18:05
Only thing I noticed which I'm not sure of is that a warning appears if you do something in the Filebot Node GUI saying you shouldn't run filebot.sh as root. I believe it wasn't like this in the old version, only if you really ran filebot.sh as root via SSH or your scheduler for example.
The
filebot must NOT run as root warning should go away once you create a custom
admin user and disable the default
admin user.
darko wrote: 08 Apr 2021, 23:03
I needed to change permissions on /var/packages/filebot-node/target/*, as I was getting an access denied error when trying to set my license and when writing to log files.
Executed via FileBot Node or via SSH? The
filebot process executed by FileBot Node will run as
$SYNOPKG_USERNAME:users but if you run it via SSH or Task Scheduler, then you can run it as different users with different permissions which may lead to permission conflicts.
darko wrote: 08 Apr 2021, 23:03
For new users, I think the new UI and process around scheduling tasks will be a bit counter-intuitive compared to previous versions. If this is temporary/beta-only, disregard.
FileBot Node can no longer integrate into DSM because we can no longer modify DSM internal files. The Scheduled Tasks feature is now the same across all platforms, i.e. it'll give you a command but you'll have to paste it into Task Scheduler yourself.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 03:05
by darko
Executed via FileBot Node or via SSH? The filebot process executed by FileBot Node will run as $SYNOPKG_USERNAME:users but if you run it via SSH or Task Scheduler, then you can run it as different users with different permissions which may lead to permission conflicts.
This was when executing FileBot via the FileBot Node GUI to test everything before I created a scheduled task.
Thanks for the specifics around what user/group is used in these cases; I'll be able to go back and tighten down permissions a bit.
Regarding what you know so far about the changes to DSM, do you think this change is permanent, or will DSM 7 restore some flexibility? I ask because this change seems to have garnered a lot of negative press, and I'm wondering if Synology is considering taking a different approach in the future.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 03:40
by rednoah
DSM 7.0 is all about implementing good security practices. Forcing each package to run as its own user / group with limited permissions is easy and just makes sense. Synology won't (and shouldn't) go back on that. Running everything as root was never a good idea in the first place.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 04:08
by darko
I agree with you there, but it's regrettable that FileBot Node can no longer leverage the DSM UI. Or maybe FileBot Node was using it in some non-standard ways. Regardless, it feels like they made a change with good intentions that has had some negative consequences for package authors.
On the other hand, much of the value of FileBot is in the set-it-and-forget-it paradigm it affords, and once things are running smoothly I typically don't need to interact with it much.

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 05:44
by Dmx
rednoah wrote: 09 Apr 2021, 02:54
Dmx wrote: 08 Apr 2021, 18:05
Only thing I noticed which I'm not sure of is that a warning appears if you do something in the Filebot Node GUI saying you shouldn't run filebot.sh as root. I believe it wasn't like this in the old version, only if you really ran filebot.sh as root via SSH or your scheduler for example.
The
filebot must NOT run as root warning should go away once you create a custom
admin user and disable the default
admin user.
Hi,
ah, I see. Thanks for the explanation. At least I know why this is appearing now. I'm not going to disable the default admin use though, so it doesn't really matter in the end

Thanks again for the new version.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 06:12
by davemccreath
rednoah. Many thanks for the update but for me it failed.
I set up a custom administrator account several months ago and disabled the old admin account.
I manually installed the filebot-node-0.4.0-noarch.spk file and followed the on-screen instructions post the install allowing filebot Read/Write access to both the folder items are downloaded into and the folder that filebot moves them to after renaming.
For me, when executing filebot it opens in a new window with my IP address as the URL and a port number in the 54** series. The window says This site can't be reached, (IP Address) refused to connect.
Tried a reinstall and also reversing the file permissions all to no avail (with reboots of the system after each change).
Regards
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 06:21
by rednoah
What does the log say?
viewtopic.php?t=11030
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 12:49
by davemccreath
rednoah
I've managed to SSH into the NAS but being a bit of a noob I've no idea how to open the file and I'm not so sure that it is there. Below is a dump from putty showing the contents of the directory.

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 16:11
by rednoah
find / -name filebot-node.log will find the log for you:
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 09 Apr 2021, 16:16
by davemccreath
Ahh, found it under /var/log/packages/filebot-node.log
Stopped the FileBot Node process at 1658hrs via DSM and restarted a couple of seconds later.

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 01:52
by rednoah
Looks like there might be more than one result:
Code: Select all
$ find / -name filebot-node.log 2> /dev/null
/var/log/packages/filebot-node.log
/volume1/@appstore/filebot-node/filebot-node.log
I meant the second one:
Code: Select all
sudo cat /volume1/@appstore/filebot-node/filebot-node.log
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 02:01
by davemccreath
And here is the result from 'sudo cat /volume1/@appstore/filebot-node/filebot-node.log'

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 02:36
by davemccreath
Ahh....I may have found the reason for not seeing the newly opened FileBot page when opening FileBot from within DSM. I use my Quickconnect ID to log into DSM. Just switched to using the local IP address and that opens FileBot in a new page and I can see all the settings. I've updated the input/output folders but when I press Execute I get an 'Unauthorised' error, see below:

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 02:52
by rednoah
You cannot use QuickConnect anymore, since FileBot Node is now running independently of DSM. You will still have to log into DSM first. You must access DSM and FileBot Node via the same IP, as to create the DSM authentication cookie for that site in your browser.

If you get an
Unauthorized error in the WebUI, then you may find additional information about the blocked request in the
filebot-node.log file.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 02:55
by davemccreath
Thank you. I'll have a play around and see if I can get FileBot back up and running again.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 08:26
by davemccreath
rednoah.
Well all back up and running well.
Have you any idea of what the new 'User Defined Script' should be to run FileBot from within the DSM Task Scheduler?
I've tried the following without success:
/volume1/@appstore/filebot/filebot.sh
/usr/local/filebot-node/task 0 ((worked with the previous version))
Regards, as ever
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 10:17
by rednoah
Click
Execute ➔ Schedule and then copy the command from there:

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 10 Apr 2021, 14:22
by davemccreath
Perfect.
Once again, thank you.
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 12 Apr 2021, 14:00
by jonc
I'm trying out the 0.4.0 beta spk
I followed the instructions to give the internal FileBot user access to the relevant directories/shared folder, but still getting a java.nio.file.AccessDeniedException
Any ideas?
(edit: I can hack it by giving all users access to the shared folder)
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 13 Apr 2021, 06:39
by rednoah
jonc wrote: 12 Apr 2021, 14:00
I followed the instructions to give the internal FileBot user access to the relevant directories/shared folder, but still getting a java.nio.file.AccessDeniedException
Use
Tools ➔ System Information to check which user
filebot is called as. Then make sure that that user / group has the appropriate permissions. Note that calling
filebot via FileBot Node / Synology Scheduler / SSH / etc may result in
filebot being called as a different user depending on the context.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 13 Apr 2021, 19:31
by tommygunz747
Hey there,
is there any chance to fix this problem over an official update ? Sorry but its to complicated for me to fix it like given in option A or B.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 14 Apr 2021, 04:04
by rednoah
You could try this:
rednoah wrote: 08 Apr 2021, 05:38
FileBot Node for
Synology DSM 6.2.4 is available for testing:
filebot-node-0.4.0-noarch.spk

You may need to uninstall older versions of FileBot Node, before manually installing the latest beta package. Upgrading the package may result in broken permissions caused by previously created user data.

FileBot Node is no longer integrated into the DSM nginx service. You therefore
cannot use Quick Connect to access the FileBot Node WebUI.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 14 Apr 2021, 14:34
by tommygunz747
Now its working fine again! Thank you !
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 15 Apr 2021, 00:06
by drsteveplatt
I can report that I have installed the 0.4.0 beta for the 6.2.4 filebot and was able to get it running.
Thank you, rednoah!
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 15 Apr 2021, 20:41
by aglyons
colpepe wrote: 08 Apr 2021, 15:04
@rednoah - my syno 'admin' account is disabled and FBN runs fine in my case, just for the record.
@Aglyons - That is the first I heard about the MODS tools, thanks for that. Is there any reason you wouldn't just schedule filebot to run a task every 5-10 mins so you don't have to hassle with running it manually? I am just curious of your usage scenario.
@colpepe - My use case really is I don't want it to run in the bg when I don't really need it to. I have a 1515+ and the CPU spikes every time FB runs. Another reason is sometimes FB just doesn't make the right match and I have to rename the file slightly for it to make a match on TMDB. I really only need it to run maybe once or twice a day, that's it so scheduling every 15 min is a waste of cycles IMO. That's when I came across MODs. One-click run makes things a bit easier to manage especially since I am supporting my dad's setup as well. If there's any way I can make things simpler for him the better my life ends up.
@rednoah - As for nixing the default admin account. I did that on day one when I bought the system years ago, well before I installed FB or Node. Still, I always get the 'run as root' message every time FB runs. It always worked so I never thought it a concern.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 16 Apr 2021, 21:47
by jay960
Hello,
I also have problem with DSM 6.2.4
I have installed the FileBot beta 0.4.0 but when I click on FileBot Node I have a page that load with my NAS IP address and port 5452 and I get this message
{"success":false,"error":"Error: ENOENT: no such file or directory, uv_cwd"}
Here is my log :
//EDIT//
Sorry, had to simply restart my NAS...

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 23 Apr 2021, 11:17
by norrington
any update yet or planned? the workaround does not work for me
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 23 Apr 2021, 17:39
by Phobos
Hi there,
I hope I'm posting in the right place. I too experienced the breakage as a result of the DSM update. I installed 4.9.3 and it mostly works but I am experiencing a problem that I never had before with FileBot. After it does its thing and moves my files from one folder into a Plex formatted media folder, Plex doesn't seem to recognize most of the media files. Doing the Plex dance of moving the files out and then back in, cleaning the bundles, and optimizing the database seems to solve the problem; but of course that takes away from some of the "set it and forget it" point of Filebot. If there's something I'm doing or not doing, please let me know. I'm a bit of a noob so if it's super technical, I may struggle with it I'm afraid. Many thanks for any assistance you can provide.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 11 May 2021, 16:17
by aglyons
is a final v0.4.0 going to be pushed to the community repository?
I've been holding off updating to DSM6.2.4 so things don't break on me.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 11 May 2021, 17:15
by rednoah
aglyons wrote: 11 May 2021, 16:17
v0.4.0 going to be pushed to the community repository?
Not planned for now, since that would break things for pre-DSM 6.2.4 users.
But if you prefer to install via the package source, then you can add this package source instead for the latest package:
https://raw.githubusercontent.com/fileb ... /syno.json
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 18 May 2021, 21:32
by xIntenso
rednoah wrote: 11 May 2021, 17:15
aglyons wrote: 11 May 2021, 16:17
v0.4.0 going to be pushed to the community repository?
Not planned for now, since that would break things for pre-DSM 6.2.4 users.
But if you prefer to install via the package source, then you can add this package source instead for the latest package:
https://raw.githubusercontent.com/fileb ... /syno.json
This worked like a charm for me!
Remember to uninstall the old version of Node before upgrading, because I forgot to, and I got permission errors until I did a full uninstall and reinstall.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 10:21
by rednoah
FileBot Node 0.4.1 for DSM 6.2.4 is now available for testing:
https://github.com/filebot/filebot-node/releases
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 11:56
by davemccreath
rednoah
System is DS218+ using DSM 6.2.4, all up to date. FileBot up and working fine with FileBot Node 0.4.0.
Uninstalled FileBot Node 0.4.0 and installed 'filebot-node-0.4.1.spk'. Rebooted and it came back with 'Unauthorised', permissions all OK. Unistalled 0.4.1 and rolled back to 0.4.0 ('filebot-node-0.4.0-noarch.spk') all fine again.
Did not work my end.
Any ideas?
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 12:25
by rednoah
What does the log say?
Code: Select all
cat /var/packages/filebot-node/target/filebot-node.log
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 13:48
by davemccreath
Just uninstalled FileBot 0.4.0, rebooted and installed Filebot 0.4.1. Ran it and unauthorised again.
Log File below:
Code: Select all
ENVIRONMENT { SYNOPKG_DSM_LANGUAGE: 'def',
FILEBOT_TASK_CMD: 'filebot-node-task',
TERM: 'vt102',
FILEBOT_CMD_UID: '0',
SYNOPKG_TEMP_LOGFILE: '/tmp/synopkgmgr.log-filebot-node',
SYNOPKG_DSM_ARCH: 'apollolake',
OLDPWD: '/',
JAVA_OPTS: '',
FILEBOT_CMD_CWD: '/volume1',
PATH: '/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin',
SELF: 'filebot-node',
FILEBOT_CMD_GID: '0',
PWD: '/var/packages/filebot-node/target',
SYNOPKG_PKGDEST: '/volume1/@appstore/filebot-node',
FILEBOT_NODE_HOST: '127.0.0.1',
SYNOPKG_PKGVER: '0.4.1',
SYNOPKG_DSM_VERSION_MINOR: '2',
SHLVL: '3',
FILEBOT_CMD: 'filebot',
SYNOPKG_DSM_VERSION_BUILD: '25556',
UPSTART_INSTANCE: '',
UPSTART_EVENTS: 'syno.pkgctl.pkgstart',
SYNOPKG_PKGNAME: 'filebot-node',
FILEBOT_NODE_HTTP_PORT: '5452',
SYNOPKG_DSM_VERSION_MAJOR: '6',
SYNOPKG_PKGDEST_VOL: '/volume1',
FILEBOT_NODE_AUTH: 'SYNO',
UPSTART_JOB: 'pkgctl-filebot-node',
FILEBOT_NODE_DATA: '/var/packages/filebot-node/target/data',
FILEBOT_NODE_HTTP: 'YES',
_: '/usr/local/bin/node' }
USER { UID: 0, GID: 0 }
filebot-node listening at http://127.0.0.1:5452
/usr/syno/synoman/webman/authenticate.cgi
{ HTTP_COOKIE: 'id=XYZ',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 14:17
by rednoah
HTTP_X_SYNO_TOKEN: undefined could be a problem if
Improve protection against cross-site request forgery attacks is disabled. The new version should be able to work with that setting being either enabled or disabled though. Note that this setting might not come into effect until you sign out / sign in again.
Let's try
enabling that, then Sign Out / Sign In in DSM to reset the DSM user session, then open FileBot Node and see if
HTTP_X_SYNO_TOKEN: <something> now appears in the logs.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 14:55
by davemccreath
rednoah
It was already enabled. However, logged out and then back in again. Log still shows
Code: Select all
{ HTTP_COOKIE: 'id=FL7F7x99WixPyJDacRX-gBVuacX_VOaj3247036GpB8bohytQ3iRG75JIJ32KZ_f4wRF2q0Mr_b4uCalAFkE3M',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 14:58
by davemccreath
Full log below:
Code: Select all
FILEBOT_TASK_CMD: 'filebot-node-task',
TERM: 'vt102',
FILEBOT_CMD_UID: '0',
SYNOPKG_TEMP_LOGFILE: '/tmp/synopkgmgr.log-filebot-node',
SYNOPKG_DSM_ARCH: 'apollolake',
OLDPWD: '/',
JAVA_OPTS: '',
FILEBOT_CMD_CWD: '/volume1',
PATH: '/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin',
SELF: 'filebot-node',
FILEBOT_CMD_GID: '0',
PWD: '/var/packages/filebot-node/target',
SYNOPKG_PKGDEST: '/volume1/@appstore/filebot-node',
FILEBOT_NODE_HOST: '127.0.0.1',
SYNOPKG_PKGVER: '0.4.1',
SYNOPKG_DSM_VERSION_MINOR: '2',
SHLVL: '3',
FILEBOT_CMD: 'filebot',
SYNOPKG_DSM_VERSION_BUILD: '25556',
UPSTART_INSTANCE: '',
UPSTART_EVENTS: 'syno.pkgctl.pkgstart',
SYNOPKG_PKGNAME: 'filebot-node',
FILEBOT_NODE_HTTP_PORT: '5452',
SYNOPKG_DSM_VERSION_MAJOR: '6',
SYNOPKG_PKGDEST_VOL: '/volume1',
FILEBOT_NODE_AUTH: 'SYNO',
UPSTART_JOB: 'pkgctl-filebot-node',
FILEBOT_NODE_DATA: '/var/packages/filebot-node/target/data',
FILEBOT_NODE_HTTP: 'YES',
_: '/usr/local/bin/node' }
USER { UID: 0, GID: 0 }
filebot-node listening at http://127.0.0.1:5452
/usr/syno/synoman/webman/authenticate.cgi
{ HTTP_COOKIE: 'id=u_lGQ4USnHAtrWynGHHesedGfeFcl5CKRthuGhTt47gzlslUHKdpOyX2pIbEq5K3n_c0mIP_MI1aK3DhvnQ_fc',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }
/usr/syno/synoman/webman/authenticate.cgi
{ HTTP_COOKIE: 'id=u_lGQ4USnHAtrWynGHHesedGfeFcl5CKRthuGhTt47gzlslUHKdpOyX2pIbEq5K3n_c0mIP_MI1aK3DhvnQ_fc',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }
/usr/syno/synoman/webman/authenticate.cgi
{ HTTP_COOKIE: 'id=u_lGQ4USnHAtrWynGHHesedGfeFcl5CKRthuGhTt47gzlslUHKdpOyX2pIbEq5K3n_c0mIP_MI1aK3DhvnQ_fc',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }
/usr/syno/synoman/webman/authenticate.cgi
{ HTTP_COOKIE: 'id=FL7F7x99WixPyJDacRX-gBVuacX_VOaj3247036GpB8bohytQ3iRG75JIJ32KZ_f4wRF2q0Mr_b4uCalAFkE3M',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }
/usr/syno/synoman/webman/authenticate.cgi
{ HTTP_COOKIE: 'id=FL7F7x99WixPyJDacRX-gBVuacX_VOaj3247036GpB8bohytQ3iRG75JIJ32KZ_f4wRF2q0Mr_b4uCalAFkE3M',
REMOTE_ADDR: '192.168.1.2',
HTTP_X_SYNO_TOKEN: undefined }
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 15:11
by rednoah
Well, in this case, let's see what happens if we disable that setting?
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 15:16
by davemccreath
Ha! Tried that as well, got the the following error message in the FileBot window:
Code: Select all
{"success":false,"error":"ILLEGAL REQUEST"}
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 15:32
by rednoah
What's the URL for that page? Did you open the FileBot Node window by clicking on FileBot Node in the DSM UI, or by directly pasting some URL into your browser?
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 15:54
by davemccreath
rednoa
URL is on the local network: 192.168.1.xx:5001.
Selected the FileBot Node icon from within the DSM UI.
This is with 'Improve protection against cross-site request forgery attacks' NOT selected
And this with 'Improve protection against cross-site request forgery attacks' selected

Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 16:18
by rednoah
That response shouldn't be possible... unless there's a filebot-node reverse_proxy configuration, which can't possibly exist...
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 16:23
by davemccreath
As requested;;
Code: Select all
total 28
-rw-r--r-- 1 root root 122 Apr 7 07:16 dsm.filebot-node.conf
-rw-r--r-- 1 root root 72 May 22 14:59 dsm.ssdp.conf
-rw-r--r-- 1 root root 192 May 22 14:59 dsm.StorageAnalyzer.conf
-rw-r--r-- 1 root root 282 May 22 17:03 dsm.synorelayd.conf
-rw-r--r-- 1 root root 0 May 22 14:58 events.conf
-rw-r--r-- 1 root root 0 May 22 14:58 main.conf
lrwxrwxrwx 1 root root 69 May 22 14:59 www.phpMyAdmin.enable.conf -> /var/packages/phpMyAdmin/target/nginx_conf/www.phpMyAdmin.enable.conf
lrwxrwxrwx 1 root root 68 Mar 30 07:20 www.WordPress.conf -> /var/packages/WordPress/target/synology_added/etc/www.WordPress.conf
-rw-r--r-- 1 root root 460 May 22 15:00 x-accel.VideoStation.conf
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 16:33
by rednoah
WTF?!?!
So this entire thread is all about DSM integration no longer working because DSM 6.2.4 package permissions no longer allowing us to create our
/usr/local/etc/nginx/conf.d/dsm.filebot-node.conf reverse proxy configuration on install. And yet here you are with that file. I can only assume that it was installed pre-DSM 6.2.4 and then stuck around, because the same permissions that prevent our package from creating that file nowadays would also prevent it from deleting that file if it were to be there already.
TL;DR
sudo rm /usr/local/etc/nginx/conf.d/dsm.filebot-node.conf and then restart the machine. That should restore some sanity to the world.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 16:39
by davemccreath
And that worked.
Apologies if I was unintentionally at fault.....trying my best!
Regards
Dave
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 22 May 2021, 17:27
by rednoah
davemccreath wrote: 22 May 2021, 16:39
Apologies if I was unintentionally at fault.....trying my best!
Just a strange side-effect of Synology limiting what packages can and cannot do over time. This issue might very well affect quite a lot of people, possibly every user who had FileBot Node installed before upgrading to DSM 6.2.4 so it's good to know the symptoms and the solution.
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 24 May 2021, 14:43
by xIntenso
Version 0.4.1.1 no longer works for me, even after uninstalling and then reinstalling.
I get the following error message:
Code: Select all
{"success":false,"error":"Error: ENOENT: no such file or directory, uv_cwd"}
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 24 May 2021, 15:06
by rednoah
Is this a HTTP response you seen in your browser? Or is it a JS error in the console? Is there a call stack attached to that error? Or is this a line from the server-side log? Does the server-side log say anything other than that?
EDIT:
Have you tried restarting your device yet?
viewtopic.php?p=54430#p54430
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 24 May 2021, 22:53
by xIntenso
rednoah wrote: 24 May 2021, 15:06
Is this a HTTP response you seen in your browser? Or is it a JS error in the console? Is there a call stack attached to that error? Or is this a line from the server-side log? Does the server-side log say anything other than that?
EDIT:
Have you tried restarting your device yet?
viewtopic.php?p=54430#p54430
You were right, a reboot did the trick!
For the record: It was an error message in the application window inside DSM. It was the only line of text in the window, at the very top left.
Thanks for the quick solution!
Re: [FileBot Node] DSM 6.2.4 authentication workaround
Posted: 25 May 2021, 11:37
by rednoah
Looks like Stop doesn't actually do anything sometimes, and so the node process keeps running, and with underlying files being deleted on uninstall, it will fail on file system access, and on reinstall prevent the new process from starting since port is already in use. A restart will fix all of that.