Saving js and SCSS deletes random letters


#1

A colleague and I moved to Atom last month. We have both experienced that sometimes when saving files some parts get deleted in random places (can also be single letters). Would love to give you some debug info, but we dont know how to trigger the error as it occurs randomly.

So far this has happened primarily in scss and js files. And only in the file we currently were saving.

Having experienced this error a couple of times, we decided to stop using Atom, until this issue is fixed.

We have no crash reports, but we both use almost the same community packages.

atom-autocomplete-php@0.7.2
atom-material-syntax@0.2.3
atom-material-ui@0.6.0
auto-reveal-in-sidebar@0.5.0
autoclose-html@0.18.0
browser-refresh@0.9.0
caniuse@0.5.5
color-picker@2.0.11
docblockr@0.7.3
emmet@2.3.12
external-open@0.6.1
file-icons@1.6.9
keyboard-scroll@0.4.0
merge-conflicts@1.3.5
minimap@4.13.2
pigments@0.12.0
project-quick-open@0.5.0
remote-edit@1.8.15
seti-syntax@0.4.0
seti-ui@0.8.0
seti-ui-red@0.13.0

Anyone who knows whats going on? And how to fix this issue. We have Gulp watch running in the background.


Atom auto-delete the space between > > when saving
#2

Here is a screenshot:


#3

Have you followed the suggestions in the Debugging document? Also, could you give the following information?

  • Which version of Atom are you using?
  • What OS and version are you running?
  • Do you have Emmet installed?
  • Can you reproduce the issue after completely exiting Atom and restarting using atom --safe?

If you can’t reproduce the issue when running in Safe Mode, I would suspect Emmet first. Other than that, are these files local or remote files? (I see that you have remote-edit installed.)


#4

Thanks @leedohm I have now read the debugging document, and will try disabling Emmet.

My current version of atom is the latest (1.0.9)
I’m running OSX Yosemite (10.10.5)
I do have Emmet installed, but I will disable it now.
I can not reproduce the issue. I comes at random times. (I have experienced it like 5 times the last month. Working fulltime in Atom)
The files are run locally through Laravel Homestead with Gulp Watch enabled.

As soon as I face the problem, I will try debugging with the inspector.


#5

You’re welcome :smile:

What’s Laravel Homestead?


#6

@leedohm
I copy pasted the quick resume from the official Laravel webpage.

Laravel Homestead is an official, pre-packaged Vagrant β€œbox” that provides you a wonderful development environment without requiring you to install PHP, HHVM, a web server, and any other server software on your local machine. No more worrying about messing up your operating system! Vagrant boxes are completely disposable. If something goes wrong, you can destroy and re-create the box in minutes!

The TLDR; ( Pre-packaged Vagrant box ) :wink:

If you work with PHP Laravel its quite awesome! :smile:


#7

I assume Atom is saving the files on the local filesystem and they are mapped to the VM via Vagrant magic? (It’s been a while since I’ve worked with a Vagrant VM.)


#8

Yep, thats right.
Magic it is! :smile:

You should give it a try, if you ever do a PHP project.


#9

I’ll keep it in mind, if I ever do :smile:


#10

This is when saving CSS. Without Emmet-plugin and gulp not active.

Standard MAMP Pro - Local dev situation - Editing wordpress plugin.


OSX Yosemite 10.10.5
Atom 1.0.10


Community Packages

atom-autocomplete-php@0.7.2
atom-material-syntax@0.2.3
atom-material-ui@0.6.0
auto-reveal-in-sidebar@0.5.0
autoclose-html@0.18.0
browser-refresh@0.9.0
caniuse@0.5.5
color-picker@2.0.11
docblockr@0.7.3
external-open@0.6.1
file-icons@1.6.9
keyboard-scroll@0.4.0
merge-conflicts@1.3.5
minimap@4.13.2
pigments@0.12.0
project-quick-open@0.5.0
remote-edit@1.8.15
seti-syntax@0.4.0
seti-ui@0.8.0
seti-ui-red@0.13.0


#11

Can you reproduce the issue after completely exiting Atom and starting it again using atom --safe? I suspect some package is doing this because I’ve never encountered Atom just randomly deleting characters. There has always been some package doing it.


#12

I’m experiencing the same problem (I’m the aforementioned colleague).
Here is a screen capturing of the error recorded today, in both the normal mode and in safe-mode. The error is the same in both. So it shouldn’t have anything to do with the packages installed.

This time it only removed spacings/tabs - but other times it has (as ksiggaard mentioned) removed random letters/brackets/etc.

Video recorded in normal-mode:

Video recorded in safe-mode:


#13

Is there really no one else who is experiencing this error?
I have just uninstalled all packages and completely uninstalled Atom (including deleting the .atom folder).
And after installing Atom again, I am still experiencing the error.
I have attached a file in which I am experiencing the error (after saving, it even highlights some of the code with red, as it can see that something is wrong in the syntax afterwards).

fonts.js


#14

Still having problems here. This time saving js.

Atom v 1.1.0

Community packages:
β”œβ”€β”€ atom-material-syntax@0.2.4
β”œβ”€β”€ atom-material-ui@0.7.1
β”œβ”€β”€ auto-reveal-in-sidebar@0.8.0
β”œβ”€β”€ autoclose-html@0.19.0
β”œβ”€β”€ docblockr@0.7.3
β”œβ”€β”€ file-icons@1.6.11
β”œβ”€β”€ git-history@3.1.0
β”œβ”€β”€ hydra-syntax-theme@0.2.4
β”œβ”€β”€ language-blade@0.16.0
β”œβ”€β”€ language-gitignore@0.2.0
β”œβ”€β”€ merge-conflicts@1.3.7
β”œβ”€β”€ pretty-json@0.4.1
└── project-quick-open@0.5.0


#15

From looking at the screenshots, it doesn’t look random. Mostly affect the region form the end of a line to the start of the other. It looks like if something is off by one when detecting that region.

Do you have anything that will try to reformat on save ?


#16

Actually does this happens if you disable the atom/whitespace package ? That package will delete stuff on save. Maybe there’s something that cause conflict with it.


#17

Thanks for your reply @jeancroy

The reason I call it random, is because if I restart atom and try saving again it will work. I just happens periodically.

I have tried running atom in failsafe mode, still happens from time to time. Also tried disabling almost all packages. But i could specifically try disabling the whitespace package and see if it works.


#18

I was able to reproduce with @gundvang test file. Saved the diff in this repo

Some are start of line as I previously said.

But other are just random

so random it is.


#19

Wow nice work @jeancroy!

So how did you manage to recreate the error?


#20