Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The uploader some times fails to run after camera reboots #8

Open
denven opened this issue May 4, 2023 · 1 comment
Open

The uploader some times fails to run after camera reboots #8

denven opened this issue May 4, 2023 · 1 comment
Assignees
Labels
bug Something isn't working resolved

Comments

@denven
Copy link
Owner

denven commented May 4, 2023

  • This doesn't always happen, sometimes it runs properly after reboot, and sometimes the files are not uploaded after camera reboots because the script fails to run with the following error.
    image
@denven denven added the bug Something isn't working label May 4, 2023
@denven denven self-assigned this May 4, 2023
denven added a commit that referenced this issue May 4, 2023
@denven
Copy link
Owner Author

denven commented May 4, 2023

The jq program file is located in path /tmp/sd/yi-hack/sbin or /home/yi-hack/bin/jq, however, I checked the env variable $PATH when the uploader script runs after each reboot, it has different situations:

  • For a successful run, the $PATH contains jq file path inside
  • When it runs into the errors above, the $PATH doesn't show jq file path
    /sbin:/bin:/usr/sbin:/usr/bin:/home/base/wifi:/ext/bin:/home/base/tools:/home/app/localbin

Then the reason for this issue is the camera initialization progress is not always ready for the uploader script to run, and the env path of jq is not appended to the global variable PATH when the uploader script runs sometimes.

So the fix is to append the path of the programs uploader script depending on to the env variable PATH before they are called.

export PATH=$PATH:/tmp/sd/yi-hack/bin:/tmp/sd/yi-hack/sbin
or pause for a while to wait until the env is setup.
sleep 30 # put this in startup.sh

Meanwhile, use the same jq program with the hack

@denven denven added the resolved label May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working resolved
Projects
None yet
Development

No branches or pull requests

1 participant