sean-codes/atom-windows-titlebar

Failed to activate the atom-windows-titlebar package

Closed this issue · 3 comments

[Enter steps to reproduce:]

  1. ...
  2. ...

Atom: 1.27.0 x64
Electron: 1.7.11
OS: Microsoft Windows 10 Education
Thrown From: atom-windows-titlebar package 0.14.0

Stack Trace

Failed to activate the atom-windows-titlebar package

At EPERM: operation not permitted, open 'C:\WINDOWS\system32\toggleframe.js'

Error: EPERM: operation not permitted, open 'C:\WINDOWS\system32\toggleframe.js'
    at Object.fs.openSync (fs.js:584:18)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:173:20)
    at Object.fs.writeFileSync (fs.js:1326:33)
    at AtomWindowsTitlebarFrame.addToggleFrameFile (/packages/atom-windows-titlebar/lib/atom-windows-titlebar-frame.js:12:10)
    at /packages/atom-windows-titlebar/lib/atom-windows-titlebar-frame.js:7:12)
    at Object.activate (/packages/atom-windows-titlebar/lib/atom-windows-titlebar.js:14:37)
    at Package.activateNow (~/AppData/Local/atom/app-1.27.0/resources/app/src/package.js:230:33)
    at measure (~/AppData/Local/atom/app-1.27.0/resources/app/src/package.js:206:33)
    at Package.measure (~/AppData/Local/atom/app-1.27.0/resources/app/src/package.js:88:25)
    at activationPromise.Promise (~/AppData/Local/atom/app-1.27.0/resources/app/src/package.js:200:20)
    at Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.27.0/resources/app/src/package.js:198:38)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.27.0/resources/app/src/package-manager.js:695:42)
    at config.transactAsync (~/AppData/Local/atom/app-1.27.0/resources/app/src/package-manager.js:670:36)
    at Config.transactAsync (~/AppData/Local/atom/app-1.27.0/resources/app/src/config.js:866:28)
    at PackageManager.activatePackages (~/AppData/Local/atom/app-1.27.0/resources/app/src/package-manager.js:668:23)
    at PackageManager.activate (~/AppData/Local/atom/app-1.27.0/resources/app/src/package-manager.js:647:50)
    at loadStatePromise.loadState.then (~/AppData/Local/atom/app-1.27.0/resources/app/src/atom-environment.js:871:27)
    at <anonymous>

Commands

Non-Core Packages

arduino-toolbelt 0.1.1 
arduino-upload 1.3.3 
atom-beautify 0.32.4 
atom-html-preview 0.2.5 
atom-live-server 2.2.0 
atom-tabs-in-sidebar 1.1.0 
atom-windows-titlebar 0.14.0 
autocomplete-clang 0.11.4 
build 0.70.0 
build-arduino 0.1.1 
busy-signal 1.4.3 
copy-path 0.5.1 
emmet 2.4.3 
emmet-snippets-compatibility 1.0.6 
file-icons 2.1.20 
hey-pane 1.1.0 
highlight-selected 0.13.1 
intentions 1.1.5 
language-arduino 0.4.3 
language-ini 1.20.0 
linter 2.2.0 
linter-gcc 0.7.1 
linter-ui-default 1.7.1 
meteor-api 2.20.0 
minimap 4.29.8 
minimap-bookmarks 0.4.2 
minimap-cursorline 0.2.0 
minimap-find-and-replace 4.5.2 
minimap-git-diff 4.3.1 
minimap-highlight-selected 4.6.1 
minimap-linter 2.1.3 
minimap-pigments 0.2.2 
minimap-selection 4.5.0 
night-terminal 1.1.1 
no-title-bar 1.11.4 
pigments 0.40.2 
platformio-ide 2.1.4 
platformio-ide-debugger 1.2.6 
platformio-ide-terminal 2.8.1 
relative-numbers 0.9.0 
scroll-through-time 0.3.0 
terminal-plus 0.14.5 
tool-bar 1.1.7 
tool-bar-atom 1.7.0 
tool-bar-main 0.0.11 
toolbar-icons-ide 1.1.0 
toolbar-ide 1.2.0 
tree-view-copy-relative-path 1.2.0 

2020 and this is still an issue. :/

  1. Install Extension
  2. Restart

Atom: 1.42.0 x64
Electron: 4.2.7
OS: Microsoft Windows 10 Pro
Thrown From: atom-windows-titlebar package 0.14.0

Stack Trace

Failed to activate the atom-windows-titlebar package

At EPERM: operation not permitted, open './toggleframe.js'

Error: EPERM: operation not permitted, open './toggleframe.js'
    at Object.openSync (fs.js:436:3)
    at Object.module.(anonymous function) [as openSync] (ELECTRON_ASAR.js:160:31)
    at Object.writeFileSync (fs.js:1168:35)
    at AtomWindowsTitlebarFrame.addToggleFrameFile (/packages/atom-windows-titlebar/lib/atom-windows-titlebar-frame.js:12:10)
    at /packages/atom-windows-titlebar/lib/atom-windows-titlebar-frame.js:7:12)
    at Object.activate (/packages/atom-windows-titlebar/lib/atom-windows-titlebar.js:14:37)
    at Package.activateNow (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:3316396)
    at measure (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:3315808)
    at Package.measure (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:3313418)
    at activationPromise.activationPromise.Promise (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:3315668)
    at new Promise (<anonymous>)
    at Package.activate (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:3315611)
    at PackageManager.activatePackage (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:382547)
    at config.transactAsync (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:382163)
    at Config.transactAsync (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:331811)
    at PackageManager.activatePackages (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:382113)
    at PackageManager.activate (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:11:381663)
    at t.loadState.then (~/AppData/Local/atom/app-1.42.0/resources/app/static/<embedded>:1:751127)

Commands

Non-Core Packages

atom-beautify 0.33.4 
atom-windows-titlebar 0.14.0 
material-colors 0.1.0 

If you are seeing this issue it might be a permission issue for atom to be able to write a file to that path. When this package installs I try to add a helper script to that location you can run to disable windows default titlebar.

Atom now has a setting under Core to set the titlebar to hidden. We now don't need the hacky toggleframe.js file so that should fix this error!