Ran this same command yesterday, ran fine. Now I’m getting an error on preload
I have tried this with 2 diferrent apps and get the same error.
$ resin version
7.1.0
$ npm -v
5.7.1
$ docker -v
Docker version 17.12.0-ce, build c97c6d6
$ resin preload resin-perfmonzerow-2.12.3+rev1-v7.1.14.img.zip
##### previous steps ok
Step 7/7 : CMD /usr/src/app/preload.py
---> Running in 4b2ad6330a8a
Removing intermediate container 4b2ad6330a8a
---> c0272782c14c
Successfully built c0272782c14c
Successfully tagged resin/resin-preload:latest
Traceback (most recent call last):
File "/usr/src/app/preload.py", line 774, in <module>
PARTITIONS_CACHE[None] = prepare_global_partitions()
File "/usr/src/app/preload.py", line 76, in prepare_global_partitions
return get_partitions(IMAGE)
File "/usr/src/app/preload.py", line 65, in get_partitions
return {p.label: p for p in PartitionTable(image).partitions if p.label}
File "/usr/src/app/preload.py", line 368, in __init__
sfdisk("--dump", "--json", image).stdout.decode("utf8")
File "/usr/lib/python3.6/site-packages/sh.py", line 1427, in __call__
return RunningCommand(cmd, call_args, stdin, stdout, stderr)
File "/usr/lib/python3.6/site-packages/sh.py", line 774, in __init__
self.wait()
File "/usr/lib/python3.6/site-packages/sh.py", line 792, in wait
self.handle_command_exit_code(exit_code)
File "/usr/lib/python3.6/site-packages/sh.py", line 815, in handle_command_exit_code
raise exc
sh.ErrorReturnCode_1:
RAN: /sbin/sfdisk --dump --json /img/resin.img
STDOUT:
STDERR:
sfdisk: failed to dump partition table: No error information
at container.wait.then (/usr/local/lib/node_modules/resin-cli/node_modules/resin-preload/lib/preload.js:319:19)
at tryCatcher (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/async.js:143:10)
at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/resin-cli/node_modules/bluebird/js/release/async.js:17:14)
at runCallback (timers.js:763:18)
at tryOnImmediate (timers.js:734:5)
at processImmediate (timers.js:716:5)
at process.topLevelDomainCallback (domain.js:101:23) code: 1 }
@zvin oh man I was hoping that would solve it but I’m still getting the error.
I can also confirm it’s happening on two different machines. I setup a brand new app and used the simple node server example and I’m still getting the error.
Thanks for the quick responses, I really appreciate it.
This looks strange, could you please share your image ?
Upload it to a google drive for example and share it with me (alexis@resin.io). Please upload the zipped file.
Also could you please run a md5sum on the unzipped image ?
Just tried with docker-ce 18.03.0-ce, it worked.
For info the app you try to preload does not matter, the error you’re getting happens before any info about the app is fetched.
Could you please run DEBUG=1 resin preload /path/to/image.
I just spent 2 hours getting ubuntu setup in a VM and I got the EXACT same error
This is a different error. The first error you reported was fdisk not being able to read the partition table. This error is a problem with the resin-sdk being too recent for resin-preload (which resin-cli uses). It was introduced yesterday by an unrelated change. It has been fixed in resin-cli 7.1.3 that was just released.
the problem was I was adding the “–app” flag without the “–commit” flag
This should not be a problem: if you specify an app but no commit you should see a commit selection menu.