Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-16874] Android: require() from an included file consistently throws an error if app was started for service (not through app.js)

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sRelease 3.2.2
Fix Version/sn/a
ComponentsAndroid
Labelsandroid
ReporterMohan
AssigneeUnknown
Created2014-04-15T05:41:44.000+0000
Updated2020-05-28T04:24:12.000+0000

Description

Attachments

FileDateSize
Error.png2014-04-15T05:41:44.000+0000339558
Project.zip2014-04-15T05:41:44.000+000055101

Comments

  1. Ritu Agrawal 2014-04-23

    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); 
       }
       
  2. david fabreguette 2014-05-28

    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 ?
  3. Jerry 2020-05-28

    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?

JSON Source