Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repeated alerts saying "Something went wrong internally" #126

Closed
scouten opened this issue Jul 22, 2016 · 27 comments
Closed

Repeated alerts saying "Something went wrong internally" #126

scouten opened this issue Jul 22, 2016 · 27 comments

Comments

@scouten
Copy link

scouten commented Jul 22, 2016

screen shot 2016-07-22 at 13 59 05

I'm seeing a lot of this warning appearing when I edit files in Atom using this plugin. A couple of things:

  1. The warning is sufficiently vaguely worded that I at first mistook it for an Atom issue itself. When informed on the Atom.io Slack channel that there was nothing in Atom itself that would issue such a dialog, then I searched the .atom folder and found this:
$ grep -rlIn "this annoying warning" .
./packages/linter-js-standard/lib/linter-js-standard.js
./packages/linter-js-standard/lib/utils/style-settings.js
  1. This happens really frequently in some files, never on others. I have no idea what's different. Seems to have started when I installed Atom 1.8.0 (another reason I was inclined to blame Atom at first)

  2. Closing and reopening the file never helps.

LMK if there's more detail I can provide.

@thtliife
Copy link
Contributor

@scouten,
If you open the dev tools in atom, and then reproduce that warning, do u see any errors in the dev tools console?

@scouten
Copy link
Author

scouten commented Jul 23, 2016

I'm away from computer now. Will check it out over the weekend and let you
know.

On Fri, Jul 22, 2016 at 19:20 Vito Giarrusso notifications@github.com
wrote:

@scouten https://github.com/scouten,
If you open the dev tools in atom, and then reproduce that warning, do u
see any errors in the dev tools console?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#126 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAJqt41OqFSuFwEsPa3dN1vHSma6A6qKks5qYXqDgaJpZM4JTJHJ
.

@scouten
Copy link
Author

scouten commented Jul 24, 2016

Nothing obvious. Here's the entire console log from one case where this happened just now:

