2
votes

I am using titanium and genymotion as android emulator. I am getting the following error:-

[ERROR] Error while firing "post-execute" event [ERROR] Error: EPERM, operation not permitted 'C:\Users\sudatta.titanium\analytics_session.json' at fs.openSync (fs.js:439:18) at fs.writeFileSync (fs.js:978:15) at c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\analytics.js:192:7 at c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\lib\async.js at done (c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\lib\as at c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\lib\async.js at c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\node_modules\async\lib\async.js at c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\analytics.js:113:5 at getOSInfo (c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\environ.js:205:3

at async.parallel.osinfo (c:\Users\sudatta\AppData\Roaming\npm\node_modules\titanium\node_modules\node-appc\lib\anal

at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:353:13
at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:563:6)
at conn.exec.bufferUntilClose (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js
at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:251
at Socket.emit (events.js:117:20)

at _stream_readable.js:944:16

at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:248:9)
at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:486:9)
at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:171
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:765:14)

at Socket.emit (events.js:92:17)

at Readable.on (_stream_readable.js:708:33)
at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:119:9)
at ADB.shell (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:482:7)
at ADB.getPid (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:552:7)
at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:343:15
at async.whilst (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:619:13)
at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:340:15

at conn.exec.bufferUntilClose (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js

at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:248:9)
at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:486:9)
at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:171
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:765:14)

at Socket.emit (events.js:92:17)

at Readable.on (_stream_readable.js:708:33)
at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:119:9)
at ADB.shell (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:482:7)
at ADB.startApp (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:580:7)
at startApp (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:334:12)
at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:365:9
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:134:13)
at async.eachSeries (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:150:9)

I have checked a few articles regarding the same which talks about genymotion bug, but my error does not seem to be relevant. Anyone has any idea why suddenly this error started to appear. I have the permission for the file analytics_session.json. Thanks.

2

2 Answers

1
votes

Maybe you should end task Nodejs, and try building again. This happens because the EventIO is still attached to the earlier build process.

0
votes

You're trying to write a file you don't have write permission to. SInce you seem to have a file handle, you must have opened it in read mode instead of write.