
-
0x77
I think I found the issue: I was trying to call
eval_js
while the AJAX request was running (synchronous request,async: false
). Python was waiting for the AJAX request to timeout before runningjs_eval
. -
0x77
I have some code that runs something like this:
call = '({})({})'.format(code, args) result = js.eval_js(call) print(result) return result
That
return
value then is sent as a response to an AJAX call from JavaScript to a Bottle server (which made the previous code run).
If I don't runeval_js
and setresult
to anything - for example:result = 'hello'
- the response is sent correctly, but if I useeval_js
, firstly it freezes Pythonista for a few seconds, then it prints the correct result (from theeval_js
call), but the response is empty.I guess the UI is breaking the connection, somehow, corrupting the response.