Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Openbox Syntax Error #3

Open
drigz opened this issue May 5, 2017 · 18 comments
Open

Openbox Syntax Error #3

drigz opened this issue May 5, 2017 · 18 comments
Labels

Comments

@drigz
Copy link
Member

drigz commented May 5, 2017

Some people have seen this error on first boot:

One or more XML syntax errors were found while parsing the Openbox configuration files. See stdout for more information. The last error seen was in file "/home/pi/.config/openbox/lxde-pi-rc.xml" line 1, with message: Document is empty

It can typically be resolved by reflashing the card.

One reporter said they booted initially without a monitor connected (maybe related, maybe a coincidence). The issue might be upstream (see this forum post). As far as I'm aware lxde-pi-rc.xml is the same in our image as in the upstream image.

@drigz drigz added the bug label May 10, 2017
@bazwilliams
Copy link
Contributor

I had this error, was able to recover a desktop but it was missing the icons used in the tutorials so reflashed.

I booted first time with nothing plugged into HDMI port, I powered off then plugged in my display.

@drigz
Copy link
Member Author

drigz commented May 15, 2017

More info in this bug report received by email:

I used image "aiyprojects-2017-05-03.img.xz" and couldn't get it to boot up to the desktop.

  • It booted and showed this message "Openbox Syntax Error" "One or more XML syntax errors were found while parsing the Openbox configuration files. See stdout for more information. The last error seen was in the file "/home/pi/.config/openbox/lxde-pi-rc.xml" line 1, with message: Document is empty."
  • After clicking "Close" on that message, the screen stayed blank except for the mouse cursor that followed my mouse movements.
  • However, I could right-click and get a menu and open a terminal window. And I verified that /home/pi/.config/openbox/lxde-pi-rc.xml was a file of 0 bytes dated 2017-05-03.
  • I re-flashed the sdcard to the same image. (I'm positive it was the same, as Etcher was still running and I chose to flash with the "same image".) This time it booted fine and the file /home/pi/.config/openbox/lxde-pi-rc.xml was a file of 24075 bytes dated 2017-05-03.
  • What might account for this is that upon my initial boot, nothing showed up on the screen. I think I gave it quite a long time to boot, but I did power down, ensure the HDMI cable was fully inserted, and then powered up and the screen showed the boot process. Perhaps that power cycle damaged lxde-pi-rc.xml ??

This is the third report where the user has suggested they didn't have the HDMI cable properly connected.

@drigz
Copy link
Member Author

drigz commented May 15, 2017

I wonder if we could work around this by creating a backup of lxde-pi-rc.xml and trying to restore it on boot if the file is empty?

@mariopepe
Copy link

I also have this issue, I initially booted without screen too

@drigz
Copy link
Member Author

drigz commented Jul 21, 2017

Our current theory is that this happens if the user pulls the power cable out during the initialization process that happens on the first boot, which corrupts the SD card and requires reflashing. The reason for the link to the lack of monitor is that users don't know when they can safely remove power if they don't have a monitor connected.

@scugn1zz0, you should reflash your SD card - there's no other workaround at the moment.

@mariopepe
Copy link

@drigz Thanks a lot for the information, I reflashed the SD card and it worked (this time i boot with HDMI in)

@bwa11ace
Copy link

Can someone explain reflashing?

@enetor
Copy link
Contributor

enetor commented Jul 27, 2017

@bwa11ace Basically it's just following the "Get the Voice Kit SD Image" section again and write the image to your SD card, see https://aiyprojects.withgoogle.com/voice/#assembly-guide-1-get-the-voice-kit-sd-image

@wwwroth
Copy link

wwwroth commented Aug 10, 2017

Found this issue via Google. I also recieved this error while booting a fresh SD install without a touchscreen plugged in and then plugging it in.

@Rudysmama
Copy link

I received the error after I tried to change the config.txt to accept a different HDMI input. I reflashed the image. Booted with a monitor and I was fine. I was then able to set up the boot with VNC and SSH. I have also installed the windows remote desktop versions to connect. No additional issues.

@stellaremnant
Copy link

Mine booted perfectly the first time, then wouldnt display ANYTHING until I went into config.txt and changed #hdmi_safe=1 to hdmi_safe=1 (uncomment hdmi_safe=1)

@stellaremnant
Copy link

stellaremnant commented Dec 30, 2017

drigz:
Our current theory is that this happens if the user pulls the power cable out during the initialization process that happens on the first boot, which corrupts the SD card and requires reflashing. The reason for the link to the lack of monitor is that users don't know when they can safely remove power if they don't have a monitor connected.

Tested that theory, its correct, the 'dirty bit' is set if the computer lost power while in the middle of processing.

@navotera
Copy link

navotera commented Feb 3, 2018

i believe reflash is not wise solution...
i got this too... any better method to make me not to take reflashed step

@drigz
Copy link
Member Author

drigz commented Feb 5, 2018

@navotera, if our theory is correct, this error occurs because the filesystem is corrupted when the user pulls the power cable from the Raspberry Pi while it is still running. In that case, reflashing is the most reliable solution.

If there are files on the Raspberry Pi that haven't been backed up, you can plug the SD card into a computer and copy them off before reflashing.

@navotera
Copy link

i resolve this issues by removing default pi user and creating new user on whatever u name it.
dont forget to assign new user in root group roles

@iamshadmirza
Copy link

creating a backup of lxde-pi-rc.xml and trying to restore it on boot if the file is empty doesn't work. Re flashed the card, it was working fine then this problem occurred again.

@Camdude527
Copy link

Can someone please help with this, im having this issue but i have data and programs on the pi that i would hate to lose, is there a way to get them off?

@drigz
Copy link
Member Author

drigz commented Apr 6, 2018

@Camdude527 You could plug the SD card into a computer to back up your data. And remember to keep regular backups of important data in future! eg with Google Drive / Dropbox / GitHub (for code)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests