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

JsTracer and algorithms.git problems, when offline #1

Open
FullMetalPancake opened this issue Jan 12, 2020 · 0 comments
Open

JsTracer and algorithms.git problems, when offline #1

FullMetalPancake opened this issue Jan 12, 2020 · 0 comments

Comments

@FullMetalPancake
Copy link

FullMetalPancake commented Jan 12, 2020

I would like to run the platform completely locally, but it seems that the server component needs an internet connection to access the algorithms in the algorithms repository and the tracer api.

I am getting the following messages in my terminal
`npm run watch

@algorithm-visualizer/[email protected] watch /home/foobar/server
NODE_ENV=development NODE_PATH=src ts-node-dev --respawn --ignore-watch node_modules --no-notify src

Ignore watch: [ 'node_modules' ]
Using ts-node version 8.2.0, typescript version 3.5.1
http: listening on port 8080
(node:19343) UnhandledPromiseRejectionWarning: Error: getaddrinfo ENOTFOUND api.github.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26)
(node:19343) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 2)
(node:19343) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Error: getaddrinfo ENOTFOUND api.github.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'api.github.com',
config: {
url: 'https://api.github.com/repos/algorithm-visualizer/tracers.cpp/releases/latest',
method: 'get',
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.19.0'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
params: { client_id: 'dummy', client_secret: 'dummy' },
data: undefined
},
request: <ref *1> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: false,
errored: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError]
},
_eventsCount: 2,
_maxListeners: undefined,
_options: {
protocol: 'https:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/repos/algorithm-visualizer/tracers.cpp/releases/latest?client_id=dummy&client_secret=dummy',
method: 'GET',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'api.github.com',
port: null,
nativeProtocols: [Object],
pathname: '/repos/algorithm-visualizer/tracers.cpp/releases/latest',
search: '?client_id=dummy&client_secret=dummy'
},
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
_header: 'GET /repos/algorithm-visualizer/tracers.cpp/releases/latest?client_id=dummy&client_secret=dummy HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'User-Agent: axios/0.19.0\r\n' +
'Host: api.github.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
path: '/repos/algorithm-visualizer/tracers.cpp/releases/latest?client_id=dummy&client_secret=dummy',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
_currentUrl: 'https://api.github.com/repos/algorithm-visualizer/tracers.cpp/releases/latest?client_id=dummy&client_secret=dummy',
[Symbol(kCapture)]: false
},
response: undefined,
isAxiosError: true,
toJSON: [Function (anonymous)]
}
Error: getaddrinfo ENOTFOUND api.github.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'api.github.com',
config: {
url: 'https://api.github.com/repos/algorithm-visualizer/tracers.java/releases/latest',
method: 'get',
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.19.0'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
params: { client_id: 'dummy', client_secret: 'dummy' },
data: undefined
},
request: <ref *1> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: false,
errored: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError]
},
_eventsCount: 2,
_maxListeners: undefined,
_options: {
protocol: 'https:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/repos/algorithm-visualizer/tracers.java/releases/latest?client_id=dummy&client_secret=dummy',
method: 'GET',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'api.github.com',
port: null,
nativeProtocols: [Object],
pathname: '/repos/algorithm-visualizer/tracers.java/releases/latest',
search: '?client_id=dummy&client_secret=dummy'
},
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
_header: 'GET /repos/algorithm-visualizer/tracers.java/releases/latest?client_id=dummy&client_secret=dummy HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'User-Agent: axios/0.19.0\r\n' +
'Host: api.github.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
path: '/repos/algorithm-visualizer/tracers.java/releases/latest?client_id=dummy&client_secret=dummy',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
_currentUrl: 'https://api.github.com/repos/algorithm-visualizer/tracers.java/releases/latest?client_id=dummy&client_secret=dummy',
[Symbol(kCapture)]: false
},
response: undefined,
isAxiosError: true,
toJSON: [Function (anonymous)]
}
Error: getaddrinfo ENOTFOUND api.github.com
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:64:26) {
errno: -3008,
code: 'ENOTFOUND',
syscall: 'getaddrinfo',
hostname: 'api.github.com',
config: {
url: 'https://api.github.com/repos/algorithm-visualizer/tracers.js/releases/latest',
method: 'get',
headers: {
Accept: 'application/json, text/plain, /',
'User-Agent': 'axios/0.19.0'
},
transformRequest: [ [Function: transformRequest] ],
transformResponse: [ [Function: transformResponse] ],
timeout: 0,
adapter: [Function: httpAdapter],
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: -1,
validateStatus: [Function: validateStatus],
params: { client_id: 'dummy', client_secret: 'dummy' },
data: undefined
},
request: <ref *1> Writable {
_writableState: WritableState {
objectMode: false,
highWaterMark: 16384,
finalCalled: false,
needDrain: false,
ending: false,
ended: false,
finished: false,
destroyed: false,
decodeStrings: true,
defaultEncoding: 'utf8',
length: 0,
writing: false,
corked: 0,
sync: true,
bufferProcessing: false,
onwrite: [Function: bound onwrite],
writecb: null,
writelen: 0,
afterWriteTickInfo: null,
bufferedRequest: null,
lastBufferedRequest: null,
pendingcb: 0,
prefinished: false,
errorEmitted: false,
emitClose: true,
autoDestroy: false,
errored: false,
bufferedRequestCount: 0,
corkedRequestsFree: [Object]
},
writable: true,
_events: [Object: null prototype] {
response: [Function: handleResponse],
error: [Function: handleRequestError]
},
_eventsCount: 2,
_maxListeners: undefined,
_options: {
protocol: 'https:',
maxRedirects: 21,
maxBodyLength: 10485760,
path: '/repos/algorithm-visualizer/tracers.js/releases/latest?client_id=dummy&client_secret=dummy',
method: 'GET',
headers: [Object],
agent: undefined,
auth: undefined,
hostname: 'api.github.com',
port: null,
nativeProtocols: [Object],
pathname: '/repos/algorithm-visualizer/tracers.js/releases/latest',
search: '?client_id=dummy&client_secret=dummy'
},
_redirectCount: 0,
_redirects: [],
_requestBodyLength: 0,
_requestBodyBuffers: [],
_onNativeResponse: [Function (anonymous)],
_currentRequest: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 6,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
useChunkedEncodingByDefault: false,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
_contentLength: 0,
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
socket: [TLSSocket],
_header: 'GET /repos/algorithm-visualizer/tracers.js/releases/latest?client_id=dummy&client_secret=dummy HTTP/1.1\r\n' +
'Accept: application/json, text/plain, /\r\n' +
'User-Agent: axios/0.19.0\r\n' +
'Host: api.github.com\r\n' +
'Connection: close\r\n' +
'\r\n',
_onPendingData: [Function: noopPendingOutput],
agent: [Agent],
socketPath: undefined,
method: 'GET',
maxHeaderSize: undefined,
path: '/repos/algorithm-visualizer/tracers.js/releases/latest?client_id=dummy&client_secret=dummy',
_ended: false,
res: null,
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
_redirectable: [Circular *1],
[Symbol(kCapture)]: false,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype]
},
_currentUrl: 'https://api.github.com/repos/algorithm-visualizer/tracers.js/releases/latest?client_id=dummy&client_secret=dummy',
[Symbol(kCapture)]: false
},
response: undefined,
isAxiosError: true,
toJSON: [Function (anonymous)]
}
fatal: unable to access 'https://github.com/algorithm-visualizer/algorithms.git/': Could not resolve host: github.com
Error: fatal: unable to access 'https://github.com/algorithm-visualizer/algorithms.git/': Could not resolve host: github.com

at /home/foobar/server/src/utils/misc.ts:57:45
at ChildProcess.exithandler (child_process.js:309:5)
at ChildProcess.emit (events.js:305:20)
at ChildProcess.EventEmitter.emit (domain.js:483:12)
at maybeClose (internal/child_process.js:1028:16)
at Socket.<anonymous> (internal/child_process.js:443:11)
at Socket.emit (events.js:305:20)
at Socket.EventEmitter.emit (domain.js:483:12)
at Pipe.<anonymous> (net.js:667:12)

`
Which occurs after starting the server

GET /api/algorithms 304 3.757 ms - - GET /api/algorithms/greedy/dijkstras-shortest-path 304 0.848 ms - - GET /api/tracers/js/worker 304 1.597 ms - - Error: JsTracer has not been built yet. at /home/foobar/server/src/tracers/js/JsTracer.ts:21:32 at Layer.handle [as handle_request] (/home/foobar/server/node_modules/express/lib/router/layer.js:95:5) at next (/home/foobar/server/node_modules/express/lib/router/route.js:137:13) at Route.dispatch (/home/foobar/server/node_modules/express/lib/router/route.js:112:3) at Layer.handle [as handle_request] (/home/foobar/server/node_modules/express/lib/router/layer.js:95:5) at /home/foobar/server/node_modules/express/lib/router/index.js:281:22 at Function.process_params (/home/foobar/server/node_modules/express/lib/router/index.js:335:12) at next (/home/foobar/server/node_modules/express/lib/router/index.js:275:10) at Function.handle (/home/foobar/server/node_modules/express/lib/router/index.js:174:3) at router (/home/foobar/server/node_modules/express/lib/router/index.js:47:12) GET /api/tracers/js 500 4.074 ms - 82

Which occurs after trying to run an algorithm.

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

1 participant