Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-13056] Android: evalJS returns undefined when evaluating function

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2013-03-20T05:03:41.000+0000
Affected Version/sRelease 3.0.0, Release 3.1.0
Fix Version/sRelease 3.1.0, 2013 Sprint 06 Core, 2013 Sprint 06
ComponentsAndroid
LabelsSupportTeam, qe-3.1.0
ReporterEduardo Gomez
AssigneeMax Stepanov
Created2013-03-14T00:41:34.000+0000
Updated2014-06-19T12:43:09.000+0000

Description

Issue

When we evaluate a function that is to be executed in a WebView via evalJS(), sometimes it returns "undefined". When we execute another WebView JS function, it seems to clear up the issue for a bit, but then the issue returns to the original function.

steps to reproduce

1. run the app (sample files attached) 2. notice the UUID that's being logged to the console 3. tap [dump html] button 4. notice the UUID that's being logged to the console 5. tap [get uuid] button 6. notice the UUID is undefined (you may have to tap multiple times) 7. repeat step 3 and 4 8. repeat step 5 and 6, same issue arises

Attachments

FileDateSize
app.js2013-03-14T00:41:34.000+00001526
jquery-1.9.1.min.jsx2013-03-14T00:41:34.000+000092629
test.html2013-03-14T00:41:34.000+0000883

Comments

  1. Max Stepanov 2013-03-20

    PR https://github.com/appcelerator/titanium_mobile/pull/3991
  2. Paras Mishra 2013-04-11

    evalJS returns uuid in this case.Working fine, hence closing it. Verified on: Device : Google Nexus 7, Android Version: 4.1 SDK: 3.1.0.v20130409124549 CLI version : 3.1.0-cr OS : MAC OSX 10.7.5 Appcelerator Studio, build: 3.1.0.201304052347 XCode : 4.5.1

JSON Source