@karl-chan
dont know why but whenever i try to add torrent on the app hosted on heroku it crashes. o am able to authenticate with google and sign in but Don know why it crashes, i ahve provided a log from heroku and my app link if u want to test it ou ur self.
Link- https://tor2gd.herokuapp.com/
LOG
2020-02-11T18:50:58.063736+00:00 heroku[web.1]: State changed from crashed to starting2020-02-11T18:50:57.977093+00:00 heroku[web.1]: Process exited with status 12020-02-11T18:50:57.925715+00:00 app[web.1]: /app/server.js:2022020-02-11T18:50:57.925753+00:00 app[web.1]: console.log(Added torrent: ${util.inspect(torrent.files)}
);2020-02-11T18:50:57.925754+00:00 app[web.1]: ^2020-02-11T18:50:57.925755+00:00 app[web.1]: 2020-02-11T18:50:57.925755+00:00 app[web.1]: ReferenceError: util is not defined2020-02-11T18:50:57.925756+00:00 app[web.1]: at addTorrentForUser (/app/server.js:202:43)2020-02-11T18:50:57.925756+00:00 app[web.1]: at client.add (/app/server.js:396:13)2020-02-11T18:50:57.925756+00:00 app[web.1]: at Torrent.onReady (/app/node_modules/webtorrent/index.js:224:44)2020-02-11T18:50:57.925757+00:00 app[web.1]: at Object.onceWrapper (events.js:314:30)2020-02-11T18:50:57.925757+00:00 app[web.1]: at emitNone (events.js:110:20)2020-02-11T18:50:57.925758+00:00 app[web.1]: at Torrent.emit (events.js:207:7)2020-02-11T18:50:57.925758+00:00 app[web.1]: at Torrent._onStore (/app/node_modules/webtorrent/lib/torrent.js:627:10)2020-02-11T18:50:57.925759+00:00 app[web.1]: at onPiecesVerified (/app/node_modules/webtorrent/lib/torrent.js:522:14)2020-02-11T18:50:57.925759+00:00 app[web.1]: at end (/app/node_modules/run-parallel-limit/index.js:19:15)2020-02-11T18:50:57.925759+00:00 app[web.1]: at done (/app/node_modules/run-parallel-limit/index.js:23:10)2020-02-11T18:50:57.933718+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path="/add-torrent" host=tor2gd.herokuapp.com request_id=4d453c8e-ef8e-47f1-a840-82365947199e fwd="47.31.137.213" dyno=web.1 connect=1ms service=1758ms status=503 bytes=0 protocol=https2020-02-11T18:50:57.932505+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=websocket&sid=g4VCRoq-_Jojheq6AAAA" host=tor2gd.herokuapp.com request_id=2526e08d-1340-4bd7-82b0-bf4ba762ec83 fwd="47.31.137.213" dyno=web.1 connect=1ms service=8866ms status=101 bytes=175 protocol=https2020-02-11T18:51:03.153851+00:00 heroku[web.1]: Starting process with command node server.js
2020-02-11T18:51:08.457187+00:00 heroku[web.1]: State changed from starting to up2020-02-11T18:51:07.877618+00:00 app[web.1]: Warning: connect.session() MemoryStore is not2020-02-11T18:51:07.877682+00:00 app[web.1]: designed for a production environment, as it will leak2020-02-11T18:51:07.877683+00:00 app[web.1]: memory, and will not scale past a single process.2020-02-11T18:51:07.901911+00:00 app[web.1]: (node:4) Warning: N-API is an experimental feature and could change at any time.2020-02-11T18:51:07.904763+00:00 app[web.1]: Node app is running on port 459962020-02-11T18:51:09.435246+00:00 heroku[router]: at=info method=GET path="/dashboard" host=tor2gd.herokuapp.com request_id=894ec731-b43e-4aeb-ae2c-26d44f4caea6 fwd="47.31.137.213" dyno=web.1 connect=0ms service=132ms status=302 bytes=439 protocol=https2020-02-11T18:51:09.818813+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbnMp" host=tor2gd.herokuapp.com request_id=e2ae77ef-7cba-49e8-8c06-d3f50593c3d9 fwd="47.31.137.213" dyno=web.1 connect=0ms service=60ms status=200 bytes=322 protocol=https2020-02-11T18:51:11.807186+00:00 heroku[router]: at=info method=GET path="/home" host=tor2gd.herokuapp.com request_id=99036406-263b-407a-a122-ad83ad32e0e5 fwd="47.31.137.213" dyno=web.1 connect=1ms service=1777ms status=304 bytes=344 protocol=https2020-02-11T18:51:12.404570+00:00 heroku[router]: at=info method=GET path="/js/scripts.js" host=tor2gd.herokuapp.com request_id=5315ad8a-8630-4e3e-be8a-d85e60f817d5 fwd="47.31.137.213" dyno=web.1 connect=0ms service=17ms status=304 bytes=235 protocol=https2020-02-11T18:51:12.395755+00:00 heroku[router]: at=info method=GET path="/css/styles.css" host=tor2gd.herokuapp.com request_id=c2008f66-f5e0-4b33-a364-197b70893bc8 fwd="47.31.137.213" dyno=web.1 connect=0ms service=87ms status=304 bytes=344 protocol=https2020-02-11T18:51:12.807774+00:00 heroku[router]: at=info method=GET path="/img/galaxy.jpg" host=tor2gd.herokuapp.com request_id=9523b2af-35b8-457e-b2dd-312adf37422c fwd="47.31.137.213" dyno=web.1 connect=0ms service=12ms status=304 bytes=239 protocol=https2020-02-11T18:51:13.614973+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tor2gd.herokuapp.com request_id=e3362826-aa9f-498b-af6f-d3016d0722d4 fwd="47.31.137.213" dyno=web.1 connect=0ms service=10ms status=304 bytes=344 protocol=https2020-02-11T18:51:15.431350+00:00 heroku[router]: at=info method=GET path="/login" host=tor2gd.herokuapp.com request_id=9e122bd8-bd9e-4719-9a61-f398091e9e79 fwd="47.31.137.213" dyno=web.1 connect=4ms service=12ms status=302 bytes=1551 protocol=https2020-02-11T18:51:24.152335+00:00 app[web.1]: Obtained tokens: {"access_token":"ya29.a0Adw1xeV7OBSaJEPeeQJ03eRzd0xwdwG6Gu9wql8QQvoDfDwartSBYb2BS5TYUP_W4GybTbphiXsjpClX3A6sbsJ32PXG5KI_86XaMUUTzYVvcqAaOhhxCKOUu9HEgyHZJ_yUcseXJ_YyB9AoJLtp3Q07ORxq1VLclhk","refresh_token":"1//07lLqqO1YTYK-CgYIARAAGAcSNwF-L9IrenXbsPusfF-kWG3rbfDlVIP5W1SiZyjgm9JvlyhicYKQa1u_r7aBacr0uhfKwWgMTvM","scope":"openid https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/drive","token_type":"Bearer","id_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6ImQ4ZWZlYTFmNjZlODdiYjM2YzJlYTA5ZDgzNzMzOGJkZDgxMDM1M2IiLCJ0eXAiOiJK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"resourceName":"people/112024187282535489787","etag":"%EgYBAj0DNy4aBAECBQc=","metadata":{"sources":[{"type":"PROFILE","id":"112024187282535489787","etag":"#So2XaWDlBlE=","profileMetadata":{"objectType":"PERSON","userTypes":["GOOGLE_USER"]}}],"objectType":"PERSON"},"names":[{"metadata":{"primary":true,"source":{"type":"PROFILE","id":"112024187282535489787"}},"displayName":"Saul Goodmen","familyName":"Goodmen","givenName":"Saul","displayNameLastFirst":"Goodmen, Saul"}],"photos":[{"metadata":{"primary":true,"source":{"type":"PROFILE","id":"112024187282535489787"}},"url":"https://lh4.googleusercontent.com/-XeXsJl8Yrb8/AAAAAAAAAAI/AAAAAAAAAAA/ACHi3rfndLH3FynqXD-cUH91rpi_37gJlw/s100/photo.jpg","default":true}],"id":"112024187282535489787"}2020-02-11T18:51:24.737105+00:00 heroku[router]: at=info method=GET path="/login-callback?code=4%2FwQHpim-q5t0LDSCrOlBC-BqL28zVgJeaz1RR6fQo1Kdb2_GRMJ-DdOKW__Tzrn4PggaXgwdpZeBAvbJEWtQ4zyg&scope=profile+openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fdrive+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile" host=tor2gd.herokuapp.com request_id=a4178ea1-2c71-4039-9615-e268f4742464 fwd="47.31.137.213" dyno=web.1 connect=0ms service=1127ms status=302 bytes=617 protocol=https2020-02-11T18:51:26.045526+00:00 heroku[router]: at=info method=GET path="/dashboard" host=tor2gd.herokuapp.com request_id=5107f68e-b2cc-4d36-867b-47adf09d58a2 fwd="47.31.137.213" dyno=web.1 connect=1ms service=322ms status=200 bytes=22259 protocol=https2020-02-11T18:51:26.580291+00:00 heroku[router]: at=info method=GET path="/css/styles.css" host=tor2gd.herokuapp.com request_id=cb3e5ade-28e5-4ac8-a02d-c13ef231baa5 fwd="47.31.137.213" dyno=web.1 connect=2ms service=3ms status=304 bytes=507 protocol=https2020-02-11T18:51:26.821571+00:00 heroku[router]: at=info method=GET path="/img/trash.ico" host=tor2gd.herokuapp.com request_id=ac079384-f9a7-4207-b179-1e3d131a1410 fwd="47.31.137.213" dyno=web.1 connect=0ms service=8ms status=304 bytes=239 protocol=https2020-02-11T18:51:26.818833+00:00 heroku[router]: at=info method=GET path="/js/scripts.js" host=tor2gd.herokuapp.com request_id=4b02dcd9-5255-4d74-b5a5-7848dfa34ac4 fwd="47.31.137.213" dyno=web.1 connect=2ms service=2ms status=304 bytes=235 protocol=https2020-02-11T18:51:27.021209+00:00 heroku[router]: at=info method=GET path="/img/lego.svg" host=tor2gd.herokuapp.com request_id=be167012-38b9-46f2-88fc-6399101a85d8 fwd="47.31.137.213" dyno=web.1 connect=0ms service=4ms status=304 bytes=507 protocol=https2020-02-11T18:51:27.316266+00:00 heroku[router]: at=info method=GET path="/favicon.ico" host=tor2gd.herokuapp.com request_id=4ebff002-e05c-4fed-a1d9-3c645bc841ac fwd="47.31.137.213" dyno=web.1 connect=0ms service=11ms status=304 bytes=507 protocol=https2020-02-11T18:51:27.119436+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbu3E" host=tor2gd.herokuapp.com request_id=0771f4c9-b159-441a-bc42-3f695047a6f7 fwd="47.31.137.213" dyno=web.1 connect=2ms service=7ms status=200 bytes=322 protocol=https2020-02-11T18:51:27.347329+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbu6t&sid=8w2o2COk5VlBze9WAAAB" host=tor2gd.herokuapp.com request_id=d6598ed2-80be-4b74-94a9-623c8f52b15c fwd="47.31.137.213" dyno=web.1 connect=0ms service=9ms status=200 bytes=251 protocol=https2020-02-11T18:51:28.130497+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbuAm&sid=8w2o2COk5VlBze9WAAAB" host=tor2gd.herokuapp.com request_id=709a15e4-b29d-4144-80fe-6554f512531d fwd="47.31.137.213" dyno=web.1 connect=0ms service=542ms status=200 bytes=247 protocol=https2020-02-11T18:51:29.058211+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbuOD&sid=8w2o2COk5VlBze9WAAAB" host=tor2gd.herokuapp.com request_id=65a98334-2cc5-4080-9c8a-4bfbe6ee2d9d fwd="47.31.137.213" dyno=web.1 connect=0ms service=610ms status=200 bytes=225 protocol=https2020-02-11T18:51:41.470855+00:00 app[web.1]: Parsed infohash: eddbd1f8e921fc00f97bf3fc4eaea69693fbc1982020-02-11T18:51:41.483998+00:00 app[web.1]: Torrent on warning: Error: Invalid tracker URL: http://tracker.trackerfix.com:80/announce2020-02-11T18:51:41.484492+00:00 app[web.1]: Torrent on warning: Error: Invalid tracker URL: udp://9.rarbg.me:27102020-02-11T18:51:41.484706+00:00 app[web.1]: Torrent on warning: Error: Invalid tracker URL: udp://9.rarbg.to:27102020-02-11T18:51:41.484854+00:00 app[web.1]: Torrent on warning: Error: Invalid tracker URL: udp://open.demonii.com:1337/announce2020-02-11T18:51:43.368025+00:00 heroku[web.1]: State changed from up to crashed2020-02-11T18:51:43.349881+00:00 heroku[web.1]: Process exited with status 12020-02-11T18:51:43.237395+00:00 app[web.1]: /app/server.js:2022020-02-11T18:51:43.237413+00:00 app[web.1]: console.log(Added torrent: ${util.inspect(torrent.files)}
);2020-02-11T18:51:43.237414+00:00 app[web.1]: ^2020-02-11T18:51:43.237415+00:00 app[web.1]: 2020-02-11T18:51:43.237415+00:00 app[web.1]: ReferenceError: util is not defined2020-02-11T18:51:43.237416+00:00 app[web.1]: at addTorrentForUser (/app/server.js:202:43)2020-02-11T18:51:43.237416+00:00 app[web.1]: at client.add (/app/server.js:396:13)2020-02-11T18:51:43.237417+00:00 app[web.1]: at Torrent.onReady (/app/node_modules/webtorrent/index.js:224:44)2020-02-11T18:51:43.237417+00:00 app[web.1]: at Object.onceWrapper (events.js:314:30)2020-02-11T18:51:43.237417+00:00 app[web.1]: at emitNone (events.js:110:20)2020-02-11T18:51:43.237418+00:00 app[web.1]: at Torrent.emit (events.js:207:7)2020-02-11T18:51:43.237418+00:00 app[web.1]: at Torrent._onStore (/app/node_modules/webtorrent/lib/torrent.js:627:10)2020-02-11T18:51:43.237419+00:00 app[web.1]: at onPiecesVerified (/app/node_modules/webtorrent/lib/torrent.js:522:14)2020-02-11T18:51:43.237420+00:00 app[web.1]: at end (/app/node_modules/run-parallel-limit/index.js:19:15)2020-02-11T18:51:43.237420+00:00 app[web.1]: at done (/app/node_modules/run-parallel-limit/index.js:23:10)2020-02-11T18:51:43.256468+00:00 heroku[router]: at=error code=H13 desc="Connection closed without response" method=POST path="/add-torrent" host=tor2gd.herokuapp.com request_id=96266db0-79eb-4f2c-8626-649a3ee5ff67 fwd="47.31.137.213" dyno=web.1 connect=0ms service=1817ms status=503 bytes=0 protocol=https2020-02-11T18:51:43.262839+00:00 heroku[router]: at=info method=GET path="/socket.io/?EIO=3&transport=websocket&sid=8w2o2COk5VlBze9WAAAB" host=tor2gd.herokuapp.com request_id=8862b586-14cb-4da0-bdb2-96ab8e5bb0b5 fwd="47.31.137.213" dyno=web.1 connect=0ms service=14659ms status=101 bytes=175 protocol=https2020-02-11T18:51:45.143969+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbyRz" host=tor2gd.herokuapp.com request_id=1afa3dac-071f-46aa-b6f8-bb9ccb4bc61d fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:51:49.038244+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rbzHu" host=tor2gd.herokuapp.com request_id=277826e8-ddd8-4e30-b65b-be2c343ee455 fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:51:53.622144+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rb-Ld" host=tor2gd.herokuapp.com request_id=e88f8de4-9e26-4df7-a8de-f5f89c263de4 fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:52:01.192240+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rc036" host=tor2gd.herokuapp.com request_id=18e70935-42a7-4560-9422-2362e461c76e fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:52:09.294459+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rc2Fd" host=tor2gd.herokuapp.com request_id=d5855cb9-8011-4964-afb5-60d931631225 fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:52:16.111255+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/socket.io/?EIO=3&transport=polling&t=N0rc3jN" host=tor2gd.herokuapp.com request_id=812d3ee5-1578-4b81-b9e9-9d2117ffb281 fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:52:17.774418+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/dashboard" host=tor2gd.herokuapp.com request_id=96eee566-fc21-43cd-b4ee-663ba0c27290 fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https2020-02-11T18:52:18.776548+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=tor2gd.herokuapp.com request_id=f1d6db57-cd0d-4df3-997d-cda27597c8ae fwd="47.31.137.213" dyno= connect= service= status=503 bytes= protocol=https