Titanium JIRA Archive
Appcelerator Community (AC)

[AC-3515] Minification breaks javascript lib

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionInvalid
Resolution Date2016-04-21T14:34:15.000+0000
Affected Version/sAppcelerator Studio 4.5.0
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsalloy, bluebird, ios, javascript, minification
ReporterOnur Yıldırım
AssigneeShak Hossain
Created2016-04-17T17:44:05.000+0000
Updated2016-04-21T14:34:15.000+0000

Description

I use Bluebird Promise library in my Alloy app. App builds for Android without any issues but for iOS throws the error below and crashes. I *Reproduce:* * Include bluebird.js in app/lib * Build/Run for iOS (iPhone 6s) * Red error dialog is displayed and reads: _Attempted to assign to readonly property at bluebird.js_ Before I opened this issue here, I made sure it's not Bluebird itself and opened an issue at GitHub here: https://github.com/petkaantonov/bluebird/issues/1073 The author clearly states that, that property is not readonly and this is not specific to Bluebird. -My guess is minification breaks the code for iOS.-

Attachments

FileDateSize
2016-04-21 04.54.01 pm.png2016-04-21T14:06:14.000+0000163640

Comments

  1. Sharif AbuDarda 2016-04-20

    Hello, I tried to reproduce the issue in my environment. I wasn't able to reproduce the issue. I put the bluebird.js in app/lib folder and required the file in "index.js" as "require('bluebird');". I build the app in iOS. the app runs as expected. No crash occurred. Could you please attach relevant code which is essential for regenerating the issue. Regards, Sharif.
  2. Onur Yıldırım 2016-04-21

    Turns out this issue is invalid. Minification is not the problem, my code was. But the misdirection is the error dialog shown.
  3. Sharif AbuDarda 2016-04-21

    Thanks for letting us know. Closing the ticket.

JSON Source