Window load time: 406ms
/Applications/Atom.app/Contents/Resources/app.asar/src/workspace-element.js:26 ::shadow pseudo-element is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
file:///Applications/Atom.app/Contents/Resources/app.asar/static/font-awesome.min.css Failed to load resource: net::ERR_FILE_NOT_FOUND
/deep/ combinator is deprecated. See https://www.chromestatus.com/features/6750456638341120 for more details.
/Users/scouten/.atom/packages/nuclide/pkg/nuclide-task/lib/bootloader.js:58 TASK(8483): Watchman:  Watchman was not found in PATH.  See https://facebook.github.io/watchman/docs/install.html for installation instructions
[2016-07-24T03:43:05.600Z] [ERROR] nuclide - Error while talking to watchman:  { [Error: Watchman was not found in PATH.  See https://facebook.github.io/watchman/docs/install.html for installation instructions]
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn watchman',
  path: 'watchman',
  spawnargs: [ '--no-pretty', 'get-sockname' ] }
[2016-07-24T03:43:05.613Z] [ERROR] nuclide - Watchman client disconnected, reconnecting a new client!
[2016-07-24T03:43:05.614Z] [INFO] nuclide - getFilesFromWatchman failed, falling back to hg/git/find [Error: The client was ended]
Watchman:  Watchman was not found in PATH.  See https://facebook.github.io/watchman/docs/install.html for installation instructions
[2016-07-24T03:43:05.686Z] [ERROR] nuclide - Error while talking to watchman:  { [Error: Watchman was not found in PATH.  See https://facebook.github.io/watchman/docs/install.html for installation instructions]
  code: 'ENOENT',
  errno: 'ENOENT',
  syscall: 'spawn watchman',
  path: 'watchman',
  spawnargs: [ '--no-pretty', 'get-sockname' ] }
[2016-07-24T03:43:05.687Z] [ERROR] nuclide - Watchman client disconnected, reconnecting a new client!
[2016-07-24T03:43:05.688Z] [WARN] nuclide - Could not update path sets for /Users/scouten/(redacted). Searches may be stale [Error: The client was ended]

@thtliife
Copy link
Contributor

You're right... Nothing obvious.
What version of the linter package is showing up in settings?

@scouten
Copy link
Author

scouten commented Jul 25, 2016

screen shot 2016-07-25 at 09 52 20

@Arcanemagus
Copy link
Contributor

It looks like that error is only thrown if settings isn't defined/empty. That seems to only come from the cache, which is set on activation of the package, and when Workspace::onDidChangeActivePaneItem triggers. So somehow the cache is empty when a lint is triggered.

@jimmed
Copy link

jimmed commented Jul 26, 2016

I've been getting the same problem relentlessly in certain projects.

Opening the devtools shows the following error having been thrown:

Uncaught (in promise) Error: Something went wrong.
    at Object.checkStyleSettings (/Users/jimobrien/.atom/packages/linter-js-standard/lib/utils/style-settings.js:54:13)
    at Object.module.exports.__cacheTextEditor (/Users/jimobrien/.atom/packages/linter-js-standard/lib/init.js:101:21)
    at storeSettings (/Users/jimobrien/.atom/packages/linter-js-standard/lib/init.js:64:14)
    at /Users/jimobrien/.atom/packages/linter-js-standard/lib/init.js:71:7

@ricardofbarros
Copy link
Owner

Hey @Arcanemagus @jimmed , I've just published a fix on the latest version v3.8.3, care to test? Open if there's some problem. Thanks

@jimmed
Copy link

jimmed commented Feb 24, 2017

@ricardofbarros I'm afraid I can't test the fix as I'm on a completely different laptop/OS now, working on different projects for a different company, but I appreciate you replying :)

@rbudiharso
Copy link

In my case in the dev tool console I got standard is not defined
screenshot from 2017-03-21 15-19-32

@rbudiharso
Copy link

My Bad, the issue is from linter-js-standard-jsx, disabling it stops the yellow warning pop up.

@dcalhoun
Copy link

@ricardofbarros I'm experiencing this error. I believe it started when I changed my StandardJS config to use babel-eslint as the parser. There are no errors in the dev console.

I do not see any settings related to selecting a parser within linter-js-standard's config. Am I doing something incorrect or is this a bug?

@xdumaine
Copy link

I'm still getting this, but no errors in the console.

@ugiacoman
Copy link

Getting this error as well, any fixes?

@ricardofbarros ricardofbarros reopened this May 2, 2017
@hutch120
Copy link

hutch120 commented May 12, 2017

I fixed it by doing this:

File > Settings > Packages > Search "linter-js-standard" > Click Disable > Click Enable > Restart Atom.io

tumblr_mtud5kx2t71r7fahjo1_250

@PuddletownDesign
Copy link

PuddletownDesign commented May 16, 2017

This error is appearing even when editing non-js files for me. Almost any file that I open and again on every save unless I close, reopen and re-save the file.

Hutch your suggestion doesn't fix this for me.

@hutch120
Copy link

@PuddletownDesign

Did you try these things?

  • Check/uncheck each setting checkbox then back to your setting.
  • Pick another style, then back to your style.
  • Reinstall? `apm install linter-js-standard'

I'm guessing that rebuilt the settings data on my system. This must be something to do with settings, right?

if (!settings || !settings.opts || !settings.style) {
  atom.notifications.addWarning('Something went wrong internally.', {
    detail: 'No sweat, just re-open this file and this annoying warning shouldn\'t appear anymore',
    dismissable: true
  })
  return []
}

@sekl
Copy link

sekl commented May 25, 2017

This started happening for me after updating packages after not having done so in a while.

Check/uncheck each setting checkbox then back to your setting.

This fixed it. :)

@geovanisouza92
Copy link

geovanisouza92 commented May 29, 2017

As said by @hutch120, this part:

if (!settings || !settings.opts || !settings.style) {
  atom.notifications.addWarning('Something went wrong internally.', {
    detail: 'No sweat, just re-open this file and this annoying warning shouldn\'t appear anymore',
    dismissable: true
  })
  return []
}

Specifically this part !settings.style maybe is causing the issue, because, as I can see on my config.cson:

...
  "linter-js-standard":
    checkStyleDevDependencies: true
...

While my settings are like this

selecao_019

settings.style is undefined.


EDIT: Maybe settings.opts too?

@xdumaine
Copy link

xdumaine commented Jun 6, 2017

Can the code for that alert just be removed? I'm going to have to remove this package or fork it.

@revelt
Copy link

revelt commented Jun 20, 2017

I agree with @xdumaine, those alerts should have a kill-switch, regular "civilian" users might not be capable to do anything about it anyway, so why annoy them?

@revelt
Copy link

revelt commented Jun 20, 2017

Hi all, in the meantime, if you want a solution for this problem, I suggest to uninstall this package and install linter-js-standard-engine instead. Worked for me, I don't get the yellow error popups any more.

Just have the standard installed as a devDependency and it will be tapped OK. I suggest not to use * semver range but update it manually. Last major release (v10) introduced new rules (like import being not at the top) that broke previously valid v9 code.

@sonicdoe
Copy link
Collaborator

Does this issue still occur for anyone with v3.9.2 or v3.9.3? I think this might have been fixed with e51f30b.

@dcalhoun
Copy link

@sonicdoe I am no longer experiencing this warning. Currently using linter-js-standard@3.9.2.

@revelt
Copy link

revelt commented Jul 29, 2017

Me the same, 3.9.2 works fine. #179 is already closed, I think we can close this too. What do you think guys?

@hutch120
Copy link

@sonicdoe @revelt Looking good. Nice work!

Consider removing the dismissable flag for a smother user experience if it happens to occur for a legitimate reason. I think the dismissable flag is only really useful if you want to capture the user close event for some reason. I.e. This:

atom.notifications.addWarning('Something went wrong internally.', {
  detail: 'No sweat, just re-open this file and this annoying warning shouldn\'t appear anymore',
  dismissable: true
})

Becomes this:

atom.notifications.addWarning('Something went wrong internally.', {
  detail: 'No sweat, just re-open this file and this annoying warning shouldn\'t appear anymore'
})

@sonicdoe
Copy link
Collaborator

Since v3.9.2 seems to work fine and the warning is no longer even present on master since e5c73cb, I’ll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests