question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add sane error message for unreachable host

See original GitHub issue

najax: method jqXHR.“getAllResponseHeaders” not implemented

Update

I’m observing the following error every time my fastboot ember app goes to a route with this.store.query():

najax: method jqXHR."getAllResponseHeaders" not implemented
[object Object]
    at Object.getAllResponseHeaders (/www/node_modules/najax/lib/najax.js:108:15)
    at ajaxResponseData (/www/tmp/broccoli_merge_trees-output_path-xxExqEhS.tmp/assets/addon-tree-output/ember-data/adapters/rest.js:1116:1)
    at ajaxErrorHandler (/www/tmp/broccoli_merge_trees-output_path-xxExqEhS.tmp/assets/addon-tree-output/ember-data/adapters/rest.js:1106:1)
    at Object.hash.error (/www/tmp/broccoli_merge_trees-output_path-xxExqEhS.tmp/assets/addon-tree-output/ember-data/adapters/rest.js:877:1)
    at fire (/www/node_modules/jquery-deferred/lib/jquery-callbacks.js:78:30)
    at Object.fireWith (/www/node_modules/jquery-deferred/lib/jquery-callbacks.js:188:7)
    at Object.fire [as reject] (/www/node_modules/jquery-deferred/lib/jquery-callbacks.js:195:10)
    at ClientRequest.onError (/www/node_modules/najax/lib/najax.js:208:9)
    at emitOne (events.js:116:13)
    at ClientRequest.emit (events.js:211:7)

On routes with multiple queries, I’m observing this message many times. It is flooding my logs.

The routes seem to work because Fastboot returns a non-fastboot page, which works.

This happens when the domain can be reached from the client, but cannot be reached from the Fastboot server.

Please add a more sane error message, as this makes it seem like the response is fine but something is wrong with the najax library.


Looks like this issue:

@kedano commented on Mar 3, 2016:

ember serve works just fine on the project and it looks like ember fastboot almost works as well except for one issue:

najax: method jqXHR."getAllResponseHeaders" not implemented

Except that issue was fixed five hundred two years ago. The current issue has a different cause.


$ cat node_modules/ember-cli-fastboot/package.json | grep \"version\":
  "version": "1.1.4-beta.1"

$ ./node_modules/.bin/ember version --verbose
ember-cli: 3.3.0
http_parser: 2.8.0
node: 8.12.0
v8: 6.2.414.66
uv: 1.19.2
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.32.0
napi: 3
openssl: 1.0.2p
icu: 60.1
unicode: 10.0
cldr: 32.0
tz: 2017c
os: linux x64

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

5reactions
ChristopheVandePoelcommented, Sep 25, 2018

I started getting the same error not so long ago. It happens on my VM, but not when I run it straight from my wsl console locally.

Internally, there’s a getaddrinfo EAI_AGAIN error that results in a getAllResponseHeaders call that fails. For me at least, it was caused by running on a VM that was named in my host-machine’s host-file, but not internally in the VM itself. So adding this line to the VM’s /etc/hosts file resolved the issue:

127.0.0.1       localhost.localdomain   localhost
::1             localhost6.localdomain6 localhost6
127.0.0.1       localhost.localdomain   your-custom-name-here   <- this one
1reaction
Redsandrocommented, Mar 9, 2019

I’ve run into the same problem because after 6 months apparently I forget things. 😅 I could have wasted less time if the actual problem would have a sane error message.

web_1    | najax: method jqXHR."getAllResponseHeaders" not implemented
web_1    | [object Object]
web_1    |     at Object.getAllResponseHeaders (/app/node_modules/najax/lib/najax.js:108:15)
web_1    |     at ajaxResponseData (/tmp/broccoli-16muhuEbMsaNDx/out-326-broccoli_merge_trees/assets/addon-tree-output/ember-data/adapters/rest.js:1146:1)
web_1    |     at ajaxErrorHandler (/tmp/broccoli-16muhuEbMsaNDx/out-326-broccoli_merge_trees/assets/addon-tree-output/ember-data/adapters/rest.js:1136:1)
web_1    |     at Object.hash.error (/tmp/broccoli-16muhuEbMsaNDx/out-326-broccoli_merge_trees/assets/addon-tree-output/ember-data/adapters/rest.js:884:1)
web_1    |     at fire (/app/node_modules/jquery-deferred/lib/jquery-callbacks.js:78:30)
web_1    |     at Object.fireWith (/app/node_modules/jquery-deferred/lib/jquery-callbacks.js:188:7)
web_1    |     at Object.fire [as reject] (/app/node_modules/jquery-deferred/lib/jquery-callbacks.js:195:10)
web_1    |     at ClientRequest.onError (/app/node_modules/najax/lib/najax.js:208:9)
web_1    |     at emitOne (events.js:116:13)
web_1    |     at ClientRequest.emit (events.js:211:7)

Most of the nAjax stuff was written by @danmcclain over 3 years ago. Any thoughts on this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Destination Host Unreachable -Fix Ping Error Message
The Destination Host Unreachable error tells that the ping packets from your computer cannot find a route to the destination IP address(destination host)....
Read more >
andrico1234/sane-error-messages - GitHub
sane -error-messages creates a brand new repo for you, that you can customise to return sane error messages based on predefined error codes....
Read more >
scan was interrupted prior to completion - Tenable Community
Host unreachable error xx.xx.xx.xx IP has been turned off, crashed or became unreachable during the audit -- scan was interrupted prior to completion....
Read more >
I get a 'host is unreachable' error on iOS - Termius support
Navigate to the iOS settings. Find and tap Termius in the list of apps at the bottom. Turn on Local Network. If that...
Read more >
Zabbix - Host Unreachable Errors - YouTube
May those be First network errors, hosts becoming unavailable or unreachable, these error messages quite often question what is happening ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found