[TIMOB-16874] Android: require() from an included file consistently throws an error if app was started for service (not through app.js)
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | Low |
| Status | Open |
| Resolution | Unresolved |
| Affected Version/s | Release 3.2.2 |
| Fix Version/s | n/a |
| Components | Android |
| Labels | android |
| Reporter | Mohan |
| Assignee | Unknown |
| Created | 2014-04-15T05:41:44.000+0000 |
| Updated | 2020-05-28T04:24:12.000+0000 |
Description
Attachments
| File | Date | Size |
|---|---|---|
| Error.png | 2014-04-15T05:41:44.000+0000 | 339558 |
| Project.zip | 2014-04-15T05:41:44.000+0000 | 55101 |
Moving this ticket to engineering for further evaluation as I verified that global.require is assigned only if there is current activity.
if (self.id == '.' && self.context.currentActivity) { global.require = require; Titanium.Android.currentActivity = self.context.currentActivity; return runInThisContext(source, filename, true); }Still getting this issue on one of our main app in production. Do we have an idea of when it will be fixed ? Or any work around ?
Is the issue fixed? As I am getting a similar error reported in https://stackoverflow.com/questions/61951894/getting-originalrequire-is-not-a-function-when-using-bencoding-alarmmanager-in. Does anyone have idea on that?