nextcloud / translate

A Machine translation provider using Opus models by University of Helsinki running locally on CPU
11 stars 1 forks source link

There are some errors regarding your setup. #51

Closed juergen852 closed 3 months ago

juergen852 commented 3 months ago

Using NC 28 and 29: After installing translate, I get the following error message in NC Administration Overview:

There are some errors regarding your setup.

  1. No translate app models are downloaded. You can download models for the languages you want on the command line with the appropriate occ command.
  2. The node.js executable for the translate app is not working. Go to the admin settings of the translate app to troubleshoot.

Re. 1.: Model was downloaded using "sudo -u www-data php /var/www/nextcloud/occ translate:download-models en de"

Re. 2: No idea where this node.js sould be located. There are several:

Before updating to NC29 (or maybe before App updates in the last 4 weeks), I was able to fix the error by setting the executable flag like this:

Do you have any Ideas how to fix this?

marcelklehr commented 3 months ago

Hello @juergen852

Does /var/www/nextcloud/apps/translate/bin/node exist? Can you try running occ maintenance:repair and check the output for errors?

juergen852 commented 3 months ago

Hello @marcelklehr Thanks for your prompt reply.

I should explain a little more: Last night I tried the update to NC 29, coming from 28.0.6. As I could not find a solution to the "Translate-Problem", I reverted back to 28.

In my 28.0.6 /var/www/nextcloud/apps/translate/bin/node node exists.

After Updating to 29, it did not exist any more. I know this for shure, because my update-script has an entry "chmod +x /var/www/nextcloud/apps/translate/bin/node" and this line threw an error, that "/var/www/nextcloud/apps/translate/bin/node" does not exist. So I tried un- and re-installing Translate on NC 29 but still no "/var/www/nextcloud/apps/translate/bin/node". In your Repo /bin contains only .gitkeep, so I thought that this is OK.

So i reverted back to 28 to wait for your feedback.

Long story short: After Updating to 29 "/var/www/nextcloud/apps/translate/bin/" did not contain node any more. And if I remember correctly, I had to put some node there manually for NC 28....

marcelklehr commented 3 months ago

Ah, I see. If you want to try the update again, make sure to try and run occ maintenance:repair and check if there are errors in the output (paste the output here, if you want, having removed sensitive info). After that the node binary should be working again. If it isn't, you may need to download a node.js binary (version v20.x ) for your platform manually and put it there, or set the path to a working binary in the settings UI. After updating you will also always need to re-download the translation models again.

juergen852 commented 3 months ago

Will test tonight and get back to you.

juergen852 commented 3 months ago

OK, I found the problem... It was my PiHole blocking nodejs.org...

So the updater failed downloading: Repair step: Cleanup cron task Repair step: Install dependencies for translate app Repair error: Downloading of node binary failed

And occ maintenance:repair also failed:

OK...

Checked my PiHole and added nodejs.org to whitelist and ran occ maintenance:repair again. Everything OK now !!!

BTW: I was not aware, that re-downloading of the models is necessary after update. Maybe some hint in readme.md would be also helpful for others.

Thanks again for your help.

juergen852 commented 3 months ago

Solved