Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

plugin not installing? #25

Open
SANCLA opened this issue Aug 10, 2023 · 32 comments
Open

plugin not installing? #25

SANCLA opened this issue Aug 10, 2023 · 32 comments

Comments

@SANCLA
Copy link

SANCLA commented Aug 10, 2023

I have taken steps to install the plugin.
Manually, including dependencies.
And by adding the plugin to plugins.txt

However, I dont see any new option or even the plugin beeing active in Inventree.
What am I missing here and what would be the steps to introduce a Brother labelprinter into inventree (Brother QL-810Wc)?

Environment is Ubuntu 20.04.6 LTS
Invetree is version 0.12.3

@SchrodingersGat
Copy link
Member

  1. Are you running InvenTree under docker?
  2. Have you gone to the "Plugin Settings" page and enabled the plugin (a required step after installing)

image

@SANCLA
Copy link
Author

SANCLA commented Aug 11, 2023

Hey SchrodingsGat, thanks for responding.

  1. Not running on docker, running on a dedicated VM with full Ubuntu distro.
  2. Not seeing the Brother plugin under plugins, even after reboot:
    SCR-20230811-cr9

@SANCLA
Copy link
Author

SANCLA commented Aug 11, 2023

Just as a check, I just made a second VM with a clean install, same result.
Steps taken:

  1. Installation OS based on "ubuntu-20.04.6-live-server-amd64.iso" with SSH enabled
  2. Connect to VM with SSH
  3. sudo apt update -y && sudo apt upgrade -y && sudo reboot
  4. Connect to VM with SSH
  5. sudo -i
  6. wget -qO install.sh https://get.inventree.org && bash install.sh
  7. Verified that Inventree was up and running, OK. 16 plugins available, InvenTreeBarcode and InvenTreeCoreNotificationsPlugin are enabled by default.
  8. Reboot
  9. Connect to VM with SSH
  10. sudo -i
  11. apt install build-essential libpoppler-cpp-dev pkg-config poppler-utils
  12. pip install pdf-info python-poppler
  13. pip install inventree-brother-plugin
  14. Checked in inventree if brother plugin is already visible, not visible, still only 16 plugins (refreshed plugins and reloaded page entirely).
  15. reboot
  16. Checked in inventree if brother plugin is already visible, not visible

During step 6, the installation of inventree, I did notice a peculiar error message:

# inv update| [PLUGIN] Encountered an error with django:
App registry isn't ready yet.

@rieders
Copy link

rieders commented Aug 12, 2023

Hello
I actually have the same problem.
In Proxmox I created a CT with Debian 11.
I can easily install plugins there.
This doesn't work under VM with debian 11.
Unfortunately, the CT is a bit slower.
Greetings

@SchrodingersGat
Copy link
Member

Might be the case that you are not installing the plugins from within the python environment that inventree is running in.

@rieders @SANCLA have you tried installing the plugin from within the web interface?

@matmair any comments here, regarding installing plugins (via command line) for the native installer setup?

@matmair
Copy link
Member

matmair commented Aug 12, 2023

I really recommend using the install functions in the plugin settings area. Everything else is going to be complicated and dependent on the OS.

@SANCLA
Copy link
Author

SANCLA commented Aug 14, 2023

Might be the case that you are not installing the plugins from within the python environment that inventree is running in.

@rieders @SANCLA have you tried installing the plugin from within the web interface?

@matmair any comments here, regarding installing plugins (via command line) for the native installer setup?

Inventree -> Plugins -> Install plugin:
Package name: inventree-brother-plugin
Source URL: empty

Feedback that plugin was installed, but plugin still not visible, not even after a reboot

Created a third vm with a fresh installation:

  1. Installation OS based on "ubuntu-20.04.6-live-server-amd64.iso" with SSH enabled
  2. Connect to VM with SSH
  3. sudo apt update -y && sudo apt upgrade -y && sudo reboot
  4. Connect to VM with SSH
  5. sudo -i
  6. wget -qO install.sh https://get.inventree.org/ && bash install.sh
  7. Verified that Inventree was up and running, OK. 16 plugins available, InvenTreeBarcode and InvenTreeCoreNotificationsPlugin are enabled by default.
  8. Reboot
  9. Inventree -> settings -> plugins -> Install plugin
    Package name: inventree-brother-plugin
    Source URL: empty
  10. Feedback Inventree: The Plugin was installed. But plugin is not visible, not after refresh plugins of entire page
  11. Reboot
  12. Plugin not visible

