{ "id": "175087", "key": "AC-6554", "fields": { "issuetype": { "id": "1", "description": "A problem which impairs or prevents the functions of the product.", "name": "Bug", "subtask": false }, "project": { "id": "12217", "key": "AC", "name": "Appcelerator - INBOX", "projectCategory": { "id": "10000", "description": "", "name": "Customer Service" } }, "resolution": null, "resolutiondate": null, "created": "2020-06-05T13:16:09.000+0000", "labels": [], "versions": [], "issuelinks": [], "assignee": { "name": "amukherjee", "key": "amukherjee", "displayName": "Abir Mukherjee", "active": true, "timeZone": "America/Los_Angeles" }, "updated": "2021-02-10T10:13:14.000+0000", "status": { "description": "The issue is open and ready for the assignee to start work on it.", "name": "Open", "id": "1", "statusCategory": { "id": 2, "key": "new", "colorName": "blue-gray", "name": "To Do" } }, "components": [ { "id": "14548", "name": "Titanium SDK & CLI", "description": "Please enter tickets related to the MobileSDK here." } ], "description": "I use the [bencoding.AlarmManager Module|https://github.com/benbahrenburg/benCoding.AlarmManager] to schedule notifications. Everything is fine when I schedule those notifications from within the app, for example after a button click. When I click a notification, the app starts fine.\r\n\r\nBut when I schedule those notifications in a service after the BOOT_COMPLETED event, the notifications are still being displayed, but when I click on them, I see the splash screen of my app and then the below error:\r\n\r\n{code}\r\n TypeError: originalRequire is not a function\r\n at global.require (:19311:10)\r\n at :19571:3\r\n at loadAsync (:19497:5)\r\n at _startSnapshot (:19568:1)\r\n at /ti.main.js:1:98\r\n at Module._runScript (ti:/module.js:587:9)\r\n at Module.load (ti:/module.js:106:7)\r\n at Function.Module.runModule (ti:/module.js:74:9)\r\n \r\n org.appcelerator.kroll.runtime.v8.V8Runtime.nativeRunModule(Native Method)\r\n org.appcelerator.kroll.runtime.v8.V8Runtime.doRunModule(V8Runtime.java:174)\r\n org.appcelerator.titanium.TiApplication.launch(TiApplication.java:791)\r\n org.appcelerator.titanium.TiLaunchActivity.loadScript(TiLaunchActivity.java:98)\r\n org.appcelerator.titanium.TiRootActivity.loadScript(TiRootActivity.java:480)\r\n org.appcelerator.titanium.TiLaunchActivity.onResume(TiLaunchActivity.java:179)\r\n org.appcelerator.titanium.TiRootActivity.onResume(TiRootActivity.java:499)\r\n android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1446)\r\n android.app.Activity.performResume(Activity.java:7939)\r\n android.app.ActivityThread.performResumeActivity(ActivityThread.java:4195)\r\n{code}\r\n\r\nIt seems this happens randomly.\r\n\r\nI realised this happens since I compile this module with SDK 9.0.2.GA. If I use the old module binary everything works fine.\r\n\r\nOn [Stackoverflow|https://stackoverflow.com/questions/61951894/getting-originalrequire-is-not-a-function-when-using-bencoding-alarmmanager-in] there is another one who experiences this with SDK 9 (but not with SDK 8.3.0).", "attachment": [], "flagged": false, "summary": "Android: TypeError: originalRequire is not a function", "creator": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "subtasks": [], "reporter": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "environment": "{code}\r\nOperating System\r\n Name = Linux Mint 19.3 Tricia\r\n Version = 19.3\r\n Architecture = 64bit\r\n # CPUs = 8\r\n Memory = 7.7GB\r\n\r\nNode.js\r\n Node.js Version = 12.16.0\r\n npm Version = 6.14.4\r\n\r\nTitanium CLI\r\n CLI Version = 5.2.2\r\n node-appc Version = 0.2.49\r\n\r\nTitanium SDKs\r\n 9.0.2.GA\r\n Version = 9.0.2\r\n Install Location = /home/michielve/.titanium/mobilesdk/linux/9.0.2.GA\r\n Platforms = android\r\n git Hash = 2afd8186e8\r\n git Timestamp = 5/18/2020 12:01\r\n node-appc Version = 0.3.4\r\n{code}", "comment": { "comments": [ { "id": "455659", "author": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "body": "I cannot delete this issue, but I'm investigating this a little further, so you can leave this issue for what it is.", "updateAuthor": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-06T09:34:58.000+0000", "updated": "2020-06-06T09:34:58.000+0000" }, { "id": "455660", "author": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "body": "FYI: After I downgraded from Node v12.X to v10.21.0 it looks like everything is working fine. This issue can be closed.", "updateAuthor": { "name": "michielve", "key": "michielve", "displayName": "Michiel van Eerd", "active": true, "timeZone": "Europe/Berlin" }, "created": "2020-06-06T14:12:41.000+0000", "updated": "2020-06-06T14:12:41.000+0000" }, { "id": "457241", "author": { "name": "tkurosawa", "key": "tkurosawa", "displayName": "Tatsuya Kurosawa", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I'm having the same bug and I'm in trouble.\r\n Is there any countermeasure?\r\nNode.js is v10.21.0.\r\nSDK version is 9.2.1, and all 9.x series had problems.", "updateAuthor": { "name": "tkurosawa", "key": "tkurosawa", "displayName": "Tatsuya Kurosawa", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2020-10-13T13:10:19.000+0000", "updated": "2020-10-13T13:10:19.000+0000" }, { "id": "458206", "author": { "name": "jack.lee", "key": "jack.lee", "displayName": "Jack Lee", "active": true, "timeZone": "America/Los_Angeles" }, "body": "I also having the same problem when using the SDK 9.3.1.\r\n\r\nGot the same error message after alarmManager Module started in the background service. \r\n\r\nAny updates on this issue?\r\n\r\nEnvironment Info:\r\nNodeJS - v12.19.0\r\nTitanium SDK - 9.3.1 GA\r\nAndroid NDK - android-ndk-r21e\r\nandroid.buildTools.selectedVersion = \"30.0.0.2\"\r\nandroid.platformTools.selectedVersion = \"30.0.0.2\r\n\r\nTested Devices:\r\nGoogle Pixel 3 Android 11\r\nSamsung S10+ Android 10\r\nSamsung S8 Android 8\r\nSamsung J7 Android 8.1.0", "updateAuthor": { "name": "jack.lee", "key": "jack.lee", "displayName": "Jack Lee", "active": true, "timeZone": "America/Los_Angeles" }, "created": "2021-02-10T10:06:24.000+0000", "updated": "2021-02-10T10:06:24.000+0000" }, { "id": "458207", "author": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "body": "[~jack.lee] keep in mind that the orignal repo is archived and 3years+ old! If you want to use the module (which might not work) please at least test one of the forks like https://github.com/brentonhouse/benCoding.AlarmManager/\r\n\r\nAlso: did you try the solution above to downgrade node?", "updateAuthor": { "name": "michael", "key": "michael", "displayName": "Michael Gangolf", "active": true, "timeZone": "Europe/Berlin" }, "created": "2021-02-10T10:13:14.000+0000", "updated": "2021-02-10T10:13:14.000+0000" } ], "maxResults": 5, "total": 5, "startAt": 0 } } }