cconard96 / glpi-screenshot-plugin

Take a screenshot or screen recording directly from GLPI and attach it to a ticket, change or problem
GNU General Public License v2.0
5 stars 0 forks source link

Cannot update to version 1.1.4 via marketplace #20

Closed jackburton79 closed 2 years ago

jackburton79 commented 2 years ago

GLPI Version 9.5.5. Screenshot plugin version 1.1.3 is installed through the marketplace. When I tried to update it through marketplace nothing happens.

In php_errors.log I get these errors: [2021-09-10 09:36:47] glpiphplog.CRITICAL: *** Uncaught Exception UnexpectedValueException: internal corruption of phar "/usr/local/share/glpi/files/_tmp/glpi-screenshot-v1.1.4.tar.bz2" (truncated entry) in /usr/local/share/glpi/vendor/wapmorgan/unified-archive/src/Formats/Tar.php at line 320 Backtrace : ...pmorgan/unified-archive/src/Formats/Tar.php:320 PharData->construct() ...pmorgan/unified-archive/src/Formats/Tar.php:292 wapmorgan\UnifiedArchive\Formats\Tar->open() ...rgan/unified-archive/src/UnifiedArchive.php:255 wapmorgan\UnifiedArchive\Formats\Tar->construct() ...rgan/unified-archive/src/UnifiedArchive.php:105 wapmorgan\UnifiedArchive\UnifiedArchive->__construct() inc/marketplace/controller.class.php:117 wapmorgan\UnifiedArchive\UnifiedArchive::open() ajax/marketplace.php:69 Glpi\Marketplace\Controller->downloadPlugin()

It seems it downloads a glpi-screenshot-v1.1.4.tar.bz2 file in glpi/files/_tmp which is 14 bytes only.

cconard96 commented 2 years ago

It looks like the GitHub action that creates the releases failed silently (and reported success). I've manually fixed the release archive. Please try updating from the marketplace again.

jackburton79 commented 2 years ago

I tried again: now it goes a bit forward and I got this: [2021-09-10 11:42:24] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 1 in /usr/local/share/glpi/vendor/laminas/laminas-i18n/src/Translator/Loader/Gettext.php at line 145 Backtrace : .../laminas-i18n/src/Translator/Translator.php:745 Laminas\I18n\Translator\Loader\Gettext->load() .../laminas-i18n/src/Translator/Translator.php:617 Laminas\I18n\Translator\Translator->loadMessagesFromFiles() .../laminas-i18n/src/Translator/Translator.php:440 Laminas\I18n\Translator\Translator->loadMessages() .../laminas-i18n/src/Translator/Translator.php:389 Laminas\I18n\Translator\Translator->getTranslatedMessage() inc/autoload.function.php:187 Laminas\I18n\Translator\Translator->translatePlural() plugins/room/setup.php:46 _n() inc/plugin.class.php:1471 plugin_version_room() inc/plugin.class.php:1511 Plugin::getInfo() inc/plugin.class.php:438 Plugin->getInformationsFromDirectory() inc/plugin.class.php:421 Plugin->checkPluginState() inc/plugin.class.php:208 Plugin->checkStates() inc/includes.php:106 Plugin->init() ajax/displayMessageAfterRedirect.php:34 include()

cconard96 commented 2 years ago

It looks like that error is from the room plugin's code. I don't see the translation function being used at all in the setup file as indicated in the latest code. However I do see it in an unmerged pull request for 9.5 compatibility. It looks like where the bad code is, it will continue throwing these errors even of the plugin is disabled.

On Fri, Sep 10, 2021, 5:43 AM Stefano Ceccherini @.***> wrote:

I tried again: now it goes a bit forward and I got this: [2021-09-10 11:42:24] glpiphplog.NOTICE: *** PHP Notice (8): Undefined offset: 1 in /usr/local/share/glpi/vendor/laminas/laminas-i18n/src/Translator/Loader/Gettext.php at line 145 Backtrace : .../laminas-i18n/src/Translator/Translator.php:745 Laminas\I18n\Translator\Loader\Gettext->load() .../laminas-i18n/src/Translator/Translator.php:617 Laminas\I18n\Translator\Translator->loadMessagesFromFiles() .../laminas-i18n/src/Translator/Translator.php:440 Laminas\I18n\Translator\Translator->loadMessages() .../laminas-i18n/src/Translator/Translator.php:389 Laminas\I18n\Translator\Translator->getTranslatedMessage() inc/autoload.function.php:187 Laminas\I18n\Translator\Translator->translatePlural() plugins/room/setup.php:46 _n() inc/plugin.class.php:1471 plugin_version_room() inc/plugin.class.php:1511 Plugin::getInfo() inc/plugin.class.php:438 Plugin->getInformationsFromDirectory() inc/plugin.class.php:421 Plugin->checkPluginState() inc/plugin.class.php:208 Plugin->checkStates() inc/includes.php:106 Plugin->init() ajax/displayMessageAfterRedirect.php:34 include()

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/cconard96/glpi-screenshot-plugin/issues/20#issuecomment-916775298, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEG4CLKV6RYDV7K7WEWZGXLUBHHNHANCNFSM5DYYR4FA .

jackburton79 commented 2 years ago

Right, sorry. In the GUI, though I get this when I try to update the screenshot plugin: image but the plugin is not updated. Moreover, with debug enabled: /usr/local/share/glpi/vendor/laminas/laminas-i18n/src/Translator/Loader/Gettext.php at line 145

cconard96 commented 2 years ago

No, I'm just dumb and didn't update the displayed version number. I just realized it is still 1.1.3. As long as the new locale files are there (Portuguese (BR) and Russian), it is updated. There were no actual code changes between 1.1.3 and 1.1.4. I fixed the version in the release archive so others don't get confused.

jackburton79 commented 2 years ago

ok, thanks

jackburton79 commented 2 years ago

Great! Now it worked just fine. Thank you very much image