question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

PANIC: unprotected error in call to Lua API (bad light userdata pointer)

See original GitHub issue

Problem/Motivation

Heho. I’m sorry for opening such an issue again, but i think that my comment is lost in the other issue. https://github.com/hassio-addons/addon-node-red/issues/816#issuecomment-748678373

Expected behavior

Accessable Webinterface

Actual behavior

Webinterface is not accessable

Steps to reproduce

Get an HA Blue Install Node Red via Supervisor See start fail

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Add-on: Node-RED
 Flow-based programming for the Internet of Things
-----------------------------------------------------------
 Add-on version: 7.2.11
 You are running the latest version of this add-on.
 System: Home Assistant OS 5.8  (aarch64 / odroid-n2)
 Home Assistant Core: 2020.12.1
 Home Assistant Supervisor: 2020.12.7
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing... 
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] node-red.sh: executing... 
patching file nodes/ui_base.html
Hunk #1 succeeded at 1156 (offset 625 lines).
up to date in 1.294s
found 0 vulnerabilities
[cont-init.d] node-red.sh: exited 0.
[cont-init.d] user.sh: executing... 
[cont-init.d] user.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[23:16:39] INFO: Starting Node-RED...
> addon-node-red@ start /opt
> node $NODE_OPTIONS node_modules/node-red/red.js "--settings" "/etc/node-red/config.js"
20 Dec 23:16:41 - [info] 
Welcome to Node-RED
===================
20 Dec 23:16:41 - [info] Node-RED version: v1.2.5
20 Dec 23:16:41 - [info] Node.js  version: v12.18.4
20 Dec 23:16:41 - [info] Linux 5.9.14 arm64 LE
20 Dec 23:16:42 - [info] Loading palette nodes
20 Dec 23:16:44 - [warn] [RED.events] Deprecated use of "nodes-started" event from "/opt/node_modules/node-red-contrib-actionflows/actionflows/actionflows.js:615:14". Use "flows:started" instead.
20 Dec 23:16:45 - [info] Dashboard version 2.24.0 started at /endpoint/ui
/bin/sh: /opt/node_modules/node-red-node-pi-gpio/testgpio.py: not found
20 Dec 23:16:45 - [warn] rpi-gpio : Raspberry Pi specific node set inactive
20 Dec 23:16:46 - [info] Settings file  : /etc/node-red/config.js
20 Dec 23:16:46 - [info] Context store  : 'default' [module=memory]
20 Dec 23:16:46 - [info] User directory : /config/node-red/
20 Dec 23:16:46 - [warn] Projects disabled : editorTheme.projects.enabled=false
20 Dec 23:16:46 - [info] Flows file     : /config/node-red/flows.json
20 Dec 23:16:46 - [info] Starting flows
20 Dec 23:16:46 - [info] Started flows
20 Dec 23:16:46 - [info] Server now running at http://127.0.0.1:46836/
[23:16:46] INFO: Starting NGinx...
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
20 Dec 23:16:51 - [info] [server:Home Assistant] Connecting to http://supervisor/core
20 Dec 23:16:51 - [info] [server:Home Assistant] Connected to http://supervisor/core
PANIC: unprotected error in call to Lua API (bad light userdata pointer)
PANIC: unprotected error in call to Lua API (bad light userdata pointer)
PANIC: unprotected error in call to Lua API (bad light userdata pointer)
PANIC: unprotected error in call to Lua API (bad light userdata pointer)
PANIC: unprotected error in call to Lua API (bad light userdata pointer)
PANIC: unprotected error in call to Lua API (bad light userdata pointer)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
frenckcommented, Jan 24, 2021

I’m currently testing a solution (for the same issue) on the AdGuard add-on. So the future is bright and nearby 😉

2reactions
jorgeassuncaocommented, Jan 22, 2021

I’ve just updated Node Red to 8.0.0 and having the same errors (Home Assistant 2021.1.4, Supervisor 2021.01.5). Everything works well via Ingress but get a “500 Internal Server Error” and erros in the log.

[20:08:33] INFO: Starting NGinx...
nginx: [warn] lua_load_resty_core is deprecated (the lua-resty-core library is required since ngx_lua v0.10.16) in /etc/nginx/nginx.conf:43
nginx: [alert] detected a LuaJIT version which is not OpenResty's; many optimizations will be disabled and performance will be compromised (see https://github.com/openresty/luajit2 for OpenResty's LuaJIT or, even better, consider using the OpenResty releases from https://openresty.org/en/download.html)
2021/01/22 20:08:33 [error] 553#553: *1 lua entry thread aborted: runtime error: /usr/share/lua/common/resty/core/request.lua:124: no request found
stack traceback:
coroutine 0:
	[C]: in function 'error'
	/usr/share/lua/common/resty/core/request.lua:124: in function 'get_headers'
	/etc/nginx/lua/ha-auth.lua:7: in function 'authenticate'
	/etc/nginx/lua/ha-auth.lua:73: in function </etc/nginx/lua/ha-auth.lua:1>, client: 10.0.10.131, server: a0d7b954-nodered, request: "GET / HTTP/1.1", host: "10.0.10.10:1880"
[22/Jan/2021:20:08:33 +0000] 500 -(10.0.10.131) GET / HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36)
2021/01/22 20:08:34 [error] 553#553: *2 lua entry thread aborted: runtime error: /usr/share/lua/common/resty/core/request.lua:124: no request found
stack traceback:
coroutine 0:
	[C]: in function 'error'
	/usr/share/lua/common/resty/core/request.lua:124: in function 'get_headers'
	/etc/nginx/lua/ha-auth.lua:7: in function 'authenticate'
	/etc/nginx/lua/ha-auth.lua:73: in function </etc/nginx/lua/ha-auth.lua:1>, client: 10.0.10.131, server: a0d7b954-nodered, request: "GET /favicon.ico HTTP/1.1", host: "10.0.10.10:1880", referrer: "http://10.0.10.10:1880/"
[22/Jan/2021:20:08:34 +0000] 500 -(10.0.10.131) GET /favicon.ico HTTP/1.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.4280.141 Safari/537.36)
Read more comments on GitHub >

github_iconTop Results From Across the Web

arm64: unprotected error in call to Lua API (bad light userdata ...
Is this a BUG REPORT: NGINX Ingress controller version: quay.io/kubernetes-ingress-controller/nginx-ingress-controller-arm64:0.17.1.
Read more >
[ARM64] Execution of daemon failing, possible deprecated ...
PANIC : unprotected error in call to Lua API (bad light userdata pointer)
Read more >
unprotected error in call to Lua API (bad light userdata pointer)
efl 1.20.4 FTBFS on arm64: PANIC: unprotected error in call to Lua API (bad light userdata pointer). Closed, InvalidPublic. Actions.
Read more >
lua-resty-http is out of date (and does not work on aarch64)
When run on aarch64, the NGinx LUA module gives the following error: PANIC: unprotected error in call to Lua API (bad light userdata...
Read more >
Bug#907729: knot-resolver: kresd fails on arm64 with "PANIC
Bug#907729: knot-resolver: kresd fails on arm64 with "PANIC: unprotected error in call to Lua API (bad light userdata pointer)".
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found