Atom can not write files correctly?


#1

Am am having a problem with a fresh install of Atom and I do not know if it is the plugin I am using or the app… so I am just going to let you know what is going on and maybe someone can help me?

I get this error…
Uncaught Error: EPERM: operation not permitted, open ‘C:\Users\User\AppData\Local\Temp\TabletopSimulator\Tabletop Simulator Lua\Global.-1.ttslua’
at Object.fs.openSync (fs.js:584:18)
at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
at FileHandler.create (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:230:14)
at readFilesFromTTS (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:326:11)
at handleMessage (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1450:7)
at Socket. (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1632:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:560:20)

and when I try to write files I get this error…
Unable to open ‘C:\Users\User\AppData\Local\Temp\TabletopSimulator\Tabletop Simulator Lua\Global.-1.ttslua’
EPERM: operation not permitted, open ‘C:\Users\User\AppData\Local\Temp\TabletopSimulator\Tabletop Simulator Lua\Global.-1.ttslua’

Sorry I can not find any info on how to format my post.

I’m using a plugin that integrates Atom with a app called TABLETOP SIMULATOR… when it fetches the script from the engine it, that works, I can edit the scripts fine… but after I send them back to the TTS app atom will not refresh… I can not even fetch them again, I need to close the entire application down.

The scripts I am working on are stored in …users…\Local\Temp\TabletopSimulator

I thought it might be a access thing… I’m using windows10… but I have tired running both Atom and the engine in admin mode.

Any ideas?


#2

Does the issue occur in safe mode? (I’m not saying you need to work in safe mode from now on, I’m just trying to determine if it’s a plugin issue or not).

Open Atom in the command prompt with atom --safe to find out.


#3

I can not tell… as in safe mode the plugin for tabletop simulator is not working

I have managed to get the error down to a easy replicated form… but do not know how to fix…

EXAMPLE: https://screencast-o-matic.com/watch/cFe0evDyNb

In this example…

  • I load TTS and load a test file.
    
  • I load Atom and fetch the scripts. (I have the console open)
    
  • I make a small change and send it back to TTS
    
  • TTS gets the change, but the "auto load fails" and throws the error message below.
    
  • If I try to get fetch the scripts again, I get the same error message
    

fs.js:584 Uncaught Error: EPERM: operation not permitted, open ‘C:\Users\User\AppData\Local\Temp\TabletopSimulator\Tabletop Simulator Lua\Auto-Spawner.653c76.ttslua’
at Object.fs.openSync (fs.js:584:18)
at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
at FileHandler.create (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:230:14)
at readFilesFromTTS (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:326:11)
at handleMessage (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1450:7)
at Socket. (file:///C:/Users/User/.atom/packages/tabletopsimulator-lua/lib/tabletopsimulator-lua.coffee:1632:9)
at emitOne (events.js:96:13)
at Socket.emit (events.js:191:7)
at readableAddChunk (_stream_readable.js:178:18)
at Socket.Readable.push (_stream_readable.js:136:10)
at TCP.onread (net.js:560:20)


#4

Yeah, it’s definitely an issue with the package then. Try looking at the relevant package repository, and see if an issue has been raised for it. If not, you can try raising one yourself with details on how to reproduce, etc.

Edit: And yes, Atom is capable of writing to files without issues. This is abnormal behaviour, and I believe the package developers are best suited to pinpoint the issue (and then decide what to do further).


#5

I am not sure it is… it seems to be an error with atom writing temp files… like access privileges or something?


#6

I have no idea how you’ve set up your computer. I do know that writing to temporary files works fine for me, as I use it in my own package.