andyrichardson / atom-updater-linux

Be notified of updates to Atom and install without leaving the editor.
https://atom.io/packages/atom-updater-linux
MIT License
5 stars 1 forks source link

Uncaught TypeError: response.some is not a function #1

Closed habeeb-umo closed 6 years ago

habeeb-umo commented 6 years ago
  1. Install Atom 1.23.3
  2. Install atom-updater-linux from package install menu
  3. No worky

Atom: 1.23.3 x64 Electron: 1.6.15 OS: Ubuntu 16.04.2 Thrown From: atom-updater-linux package 1.0.6

Stack Trace

Uncaught TypeError: response.some is not a function

At /home/habeeb/.atom/packages/atom-updater-linux/lib/update.js:129

TypeError: response.some is not a function
    at Request._callback (/packages/atom-updater-linux/lib/update.js:129:18)
    at Request.self.callback (/packages/atom-updater-linux/node_modules/request/request.js:186:22)
    at emitTwo (events.js:106:13)
    at Request.emit (events.js:191:7)
    at /packages/atom-updater-linux/node_modules/request/request.js:1163:10)
    at emitOne (events.js:96:13)
    at Request.emit (events.js:188:7)
    at /packages/atom-updater-linux/node_modules/request/request.js:1085:12)
    at Object.onceWrapper (events.js:290:19)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

Commands

     -9:10.1.0 golang:update-tools (atom-workspace.workspace.scrollbars-visible-always.theme-one-dark-syntax.theme-one-dark-ui)
  2x -7:29.8.0 core:cancel (atom-pane.pane)
     -7:27.8.0 editor:consolidate-selections (input.hidden-input)
     -7:27.8.0 core:cancel (input.hidden-input)
     -6:21.6.0 editor:newline (input.hidden-input)
     -6:19.2.0 core:undo (input.hidden-input)
     -0:05.0 atom-updater-linux:check (input.hidden-input)

Non-Core Packages

atom-live-server 2.1.2 
atom-updater-linux 1.0.6 
go-debug 1.6.0 
go-plus 5.8.1 
go-signature-statusbar 1.2.3 
local-history 4.3.1 
platformio-ide-terminal 2.8.0 
terminal-plus 0.14.5 
andyrichardson commented 6 years ago

Thanks for taking the time to file a report. You haven't given me the steps to reproduce this error but I assume it occurs during requests for updates.

As I am not able to replicate the issue, can you tell me in detail what steps you have taken following installing the package.

Alongside this, are you aware of any unusual conditions of your network which may be interfering with an API request (proxy, vpn, .etc)?

andyedwardsibm commented 6 years ago

Seems to happen every time this morning, and Atom v1.25.0 has just come out.

I get the same stack trace, and this happens every time I start Atom. I've manually upgraded to 1.25.0 and still see the error on starting Atom.

Looking at the code and the url it calls, I can curl https://api.github.com/repos/atom/atom/releases, which returns...

{
  "message": "API rate limit exceeded for {AN IP THAT LEADS BACK TO THE COMPANY I WORK FOR}. (But here's the good news: Authenticated requests get a higher rate limit. Check out the documentation for more details.)",
  "documentation_url": "https://developer.github.com/v3/#rate-limiting"
}

So if anyone else sees this issue, maybe curl that URL. For the code, maybe gracefully fail, or surface the error message in some way? Definitely want to handle the response body not being an array though :)

andyrichardson commented 6 years ago

@andyedwardsdfdl Thanks for the additional information.

After some investigation, it looks as though this is due to the API rate limit for your IP being exceeded.

I am working on providing cleaner output - expect a fix within the next week or so.