Installation log step 6, installation of inventree: https://pastebin.com/L6ZZiA4q

@SANCLA
Copy link
Author

SANCLA commented Aug 14, 2023

Tried the same steps without running apt update and upgrade, same results

@SANCLA
Copy link
Author

SANCLA commented Aug 14, 2023

Still seeing this in the setup logs every time:

# inv update|   Applying report.0016_auto_20210513_1303... OK
# inv update|   Applying report.0017_auto_20230317_0816... OK
# inv update|   Applying report.0018_returnorderreport... OK
# inv update| [PLUGIN] Encountered an error with django:
App registry isn't ready yet.
09:34:04 [Q] INFO Enqueued 1
  Applying report.0019_returnorderreport_metadata... OK
# inv update|   Applying sites.0001_initial... OK
# inv update|   Applying sites.0002_alter_domain_unique... OK
# inv update|   Applying socialaccount.0001_initial... OK
# inv update|   Applying socialaccount.0002_token_max_lengths... OK

@SANCLA
Copy link
Author

SANCLA commented Aug 14, 2023

So just testing here, but I am suspecting this issue has nothing to do with the plugin itself.

Installing inventree-zebra-plugin with below command & reboot:
pip install git+https://github.com/SergeoLacruz/inventree-zebra-plugin
Result: Same result, plugin not visible in inventree, even after installing it afterward with the Inventree gui.

Installing inventree-bulk-plugin with the install plugin button in inventree, same results.

Do you want me to raise the issue in the inventree repro?

@SANCLA
Copy link
Author

SANCLA commented Aug 14, 2023

Tried to reproduce rieder setup with a CT (container) in Proxmox, based on Debian 11.
Had to install sudo and gnupg before I could run the one line install command
Using the install plugin option in Inventree, tried to install inventree-brother-plugin, didnt show up, even after a reboot.
Next I run pip install inventree-brother-plugin with a reboot, same result, plugin not showing up

@SANCLA
Copy link
Author

SANCLA commented Aug 14, 2023

Ok, here is a fun fact I found out.
reading the one line installer, I suspected that ubuntu 22.04 is already supported.
So I created a new vm (doing that a log these days it seems) and run the one-line installer on it.
After Inventree was running, installing the plugin with Inventree add plugin.

Now, I get a lot more feedback:

The Plugin was installed

