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)
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.)
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.
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.
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.