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.

One byte missed when uploading upgrade image file

See original GitHub issue

I am working on OpenWRT-19.07 branch. I have my device working with 19.07.

We got device failed to boot with image built today, caused by incorrect image file been flashed to device.

We found this only happened with Chrome and the “keep settings” option off. And the image file save to /tmp in device only missed one byte:

	local fp
	local fp_len = 0
	http.setfilehandler(
		function(meta, chunk, eof)
			if not fp and meta and meta.name == "image" then
				fp = io.open(image_tmp, "w")
				fp_len = 0
			end
			if fp and chunk then
				fp_len = fp_len + string.len(chunk)
				fp:write(chunk)
			end
			if fp and eof then
				os.execute("echo file length: "..fp_len.." > /dev/console")
				fp:close()
			end
		end
	)

file length: 18021887
file length: 18021888

*Tested with Chrome in both Windows 7 & Debian testing, both have this issue

  • FireFox & IE have no such issue.
  • “Keep settings” must be unchecked to reproduce this bug
  • Wireshark says the file length posted by Chrome is 18021888 when bug happens

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:19 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
hnymancommented, Jul 4, 2019

Thanks. This seems to fix things.

I compiled and tested the new version both with 18.06 and master. I sysupgraded with this from 18.06 to master with the same image that was problematic yesterday, and then tested the new version also in master for further sysupgrades. Seems to be ok also there.

A bit sad that the old version is in 18.06.4 images. That may be problematic in sysupgrading to the next release to 19.07. Once the buildbot has compiled the fixed version of lucihttp, you might maybe add this as a “known issues” section in the 18.06.4 release notes.

0reactions
srdgamecommented, Jul 10, 2019

will test it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Missing data when uploading/downloading image
I've created a simple controller for uploading and getting a (static) cached image. I know it's not the best practice to have a...
Read more >
Files Become 0 Bytes? Top 3 Ways to Restore Zero Byte Files
Solution 1. Fix and Recover Zero Byte Files in CMD · Open the Run dialog box by pressing Win and R keys together....
Read more >
FAQs About Invisible Aligners | byte®
Frequently asked questions about byte, orders, your health, ... Can I use aligners if I have missing teeth? ... How do I upload...
Read more >
Fix problems uploading files on the OneDrive website
To upload files to a new folder in OneDrive, first create the folder, and then upload the files to it. Files that are...
Read more >
Download and install the ONTAP software image
You must first download the ONTAP software from the NetApp Support site; then you can install it using the automatic nondisruptive upgrade ......
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