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

lua_examples/luaOTA crashes when entering _init.lua #2954

Closed
sognetic opened this issue Nov 3, 2019 · 9 comments
Closed

lua_examples/luaOTA crashes when entering _init.lua #2954

sognetic opened this issue Nov 3, 2019 · 9 comments
Assignees

Comments

@sognetic
Copy link

sognetic commented Nov 3, 2019

Expected behavior

I've been trying to use the luaOTA example from lua_examples to do deployment.
Expected behaviour is thus: Not crashing.
.

Actual behavior

Code immediately panics when entering _init.lua with

Starting Provision Checks

PANIC: unprotected error in call to Lua API (luaOTA/_doTick.lua:1: attempt to index global 'self' (a nil value))

Test code

MCVE is simply uploading the code in luaOTA (minus the server component) to the ESP

NodeMCU version

master
commit: 310faf7

Hardware

NodeMCU board Ver. 0.1 (?)

@TerryE TerryE self-assigned this Nov 3, 2019
@TerryE
Copy link
Collaborator

TerryE commented Nov 3, 2019

Thanks @sognetic. I'll take a look in the next day or so.

@sgjava
Copy link

sgjava commented Dec 6, 2019

I'm seeing same issue with:

	branch: dev
	commit: 9a2579d97160e981cd084ff483f0eeac8210da37
	release: 
	release DTS: 201911261112
	SSL: false
	build type: float
	LFS: 0x0
Starting Provision Checks
?:0: attempt to index global 'self' (a nil value)
stack traceback:
	?: in function '_doTick'
	?: in function '_init'
	?: in function <?:64>

@adeltc
Copy link
Contributor

adeltc commented Jan 15, 2020

luaOTA seems behind the current version of the firmwork.
there is a couple of issues. For example, the new api implementation of the timer doesn't match the latest update. we can see that the line 35 in the _doTick.lua still provide the timer id as first argument which the new version of the firmware doesn't take it. There is couple of other small issue that I fixed. I have a workable version. Should I make a push request ?

@HHHartmann
Copy link
Member

@adeltc Please go ahead making a push request.

@adeltc
Copy link
Contributor

adeltc commented Jan 15, 2020

ok the pull request is done : https://github.com/adeltc/nodemcu-firmware/pull/1

@HHHartmann
Copy link
Member

@adeltc thanks for the findings and for creating a pull request.

There are some things which went the wrong way though.
To be able to merge your PR (pull request) it has to be made against the nodemcu/nodemcu-firmware repository, not against your fork of it. After pushing your branch to your forked repository when browsing to https://github.com/nodemcu/nodemcu-firmware there is already a button asking if you would like to do a PR. Be aware to make the PR against the dev branch, not master.

When updating a branch with the newest commits from the dev branch use rebase instead of merge. If you use merge all the commits from other contributors will show up and it will be difficult to see your changes.

I just saw that your repo does not seem to be a fork of nodemcu/nodemcu-firmware, so you would have to fork nodemcu/nodemcu-firmware first and then create a branch off of dev, push your changes and create the PR.

When creating the PR online you can also see the changes it contains. If there is anything but yours, something is wrong.

@adeltc
Copy link
Contributor

adeltc commented Jan 21, 2020

Really sorry about this mistake. I'm currently fixing it.

@adeltc adeltc mentioned this issue Jan 21, 2020
4 tasks
adeltc pushed a commit to adeltc/nodemcu-firmware that referenced this issue Jan 21, 2020
@adeltc adeltc mentioned this issue Jan 21, 2020
4 tasks
@adeltc
Copy link
Contributor

adeltc commented Jan 21, 2020

Hopefully this one would be the right one : #3015

@adeltc
Copy link
Contributor

adeltc commented Jan 22, 2020

Even that I based my new branch on dev branch, the pull request has another based branch configuration that I didn't see. I realised it was based on master. I just made antoher pull request with dev as base branch : #3016

nwf pushed a commit that referenced this issue Apr 26, 2020
…her sma… (#3016)

* #2954: adapt to the new firmware api for the timer and some other small fixes

* reduce the error msg in when not response is sent back from esp

* cleanup: remove trailing whitespaces

Co-authored-by: Adel Tayeb-Cherif <adel@evoluhome.com>
marcelstoer pushed a commit that referenced this issue Jun 9, 2020
…her sma… (#3016)

* #2954: adapt to the new firmware api for the timer and some other small fixes

* reduce the error msg in when not response is sent back from esp

* cleanup: remove trailing whitespaces

Co-authored-by: Adel Tayeb-Cherif <adel@evoluhome.com>
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

Successfully merging a pull request may close this issue.

6 participants