I am using a combination of LLama and GScript so I can trigger a rsync backup whenever my phone connects to the home Wi-Fi.

However, after a recent restore, GScript started crashing (whenever invoked from LLama) and the error message showed:

On careful inspection of the code, it seems that GScript was supposed to receive an Intent having a nl.rogro.GScript.GScript.ScriptId key as extras. It looked like LLama was sending a bundle without this value (since LLama settings were restored from backup when the scripts maybe had a different ID ?)

The fix was to edit LLama events and choose again all the bookmarks that have to be launched through GScript.

Follow up:

The fix above was not permanent, GScript crashed again after a reboot. I think it is a bug in Llama, because I had to reshuffle the events. The succession of events I had was:

a) when the phone connects to the home network
b) trigger a delayed event of 15 minutes
c) the event config was that if the phone is still connected to the network
d) run two actions: speak that the backup is in progress and also execute the GScript shortcut.

I had to split the d) into more steps:

d) trigger two events:
d1) one with a delay of 1 second, without any conditions, that will execute the GScript shortcut.
d2) one with a delay of 1 second, without any conditions, that will speak “Synchronising in progress” using the Notifications sound path.

Now it works after reboot.


Point b) (delayed after 15 minutes) is that usually the phone connects to the Wifi when I arrive at the garage, but then if I walk to the shop instead of going inside, the phone might not have enough time to finish the backup.
If 15 minutes passed and I’m still on the Wifi, then I am inside the house and backup can proceed. Otherwise, the phone will reconnect when I get back (more than 15 minutes after, and thus the event is cancelled) and then start counting again.