[TIMOB-6629] Android: (V8) Error require()'ing native modules since commit 0c23329
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | Critical |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2011-12-13T20:01:34.000+0000 |
Affected Version/s | Release 1.8.0.1, Release 2.0.0 |
Fix Version/s | Sprint 2011-50, Release 1.8.0.1, Release 2.0.0 |
Components | Android |
Labels | branch-v8, module_module, qe-port, qe-testadded, verified-1.8.0.1 |
Reporter | Bill Dawson |
Assignee | Bill Dawson |
Created | 2011-12-13T13:03:41.000+0000 |
Updated | 2013-01-18T16:28:56.000+0000 |
Description
cf.the breaking change:
https://github.com/appcelerator/titanium_mobile/commit/0c23329
Fail case:
1. build any module (bump, etc.) to create its zip.
2. Create an app and copy the module's zip to the app's root folder.
3. Modify tiapp.xml in the app to include the module.
4. Modify app.js in the app to require() the module.
5. Run the app.
You'll get the error "Requested module not found: bootstrap"
Pull ready: https://github.com/appcelerator/titanium_mobile/pull/972
Testing Notes
1. Create a new Android external module and build it with ant. 2. Create an app to test the module (I'm assuming you know all the steps: edit your tiapp.xml to include the module, put the module zip file in your app folder, and use require() in app.js to access the module). 3. Run the app and make sure no errors appear. (In the failcase you'll get an error right away when the require() statement gets hit.)Variations on this test:
* Run the app (step 3 above) in both v8 and rhino. * Add a *javascript* module to your app as well and require() it, to be sure we didn't break javascript require() (as opposed to external module require()).Verified fix on: SDK build: 1.8.0.1.v20111220190134 Runtime: V8, Rhino Titanium Studio, build: 1.0.7.201112152014 Device: Droid 1 (2.2.2) OS: Mac OS X Lion Note: Will not close bug until verify on SDK build 1.9.0
Closing. Tested with: Titanium Studio, build: 3.0.1.201212181159 Titanium SDK, build: 3.0.2.v20130117161659 Device: Droid3 2.3.4 Android Emulator 3.2