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

OverflowError in micropython on OpenWrt 24.10 #5

Open
DiegoJp opened this issue Feb 5, 2025 · 4 comments
Open

OverflowError in micropython on OpenWrt 24.10 #5

DiegoJp opened this issue Feb 5, 2025 · 4 comments

Comments

@DiegoJp
Copy link

DiegoJp commented Feb 5, 2025

Hello, it seems that the micropython is broken in latest rc of OpenWrt 24.10.0-rc7.

The logs reads as follows:

Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/bin/hapt", line 283, in
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/bin/hapt", line 208, in init
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/bin/hapt", line 76, in get_config
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/bin/hapt", line 64, in ubus_call
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/init.py", line 403, in loads
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/decoder.py", line 362, in decode
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/decoder.py", line 378, in raw_decode
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/scanner.py", line 40, in _scan_once
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/decoder.py", line 201, in JSONObject
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/scanner.py", line 40, in _scan_once
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/decoder.py", line 201, in JSONObject
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/scanner.py", line 40, in _scan_once
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/decoder.py", line 201, in JSONObject
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/json/scanner.py", line 53, in _scan_once
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/re.py", line 70, in groups
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/re.py", line 70, in
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: File "/usr/lib/micropython/unix/re.py", line 65, in group
Wed Feb 5 09:20:26 2025 daemon.err hapt[18992]: OverflowError: overflow converting long int to machine word

I just updated yesterday from 23.05.5 to 24.10.0-rc7 and I think they bumped up the micropython version. So something is broken there or perhaps something here needs attention.

Thanks in advance!

@oxan
Copy link
Owner

oxan commented Feb 6, 2025

Interesting, that's a weird error. I haven't tried 24.10 myself yet. Can you share your /etc/config/hapt (without the access token)?

@DiegoJp
Copy link
Author

DiegoJp commented Feb 6, 2025

Yes, of course! Here it is:

config hapt 'global'
	option host                     'http://192.168.1.190:8123'
	option token                    'token123'
	option consider_home_connect    '86400'
	option consider_home_disconnect '60'
	option device_id_prefix         ''
#	list   wifi_interfaces          'wlan0'
#	list   wifi_interfaces          'wlan1'
	list   track_mac_address        '80:35:c1:6d:xx:xx'
	list   track_mac_address        '90:2B:34:32:xx:xx'

hapt was working just fine in 23.05 before updating.

Many thanks!

@oxan
Copy link
Owner

oxan commented Feb 9, 2025

I tried to reproduce this in a 24.10.0 VM, but it works fine for me. Can you share the output of

ubus call uci get '{"config":"hapt","type":"hapt"}'

@DiegoJp
Copy link
Author

DiegoJp commented Feb 19, 2025

Hello! Sorry for not replying earlier.
I've installed 24.10.0 and stills happens :(
See below:

Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: Traceback (most recent call last):
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/bin/hapt", line 283, in
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/bin/hapt", line 208, in init
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/bin/hapt", line 76, in get_config
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/bin/hapt", line 64, in ubus_call
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/init.py", line 403, in loads
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/decoder.py", line 362, in decode
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/decoder.py", line 378, in raw_decode
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/scanner.py", line 40, in _scan_once
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/decoder.py", line 201, in JSONObject
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/scanner.py", line 40, in _scan_once
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/decoder.py", line 201, in JSONObject
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/scanner.py", line 40, in _scan_once
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/decoder.py", line 201, in JSONObject
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/json/scanner.py", line 53, in _scan_once
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/re.py", line 70, in groups
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/re.py", line 70, in
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: File "/usr/lib/micropython/unix/re.py", line 65, in group
Tue Feb 18 22:25:58 2025 daemon.err hapt[11334]: OverflowError: overflow converting long int to machine word

The output of that is as follows:

root@DiegoJpRouter:~# ubus call uci get '{"config":"hapt","type":"hapt"}'
{
"values": {
"global": {
".anonymous": false,
".type": "hapt",
".name": "global",
".index": 0,
"host": "192.168.1.190:8123",
"token": "redacted",
"consider_home_connect": "86400",
"consider_home_disconnect": "60",
"track_mac_address": [
"80:35:c1:redacted",
"90:2B:34:redacted"
]
}
}
}

I've tried even a fresh config file and stills happens.
I have no clue whats happening.

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

2 participants