"could not initialize proxy - no Session" error


(Minollo) #1

[I have already contacted ST support, but they suggested me I should also post this issue here; so, here it is]

My thermostat application started failing with this error:

5976d23c-e7f7-4c8c-89c2-04f2fed48da1 ‎9‎:‎36‎:‎45‎ ‎AM: error could not initialize proxy - no Session

Adding some tracing information, the error seems to be triggered by access to location.mode:

5976d23c-e7f7-4c8c-89c2-04f2fed48da1 ‎9‎:‎36‎:‎45‎ ‎AM: error could not initialize proxy - no Session
5976d23c-e7f7-4c8c-89c2-04f2fed48da1 ‎9‎:‎36‎:‎45‎ ‎AM: debug check1.2
5976d23c-e7f7-4c8c-89c2-04f2fed48da1 ‎9‎:‎36‎:‎45‎ ‎AM: debug Away
5976d23c-e7f7-4c8c-89c2-04f2fed48da1 ‎9‎:‎36‎:‎45‎ ‎AM: debug check1

Code:
def doUpdateTempSettings()
{
log.debug "check1"
log.debug state.latestMode
log.debug "check1.2"
log.debug location.mode
log.debug “check1.3”

The same code has been working smoothly for a few months in the past…
The function is invoked as the result of a runIn(15, …) command.

It’s interesting to note that the error pops up only when the function executing that code is run as the result of a runIn() invocation; when it’s run as the result of a (temperature change) event, it runs smoothly…

Help?


(Todd Wackford) #2

Change your runin line to this:

def now = new Date()
def runTime = new Date(now.getTime() + (the time from now in seconds goes here))
runOnce(runTime, "what you were launching to goes here")

Should work.

Twack


(Minollo) #3

Shouldn’t it be …new Date(now.getTime() + timeInMillisecondsFromNow) ?

Anyway, yes, that does solve the issue… Should I infer that runIn() is buggy/broken/should not be used?


(Todd Wackford) #4

Yes and Yes. It’s being worked.


(Minollo) #5

OK, thanks.
Do you have an ETA for when runIn() will be stable again? Are we talking hours? Days? Weeks? Months?

I’m asking because several of my smartapps rely on runIn(), and I need to know whether I should modify them to use runOnce() instead or if I should just live with some deteriorated behavior in the least critical ones - which I couldn’t afford with the app managing thermostats…


(Ryan Applegate) #6

This fix to runIn will be deployed in the next day or two, most likely tomorrow.


(Minollo) #7

Thanks Ryan; that definitely helps.


(Ryan Applegate) #8

@Minollo, This fix has now been deployed. Let us know if you see anymore issues.


(Minollo) #9

It is working well for me now.
Thanks!