If anyone knows a more exact cause for this error, please post below and ignore my info.
It seems to me that the error could come from two possible areas:
1) Your code doesn't generate proper logs, or
2) Something about uploading the firmware via GIT Bash + px4 console is causing a problem.
To determine which it is, could you try uploading the same firmware that is known to work (via Mission Planner) using your GIT Bash + px4 console and see the error is observed?
[My thinking is that:]
If the error is seen, then we need to figure out what's wrong with the upload procedure. If the error is not seen, then there's something wrong with how your code generates logs, and we can't help unless we have your code. Does this make sense?