Install error

Hi,

Just tried to reinstall my test system RPi4, Buster all patched up. after downloading openLuup installer I get this error

pi@Z-Way:~ $ lua5.1 openLuup_install.lua
openLuup_install 2019.02.15 @akbooer
getting openLuup version tar file from GitHub branch master…
un-zipping download files…
getting dkjson.lua…
creating required files and folders
initialising…
downloading and installing AltUI…
lua5.1: ./openLuup/L_AltAppStore.lua:539: attempt to call upvalue ‘next_file’ (a nil value)
stack traceback:
./openLuup/L_AltAppStore.lua:539: in function ‘update_plugin_job’
openLuup/init.lua:210: in main chunk
[C]: ?
openLuup downloaded, installed, and running…

I have tried in /etc/cmh-ludl and in /home/pi.

Strange thing was it was working, before the start over (new buster image Z-way and later openLuup), but the images used was the same as before (only apt get update and upgrade on the z-way raspberry image)

Any clues ???

Can I see the log file?

Strangely, someone else reported a problem with installing a plugin just today. I’ll look into it.

I did have the exact same problem today but assumed I made some mistake when preparing my Ubuntu server vm.

As far as I can tell the problem is related to installing altui but openLuup itself seems to be working since I can connect to the console.

I did an install last month which works like a charm. So I compared the install scripts and they are identical.

Comparing files shows none of the altui files are present in the cmh-ludl directory or openLuup subdirectory.

1 Like

Here you go.

logs.zip (5.9 KB)

1 Like

OK, tracked down the problem – with the help of @reneboer – but don’t have a solution yet.

This fails on some machines, but not on others. It is an HTTP security issue, apparently to do with the level of Lua libraries. I would guess that it’s limited to recent OS versions (ie. new machines, or old ones with updated systems.)

Working on it…

…sorry.

AK

2 Likes

I hope you can find the bug.

But more important, that you and your family are in good health.

Keep safe, and then squash the bug :slight_smile:

On further inspection, there are two problems:

  1. Lua secure socket library version
  2. GitHub API Version

#1 is generally fixable with system updates
#2 requires me to switch to their API v4…

…I have lots to learn about this.

1 Like

OK, there is a temporary fix available (I hate that word!)

Development branch release v20.3.29 incorporates an idea proposed by @reneboer (for which, many thanks.) I modified the original suggested code a bit. It works by spawning a process to do the download – something I am very much against philosophically, and something which won’t work on a Windows PC – but in these times we have to be pragmatic.

I’ve tested this, and it works for me, both for downloading updates from the Plugins page, the Alt App Store, and fresh installs. I hope it works for you.

To do a completely fresh install, note that the script to install openLuup can (and, in this case, should) pull from the development directory. Thus the shell command should be like this:

$ lua5.1 install.lua development

giving…

openLuup_install   2019.02.15   @akbooer
getting openLuup version tar file from GitHub branch development...
un-zipping download files...
getting dkjson.lua...
creating required files and folders
initialising...
downloading and installing AltUI...

The long-term fix is to update to the new GitHub v4 API. Wish me luck.

Sorry for any inconvenience.

AK

2 Likes

Yep, that fix worked for me.
Thank you very much for taking the time to look into this during the weekend!

And all the best and good luck updating to the new GitHub v4 API.

1 Like

Great! Thanks for the feedback. Weekends look a lot like weekdays, at the moment!

Got it working here to…

Stay safe, and THANKS for the quick fix :smiley:

1 Like

I found how to update the Lua libraries to have the https.request working again. You can use this if you run into more sites that updated their SSL settings to ones that give problems on a Pi. It does require some steps, but also gives the option to use the most up to date Lua packages that are not included in the normal apt distributions.

You have to install lua and openSSL dev packages

sudo apt install lua5.1-dev
sudo apt install libssl-dev

Then get luarocks. More details on https://luarocks.org/.

wget https://luarocks.org/releases/luarocks-3.3.0.tar.gz
tar zxpf luarocks-3.3.0.tar.gz
cd luarocks-3.3.0
./configure --lua-version=5.1 && make && sudo make install

Last update luasocket and luasec. Check your openSSL version to determine the LuaSec to install.

openssl version

If 1.0.1. Install luasec 0.7-1, if 1.1.x no need to specify version, it should get 0.9.

sudo luarocks  --lua-version 5.1 install luasocket
sudo luarocks  --lua-version 5.1 install luasec 0.7-1

Cheers Rene

1 Like