davidferguson / pibakery-blocks

All the blocks for the Pi Bakery program
GNU General Public License v3.0
242 stars 86 forks source link

My new block causes SD Write Failed #72

Closed peebles closed 6 years ago

peebles commented 6 years ago

I've written two now blocks. The more complex of the two works fine. The simple one consistently causes "SD Write Failed, Error: Can't write PiBakery blocks. Please try writing to the SD card again. ...". I've tried re-installing PiBakery as indicated, no help. If I remove this block from the chain I get no problems. If I add this block, even by itself, I get the error.

The json:

{
  "name": "nodejs",
  "text": "Install NodeJS\\nversion: %1",
  "script": "node-install.sh",
  "args": [
    {
      "type": "menu",
      "options": ["4.x", "5.x", "6.x", "7.x", "8.x", "9.x"]
    }
  ],
  "network": true,
  "continue": true,
  "type": "software",
  "category":"software",
  "supportedOperatingSystems": [
    "raspbian-pibakery.img",
    "raspbian-lite-pibakery.img"
  ],
  "shortDescription":"Install NodeJS",
  "longDescription":"Install ytour favorite version of node."
}

The node-install.sh script:

#!/bin/bash

version="$1"

curl -sL https://deb.nodesource.com/setup_$version | sudo bash -
apt-get install nodejs -y

Is there a log file I can examine somewhere? I am on a Mac.

peebles commented 6 years ago

I dunno man ... I rebooted my laptop (for a different reason) and now my package writes and all is ok. Sorry.

davidferguson commented 6 years ago

That's unusual; it was probably an issue with the image writing system rather than your block.

If you get the error in the future, use the shortcut cmd-shift-i to open the Developer Inspector which will show the detailed error log.