Skip to content
This repository has been archived by the owner on Jan 19, 2020. It is now read-only.

Progress Bar shows completed when starting a new job #1

Open
MeMattStone opened this issue Sep 20, 2013 · 9 comments
Open

Progress Bar shows completed when starting a new job #1

MeMattStone opened this issue Sep 20, 2013 · 9 comments

Comments

@MeMattStone
Copy link
Contributor

When you start writing to a card the progress bar shows completed probably due to it reading the file and finding its empty (this happens at the end of a job to signal completion).

@MeMattStone
Copy link
Contributor Author

Progress Bar also randomly shows as completed part way through an existing job, refreshing the screen shows the progress bar again

@horninc
Copy link

horninc commented Feb 11, 2014

When I click "write image to devices" button it simply shows modal with "Progress - Done..." and nothing is written to the Devices.

@MeMattStone
Copy link
Contributor Author

Hi horninc, after pressing "write image to devices" button, you should wait 10 seconds and refresh the page. If the device is being written to a modal with the progress bar indicating the percentage should now be visible. If you don't get the modal pop back up let me know what flavour of linux you are running (e.g. Arch, Raspbian) and I'll see if I can simulate it

@horninc
Copy link

horninc commented Feb 11, 2014

I am using Linux raspberry 3.10.25+, and PHP 5.4.4-14+deb7u7 (fpm-fcgi), I have a feeling that this is issue related to php5.4.4 having changed something. This is the error I get into nginx logs :

FastCGI sent in stderr: "PHP message: PHP Notice: Undefined variable: UmountList in /usr/share/nginx/www/index.php on line 22"

and

Undefined offset: 7 in /usr/share/nginx/www/monitor.php on line 45
Undefined offset: 5 in /usr/share/nginx/www/monitor.php on line 41

@MeMattStone
Copy link
Contributor Author

Ok, the first PHP message is just a notice so shouldn't be affecting the running of the script. This notice is because I haven't declared $DeviceList or $UmountList before the foreach loop, this can be ignored as PHP creates the variables when we try to add to them (I'll clear this notice on the next update). The Undefined offset's are probably because something is different on Raspbian to Arch Linux so I'll set up a Pi using your setup and see if I can re-produce the result.

@horninc
Copy link

horninc commented Feb 11, 2014

Well, first of all, some of the things I changed for Raspberian compatibility was some of the paths - for instance "$UmountList .= "umount /dev/" . $DeviceName . " & ";"

@horninc
Copy link

horninc commented Feb 11, 2014

I have solved it. This is so ridiculous :D "apt-get install dcfldd" solved it on Raspberian

@horninc
Copy link

horninc commented Feb 11, 2014

Okey. I can launch the code now, but only once. After I do it for the first time, it does not perform a correct cleanup, and continuesly shows "100%" done status even when new SD cards are inserted.

I get PHP Warning: fseek() expects parameter 1 to be resource, boolean given in /usr/share/nginx/www/monitor.php on line 8

and PHP Warning: fseek() expects parameter 1 to be resource, boolean given in /usr/share/nginx/www/monitor.php on line 9

@MeMattStone
Copy link
Contributor Author

I've updated the codebase to fix the issue with the progress bar, I'll be uploading an (untested) guide to setting up on Raspbian which I'll confirm when I have a chance. It's worth noting that the webroot needs to be changed to /etc/osid/www/public_html in the nginx config which is where the OSID files should be located.

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

No branches or pull requests

2 participants