OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: xmillies on April 14, 2024, 09:03:52 PM

Title: [Solved] After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: xmillies on April 14, 2024, 09:03:52 PM
Hi,

We just have updated opnsense-business from 23.4.2_1 to 23.4.2_4.
An now when opening Firmware / Status, it reads the status and we obtain :

An API exception occurred
/usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php:246: Unsupported operand types: int + string

Same if we run Updates.

Any idea ?

Regards.
Title: Re: After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: franco on April 15, 2024, 08:52:56 AM
A fix has been issued, but I'm curious why this code is problematic for you when it has been the same for at least 5 years?


Cheers,
Franco
Title: Re: After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: Continuity on April 15, 2024, 03:26:53 PM
More or less same problem:

A couple of DEC675 just arrived, put the business key, and when update we receive the error:

An API exception occurred

/usr/local/opnsense/mvc/app/controllers/OPNsense/Core/Api/FirmwareController.php:135: Unsupported operand types: int + string

Where i can find the fix, just to see if it apply to my case.

Here some more info:
***GOT REQUEST TO CHECK FOR UPDATES***
Currently running OPNsense 23.10 at Mon Apr 15 13:09:55 UTC 2024
Fetching subscription information, please wait... done
Fetching changelog information, please wait... done
Updating OPNsense repository catalogue...
Fetching meta.conf: . done
Fetching packagesite.pkg: . done
Processing entries: .......... done
OPNsense repository update completed. 873 packages processed.
All repositories are up to date.
Updating database digests format: .......... done
New version of pkg detected; it needs to be installed first.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be UPGRADED:
pkg: 1.19.2 -> 1.19.2_1

Number of packages to be upgraded: 1

4 MiB to be downloaded.
[1/1] Fetching pkg-1.19.2_1.pkg: .......... done
Checking integrity... done (0 conflicting)
[1/1] Upgrading pkg from 1.19.2 to 1.19.2_1...
[1/1] Extracting pkg-1.19.2_1: .......... done
Checking integrity... done (0 conflicting)
Your packages are up to date.
Checking for upgrades (145 candidates): .......... done
Processing candidates (145 candidates): ....... done
The following 95 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
libpfctl: 0.8
openssl111: 1.1.1w
py39-pyasn1: 0.5.0
py39-pyasn1-modules: 0.3.0
py39-service-identity: 23.1.0
py39-typing-extensions: 4.9.0
squid-langpack: 7.0.0.20230225

Installed packages to be UPGRADED:
beep: 1.0_1 -> 1.0_2
choparp: 20150613 -> 20150613_1
curl: 8.3.0 -> 8.6.0
cyrus-sasl: 2.1.28 -> 2.1.28_1
easy-rsa: 3.1.6 -> 3.1.7
gettext-runtime: 0.22_1 -> 0.22.3
glib: 2.78.0,2 -> 2.78.3,2
ivykis: 0.42.4 -> 0.42.4_1
libfido2: 1.13.0 -> 1.14.0
libnet: 1.2,1 -> 1.3,1
libnghttp2: 1.56.0 -> 1.58.0
libpsl: 0.21.2_3 -> 0.21.2_4
libxml2: 2.10.4_1 -> 2.10.4_2
lighttpd: 1.4.71 -> 1.4.73
mpd5: 5.9_16 -> 5.9_17
nss: 3.93 -> 3.95
oniguruma: 6.9.8_1 -> 6.9.9
openssh-portable: 9.3.p2_1,1 -> 9.6.p1_1,1
openvpn: 2.6.6 -> 2.6.8_1
opnsense-business: 23.10 -> 23.10.3
opnsense-installer: 23.1 -> 24.1
opnsense-lang: 23.7.4 -> 23.7.11
opnsense-update: 23.7.4 -> 23.7.10_1
os-OPNBEcore: 1.2 -> 1.3
perl5: 5.34.1_3 -> 5.36.3_1
pftop: 0.8_4 -> 0.10
php82: 8.2.11 -> 8.2.14
php82-ctype: 8.2.11 -> 8.2.14
php82-curl: 8.2.11 -> 8.2.14
php82-dom: 8.2.11 -> 8.2.14
php82-filter: 8.2.11 -> 8.2.14
php82-gettext: 8.2.11 -> 8.2.14
php82-ldap: 8.2.11 -> 8.2.14
php82-mbstring: 8.2.11 -> 8.2.14
php82-pcntl: 8.2.11 -> 8.2.14
php82-pdo: 8.2.11 -> 8.2.14
php82-phpseclib: 3.0.23 -> 3.0.34
php82-session: 8.2.11 -> 8.2.14
php82-simplexml: 8.2.11 -> 8.2.14
php82-sockets: 8.2.11 -> 8.2.14
php82-sqlite3: 8.2.11 -> 8.2.14
php82-xml: 8.2.11 -> 8.2.14
php82-zlib: 8.2.11 -> 8.2.14
pkcs11-helper: 1.29.0 -> 1.29.0_1
py39-Babel: 2.13.0 -> 2.14.0
py39-aioquic: 0.9.21 -> 0.9.24
py39-anyio: 4.0.0 -> 4.2.0
py39-certifi: 2023.7.22 -> 2023.11.17
py39-charset-normalizer: 3.3.0 -> 3.3.2
py39-cryptography: 41.0.4,1 -> 41.0.7_2,1
py39-cython: 0.29.36 -> 0.29.37
py39-exceptiongroup: 1.1.3 -> 1.2.0
py39-h2: 4.0.0 -> 4.1.0
py39-httpcore: 0.18.0 -> 1.0.2
py39-httpx: 0.25.0 -> 0.26.0
py39-idna: 3.4_1 -> 3.6
py39-netaddr: 0.9.0 -> 0.10.1
py39-numexpr: 2.8.7 -> 2.8.8
py39-numpy: 1.25.0,1 -> 1.25.0_4,1
py39-outcome: 1.2.0 -> 1.3.0_1
py39-pylsqpack: 0.3.17 -> 0.3.18
py39-trio: 0.22.2 -> 0.24.0
py39-tzdata: 2023.3_1 -> 2023.4
py39-ujson: 5.8.0 -> 5.9.0
py39-urllib3: 1.26.17,1 -> 1.26.18,1
py39-yaml: 6.0 -> 6.0.1
readline: 8.2.1 -> 8.2.7
rrdtool: 1.8.0_2 -> 1.8.0_3
sqlite3: 3.43.1,1 -> 3.44.0_1,1
squid: 5.9 -> 6.6
strongswan: 5.9.11_2 -> 5.9.13
sudo: 1.9.14p3 -> 1.9.15p5
suricata: 6.0.14 -> 6.0.17
unbound: 1.18.0 -> 1.19.3
wpa_supplicant: 2.10_9 -> 2.10_10

Installed packages to be REINSTALLED:
cpdup-1.22 (direct dependency changed: openssl111)
cyrus-sasl-gssapi-2.1.28 (direct dependency changed: openssl111)
gmp-6.3.0 (option added: INFO)
hostapd-2.10_8 (direct dependency changed: openssl111)
isc-dhcp44-server-4.4.3P1 (direct dependency changed: openssl111)
krb5-1.21.2 (direct dependency changed: openssl111)
ldns-1.8.3 (direct dependency changed: openssl111)
libevent-2.1.12 (direct dependency changed: openssl111)
monit-5.33.0 (direct dependency changed: openssl111)
ntp-4.2.8p17_1 (direct dependency changed: openssl111)
openldap26-client-2.6.6 (direct dependency changed: openssl111)
python39-3.9.18 (direct dependency changed: openssl111)
syslog-ng-4.4.0 (direct dependency changed: openssl111)

Number of packages to be installed: 7
Number of packages to be upgraded: 75
Number of packages to be reinstalled: 13

The process will require 19 MiB more space.
93 MiB to be downloaded.
***DONE***


QuoteType    opnsense-business    
Version    23.10    
Architecture    amd64    
Commit    763f01ff8    
Mirror    https://opnsense-update.deciso.com/${SUBSCRIPTION}/FreeBSD:13:amd64/23.10    
Repositories    OPNsense    
Updated on    Wed Oct 25 15:11:46 UTC 2023    
Checked on    N/A


Edit, just to know

I did a pkg update, pkg upgrade from cli, now from gui it say the software is up to date, and problem persist.
Title: Re: After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: franco on April 15, 2024, 05:10:56 PM
Meanwhile we know how to reproduce and looking for a workaround server-side to avoid this happening on the client end. Then we need to find out the real cause which is stranger (apache upate?).


Cheers,
Franco
Title: Re: After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: franco on April 15, 2024, 05:44:31 PM
Fixed the mirror config. Here is a fun read that could break numerous Internet applications due to an Apache security fix...

https://www.reddit.com/r/apache/comments/1c2ktvd/24414ubuntu317_stopped_sending_contentlenght/


Cheers,
Franco
Title: Re: After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: Continuity on April 16, 2024, 09:47:21 AM
Yes, now it work without problem.

Thankyou.

@xmillies, for me you can set this thread as resolved.
Title: Re: After upgrade from 23.4.2_1 -> 23.4.2_4 Check for updates gives an API exception
Post by: xmillies on April 21, 2024, 01:21:44 PM
Yes. it's solved !
Thank.