Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15409] New Relic: IOError: [Errno 13] Permission denied

GitHub Issuen/a
TypeBug
PriorityLow
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsAndroid
Labelsmodule, newrelic
ReporterMauro Parra-Miranda
AssigneeUnknown
Created2013-09-16T23:15:21.000+0000
Updated2018-02-28T20:03:43.000+0000

Description

Created an empty project with New Relic Module 1.0 I followed this tutorial: http://developer.appcelerator.com/blog/2013/08/you-can-now-easily-add-new-relic-to-your-titanium-studio-apps.html When compiling project got the following error:
 
[INFO] Adding New Relic support.
[ERROR] Exception occured while building Android project:
[ERROR] Traceback (most recent call last):
[ERROR]   File "C:\Users\David\AppData\Roaming\Titanium\mobilesdk\win32\3.1.2.GA\android\builder.py", line 2621, in <module>
[ERROR]     builder.build_and_run(True, avd_id, device_args=device_args, debugger_host=debugger_host, profiler_host=profiler_host)
[ERROR]   File "C:\Users\David\AppData\Roaming\Titanium\mobilesdk\win32\3.1.2.GA\android\builder.py", line 2367, in build_and_run
[ERROR]     shutil.copyfile(os.path.join(newrelic_module.path, 'class.rewriter.jar'), temp_jar.name)
[ERROR]   File "C:\Program Files (x86)\Titanium Studio\plugins\com.appcelerator.titanium.python.win32_1.0.0.1338515509\python\lib\shutil.py", line 82, in copyfile
[ERROR]     with open(dst, 'wb') as fdst:
[ERROR] IOError: [Errno 13] Permission denied: 'c:\\users\\david\\appdata\\local\\temp\\tmp6rjiij.jar'
[ERROR] :  Build process exited with code 1

Comments

  1. Alex Bernier 2013-09-20

    I see this as well. Titanium Studio version: 3.1.3.201309132423 Titanium CLI version: 3.1.2 Titanium SDK version: 3.1.3.GA
  2. Mauro Parra-Miranda 2013-09-24

    Hello, do you have permission to write into that directory? Best, Mauro
  3. David Benko 2013-09-24

    Yes, here: http://s2.postimg.org/v74437npl/Untitled.png I even ran Titanium Studio as administrator and got the same error
  4. Ken Kupelian 2013-10-07

    Hi all, My apologies for this error. It is specific to Windows when you are building for Android. I came across this error right when 3.1.2 was released and updated our docs with a workaround: https://docs.newrelic.com/docs/mobile-apps/titanium-installation-and-configuration-windows The issue is due to the builder.py file that is being used by Titanium Studio to build the Android app and the code is specific to Windows. We have an updated version of the builder.py file that you can download here: https://download.newrelic.com/titanium/Titanium_Studio_3.1.3_Windows_Fix.zip All you need to do is replace the old builder.py file with the new one and you should be able to successfully build now. That file is located at: C:\Users\\AppData\Roaming\Titanium\mobilesdk\win32\\android\ We are attempting to get this updated file included in the Titanium Studio 3.1.4 release, so hopefully this won't be an issue after that. Please see the included README or the docs site linked above for more detailed instructions if interested. Thanks! Ken Kupelian Mobile QA Engineer New Relic
  5. Mauro Parra-Miranda 2013-10-07

    The workaround is included in the comments.
  6. Alex Bernier 2013-10-11

    Thank you for the fix, I'm all set now on 3.1.3.GA after replacing builder.py
  7. David Benko 2013-10-12

    Yes, it worked. Unfortunatelly we missed the remote-controlled helicopter haha
  8. Ken Kupelian 2013-10-31

    Hi all, Unfortunately, it does not look like our fix to the builder.py file is going to make it into Titanium Studio 3.1.4, so if you upgrade to 3.1.4 when it is released, you may want a version of the builder.py file with Appcelerator's latest changes (it now includes the network jar, even in production). I grabbed the latest version of the file from the github repository and updated it with our Windows fix. You can download it here: https://download.newrelic.com/titanium/Titanium_Studio_3.1.4_Windows_Fix.zip I just verified this works with Titanium Studio 3.1.3 as well, so feel free to start using it now if you'd like. Instructions are the same as above. Please let me know if you have any questions! Thanks! Ken Kupelian Mobile QA Engineer New Relic
  9. Alex Bernier 2013-10-31

    In case others hit this: you need to be logged into your account to download that file. Otherwise you receive a 403. Thank you, Ken for the thorough update, testing, and fix.

JSON Source