Syntax error in a shell script when my glitch project is shutting down

I get this error when my process is shutting down:

/opt/watcher/app-types/ line 55: "1575812310" - "1575812310": syntax error: operand expected (error token is ""1575812310" - "1575812310"")

In the file it’s this line 55:

51    if [[ ${num_processes} -eq 4 ]]; then
52      return "${_exitcode}"
53    fi
54    curr_time=$(timestamp)
55    elapsed_time=$(("${curr_time}" - "${start_time}"))
56    if [[ ${elapsed_time} -ge 2 ]] && [[ "${_warning_shown}" = "false" ]]; then
57      (>&2 echo "Your app is taking a while to stop...")
58      _warning_shown=true
59    fi

Can you fix your scripts :slight_smile:

I have no hecking idea about shell but judging by the error have you tried removing one set of () from that line?
By the error it seems that () is transformed into a “” and i doubt that’s how it should work.

Again, no idea, but trying doesn’t hurt I guess.

oooooh nevermind, I never wrote this. Nothing happened here.

I won’t touch their shell scripts but thanks for trying to help though :stuck_out_tongue:

1 Like

@cori pls help with this one :frowning:

Hi JaielSoft!

This bug is known and we are in the process of rolling out a fix - it shouldn’t affect your project except for the error message, regardless.

Hope this helps,


1 Like