Collecting inventree-brother-plugin Downloading inventree_brother_plugin-0.7.1-py2.py3-none-any.whl (5.8 kB) Collecting brother-ql-inventree Downloading brother_ql_inventree-1.0-py3-none-any.whl (49 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 49.2/49.2 kB 2.8 MB/s eta 0:00:00 Requirement already satisfied: pillow>=3.3.0 in ./.heroku/python/lib/python3.10/site-packages (from brother-ql-inventree->inventree-brother-plugin) (9.5.0) Collecting click Downloading click-8.1.6-py3-none-any.whl (97 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.9/97.9 kB 826.3 kB/s eta 0:00:00 Collecting pyusb Downloading pyusb-1.2.1-py3-none-any.whl (58 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 58.4/58.4 kB 762.5 kB/s eta 0:00:00 Collecting packbits Downloading packbits-0.6.tar.gz (2.2 kB) Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Requirement already satisfied: attrs in ./.heroku/python/lib/python3.10/site-packages (from brother-ql-inventree->inventree-brother-plugin) (23.1.0) Collecting future Downloading future-0.18.3.tar.gz (840 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 840.9/840.9 kB 2.2 MB/s eta 0:00:00 Preparing metadata (setup.py): started Preparing metadata (setup.py): finished with status 'done' Building wheels for collected packages: future, packbits Building wheel for future (setup.py): started Building wheel for future (setup.py): finished with status 'done' Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492025 sha256=75375e88b7ce35314468a9a118bff4e7ac84780823d1e76f8b5bde154ea1eb7c Stored in directory: /home/inventree/.cache/pip/wheels/5e/a9/47/f118e66afd12240e4662752cc22cefae5d97275623aa8ef57d Building wheel for packbits (setup.py): started Building wheel for packbits (setup.py): finished with status 'done' Created wheel for packbits: filename=packbits-0.6-py3-none-any.whl size=2663 sha256=683b893210f8960ba45c387eec13cc20815d4ae69e5e1509104ed55be1aa122e Stored in directory: /home/inventree/.cache/pip/wheels/0c/84/56/86155baf9260c9bddc0fe7699ecc419b24d360f6a86ebb9a50 Successfully built future packbits Installing collected packages: packbits, pyusb, future, click, brother-ql-inventree, inventree-brother-plugin Successfully installed brother-ql-inventree-1.0 click-8.1.6 future-0.18.3 inventree-brother-plugin-0.7.1 packbits-0.6 pyusb-1.2.1 

Previously, with Ubuntu 20.04, I only received "The Plugin was installed" as feedback.
The plugin is also listed now in the plugins.txt file, that's also new.

Did a reboot and everything, but plugin is still not visible in inventree.
(yes, plugins are enabled in the config file)

@rieders
Copy link

rieders commented Aug 14, 2023

Hello
Glad it's not just me.
I thought it was me or my Proxmox server.
Maybe there is a clean solution.
I recently tried ubuntu 22.
But there were some dependencies missing during the installation.
It seems that something has happened again.
At the moment I haven't set up a system that runs without problems.

Greetings
Andre

@SchrodingersGat
Copy link
Member

It may be that this is related to running in a VM setup.

  1. Do you have the "Check Plugins on Startup" setting configured?

image

  1. What is in your "plugins.txt" file?

@SANCLA

Still seeing this in the setup logs every time:

You are seeing database migrations every time you "setup"? What exactly do you mean by "setup" here? This would indicate that the database is volatile in your install setup.

Can you also share a screenshot of your plugin configuration screen in InvenTree?

@SANCLA
Copy link
Author

SANCLA commented Aug 17, 2023

Hi SchrodingersGat,

  1. Do you have the "Check Plugins on Startup" setting configured?

By default, this setting is not enabled. Enabling this (after trying to install the plugin) makes no difference.

  1. What is in your "plugins.txt" file?

With Ubuntu 20.04, this file is basically empty, no mention of the brother plugin.
With Ubuntu 22.04, the plugin is mentioned in this file.

You are seeing database migrations every time you "setup"? What exactly do you mean by "setup" here? This would indicate that the database is volatile in your install setup.

I see this being mentioned in the console during installation of Inventree

Can you also share a screenshot of your plugin configuration screen in InvenTree?

Of course, but since I have tested several different environments, I wonder for a moment the relevance of taking screenshots of all those environments (as far as I haven't cleaned them up yet).
What would be a good starting situation regarding operating system that we could test further with? According to the documentation, only Debian 11 and Ubuntu 20.04 LTS would be officially supported at this time:
https://docs.inventree.org/en/latest/start/installer/

@rieders
Copy link

rieders commented Aug 17, 2023

Hello
I created a plugins.txt with the user inventree under /opt/inventree/InvenTree/
There I entered a plugin.
Before that I had modified the config_template.yaml and enabled plugins.
I had specified the phat.
After restarting I could not find the plugin in the list.
So I installed the plugins like this.
I used inventorree as a user.
cd /opt/inventory
source ./env/bin/activate
and the corresponding pip plugin.

How can I now transfer my data to the "new" system?

Greetings

Screenshot 2023-08-17 211556

Screenshot 2023-08-17 211418

Screenshot 2023-08-17 211811

Screenshot 2023-08-17 211920
Screenshot 2023-08-17 212003

@timmyhadwen
Copy link

Hi All,

I am seeing the same behaviour as well. No plugins will show in the UI via pip or via the UI. Suspecting this is an issue in Inventory and not this plugin.

Cheers
Tim

@SchrodingersGat
Copy link
Member

@timmyhadwen what is your install method for InvenTree? Docker? Installer?

@timmyhadwen
Copy link

@SchrodingersGat I used the single line install script which installed 0.12.3 (see issue created in Inventree/Inventree)

@SANCLA
Copy link
Author

SANCLA commented Sep 18, 2023

Any update on this matter? Is there any action we can take or test for you?
Or perhaps buy you a cup of coffee ;-)?

@SchrodingersGat
Copy link
Member

To get back up to speed on where we were with this, are you are still running 0.12.3 installed via the command-line installer?

@SANCLA
Copy link
Author

SANCLA commented Sep 19, 2023

Actually, I tossed the old environment away yesterday and was looking to a preferred setup. I prefer a baremetal configuration and based on this conversation, it seems that docker could be a better supported setup.

I can setup both for testing...

@SchrodingersGat
Copy link
Member

I run setups with both docker and bare-metal installs, both of which I have not had any issue installing the brother label plugin. It looks like you have been having issues getting any plugins to run at all?

@timmyhadwen
Copy link

I eventually got it running by manually entering the virtual env and installing it, however installing it via the website still doesn't work.

@SANCLA
Copy link
Author

SANCLA commented Sep 20, 2023

It's getting frustrating to the point where I am thinking about abandoning Inventree altogether.
But okey then, build a brand new bare-metal setup...

  1. Ubuntu 22.04.3, with latest updates (apt update && apt upgrade)
  2. Installation of Inventree with the quick script (wget -qO install.sh https://get.inventree.org && bash install.sh). Installation log on pastebin: https://pastebin.com/pYEifA9a
  3. Install plugin (pip install inventree-brother-plugin). Installation log on pastebin: https://pastebin.com/1zHxszsV
  4. Plugin not visible in Inventree, not even after a reboot of the server.

If you need anymore information, please feel free to look at the previous comments.
Thanks

@SchrodingersGat
Copy link
Member

@SANCLA I can understand your frustration, and sorry that we have not been able to work it out for you yet.

From the overall comments here it seems there is a general bug using plugins with the command line installed version of InvenTree. I will have to deep-dive into this to work out what is going on. I am away for the next few days, but will allocate some time to it next week.

If anyone works it out before then, great :)

@SchrodingersGat
Copy link
Member

I have found some circumstances in which installing the plugin via the web interface just does not work. However no "rhyme or reason" to it yet. Check out inventree/InvenTree#5624

@SchrodingersGat
Copy link
Member

Hey everyone, I think I have worked out what is going on here. In latest stable version of InvenTree, sometimes if the plugin fails to install, it does not correctly capture the failure message and thinks it has installed correctly.

So, likely what has happened is that the plugin has not really installed at all, but we are not seeing why (because there is no error message).

I have a full refactor of the plugin code here - inventree/InvenTree#5624

I will backport a much simpler version of this (just the bug fix, essentially) for the next stable release. Hopefully at least then we can see why the plugin is not installing correctly, and go from there

@SchrodingersGat
Copy link
Member

@timmyhadwen @SANCLA both master and stable now have the plugin installer fix applied - at the very least, installing via the web app should correctly show that the plugin install has failed, and the reason why. Please LMK if you have better luck, or more data to share, with the latest improvements.

@SANCLA
Copy link
Author

SANCLA commented Oct 6, 2023

Since i'm away and my vpn to the homelab, I created a small temporary digitalocean debian vm, debian 10.
Executed the install script, but it seems not the be using the latest inventree version.

Will be checking it again in a few days.

@SANCLA
Copy link
Author

SANCLA commented Nov 24, 2023

Just tested this with a fresh new VM.
OS: Ubuntu 22.04.3 LTS
Inventree version: 0.12.8

Steps taken:

  • Installation of Ubuntu including apt update & apt upgrade
  • Installation of Inventree, bare metal setup using the quick script from the Inventree website
  • Installation of plugin with Inventree's using "Install plugin" from its web interface.

This gives a green feedback field that states no errors after installing the plugin. But the plugin still not visible in Inventree.
I tried to install it again with "pip install inventree-brother-plugin", same result.

@SchrodingersGat
Copy link
Member

@SANCLA does the new version tell you where the plugin is installed? When you install via the server or should give you feedback including the path where the plugin was installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants