Noxalus / Live-Stream-Chat-Retriever

Retrieve live streams chat messages from different sources (Twitch, YouTube Gaming, Dailymotion etc...) to print them into a single HTML page.
47 stars 15 forks source link

Live Stream Chat Retriever error #1

Closed beardedbob closed 8 years ago

beardedbob commented 8 years ago

Hi,

I've been looking for some scripts to run multiple chats and this looks great but i'm having the following error, can you help?

I run npm start in windows cmd with admin rights and it outputs this into the debug.log

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\node.exe',
1 verbose cli   'C:\\Users\\Rob\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'start' ]
2 info using npm@3.8.7
3 info using node@v5.11.0
4 verbose run-script [ 'prestart', 'start', 'poststart' ]
5 info lifecycle live-stream-chat-retriever@0.0.2~prestart: live-stream-chat-retriever@0.0.2
6 silly lifecycle live-stream-chat-retriever@0.0.2~prestart: no script for prestart, continuing
7 info lifecycle live-stream-chat-retriever@0.0.2~start: live-stream-chat-retriever@0.0.2
8 verbose lifecycle live-stream-chat-retriever@0.0.2~start: unsafe-perm in lifecycle true
9 verbose lifecycle live-stream-chat-retriever@0.0.2~start: PATH: C:\Users\Rob\AppData\Roaming\npm\node_modules\npm\bin\node-gyp-bin;C:\Program Files\nodejs\node_modules\.bin;C:\Program Files\nodejs;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\ProgramData\Oracle\Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Skype\Phone\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\TortoiseSVN\bin;C:\Program Files\nodejs\;C:\Users\Rob\AppData\Roaming\npm
10 verbose lifecycle live-stream-chat-retriever@0.0.2~start: CWD: C:\Program Files\nodejs
11 silly lifecycle live-stream-chat-retriever@0.0.2~start: Args: [ '/d /s /c', 'node server.js' ]
12 silly lifecycle live-stream-chat-retriever@0.0.2~start: Returned: code: 1  signal: null
13 info lifecycle live-stream-chat-retriever@0.0.2~start: Failed to exec start script
14 verbose stack Error: live-stream-chat-retriever@0.0.2 start: `node server.js`
14 verbose stack Exit status 1
14 verbose stack     at EventEmitter.<anonymous> (C:\Users\Rob\AppData\Roaming\npm\node_modules\npm\lib\utils\lifecycle.js:244:16)
14 verbose stack     at emitTwo (events.js:100:13)
14 verbose stack     at EventEmitter.emit (events.js:185:7)
14 verbose stack     at ChildProcess.<anonymous> (C:\Users\Rob\AppData\Roaming\npm\node_modules\npm\lib\utils\spawn.js:24:14)
14 verbose stack     at emitTwo (events.js:100:13)
14 verbose stack     at ChildProcess.emit (events.js:185:7)
14 verbose stack     at maybeClose (internal/child_process.js:850:16)
14 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:5)
15 verbose pkgid live-stream-chat-retriever@0.0.2
16 verbose cwd C:\Program Files\nodejs
17 error Windows_NT 10.0.10586
18 error argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Users\\Rob\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npm-cli.js" "start"
19 error node v5.11.0
20 error npm  v3.8.7
21 error code ELIFECYCLE
22 error live-stream-chat-retriever@0.0.2 start: `node server.js`
22 error Exit status 1
23 error Failed at the live-stream-chat-retriever@0.0.2 start script 'node server.js'.
23 error Make sure you have the latest version of node.js and npm installed.
23 error If you do, this is most likely a problem with the live-stream-chat-retriever package,
23 error not with npm itself.
23 error Tell the author that this fails on your system:
23 error     node server.js
23 error You can get information on how to open an issue for this project with:
23 error     npm bugs live-stream-chat-retriever
23 error Or if that isn't available, you can get their info via:
23 error     npm owner ls live-stream-chat-retriever
23 error There is likely additional logging output above.
24 verbose exit [ 1, true ]
Noxalus commented 8 years ago

Hi, and thank you for your interest in this project.

Just to be sure, did you successfully run npm install (or npm update)? Can you show me the content of the file located to logs/error.log (normally, there is no confidential information in there, but check that before to post it please).

Did you create/update the config.json file with your personal information?

beardedbob commented 8 years ago

Hi,

No problem, this is what I've done and the log (windows 10 64bit)

  1. run node-v5.11.0-x64.msi (default install into C:\Program Files\nodejs) (installs no issues)
  2. from dir C:\Program Files\nodejs\ I run node -v which return v5.11.0 via the cmd withy admin permissions
  3. run from C:\Program Files\nodejs\ via cmd npm -v returns 3.8.6
  4. run from C:\Program Files\nodejs\ npm start and it returns as the main error

ENOENT: no such file or directory, open 'C:\Program Files\nodejs\package.json'

  1. extra Live-Stream-Chat-Retriever-master.zip raw files into C:\Program Files\nodejs\
  2. run npm start from same dir and it returns the attached error log.

npm-debug.txt

beardedbob commented 8 years ago

p.s config.json all i had done was remove template from the name, though in the past I have tried to add in some twtich info

Noxalus commented 8 years ago

When you install Node, it should add the installation folder to your path, so you can launch npm command in any folder.

I recommand you to extract Live-Stream-Chat-Retriever-master.zip to a clean new folder and to launch npm install and npm start into this fresh new folder.

If you don't enter valide data for the other services in config.json, you need to disable them to avoid errors setting enabled field to false for unused services.

{
    "host": "http://localhost",
    "port": 4242,
    "whitelisted_ips": [
        "127.0.0.1",
        "::1"
    ],
    "live_data": {
        "youtube": {
            "enabled": false,
            "client_id": "MY_CLIENT_ID",
            "client_secret": "MY_CLIENT_SECRET",
            "redirect_uris": "/youtube/callback"
        },
        "twitch": {
            "enabled": true,
            "channel": "MY_CHANNEL"
        },
        "hitbox": {
            "enabled": false,
            "channel": "MY_CHANNEL"
        },
        "beam": {
            "enabled": false,
            "username": "MY_USERNAME",
            "password": "MY_PASSWORD"
        },
        "dailymotion": {
            "enabled": false,
            "room": "MY_ROOM",
            "grosminet_endpoint": "http://dmchat.dailymotion.com:80"
        }
    }
}
beardedbob commented 8 years ago

Hi

I've done that and and extracted the Live-Stream-Chat-Retriever-master.zip into C:\Program Files\nodejs\LiveChat. I've also only made true twitch and added my channel but i'm getting the following debug report, see attached.

thanks for your help so far.

cheers

Rob npm-debug.txt

Noxalus commented 8 years ago

I saw your npm-debug log, but it doesn't give me enough information to understand why you have an error.

Can you please provide the content of the file located to C:\Program Files\nodejs\LiveChat\logs\error.log (or info.log) instead ?

beardedbob commented 8 years ago

Hi, sure,

I've tried to create some later ones but they havne't changed in the timestamp, but here are the ones created.

error.txt info.txt

Noxalus commented 8 years ago

These logs have been produced with a config.json file that contains invalid information, and all services seem to be enabled.

Can you show me your current config.json file?

beardedbob commented 8 years ago

config.json.txt

Noxalus commented 8 years ago

It seems to be correct.

I have no time for now, but be sure that I will look at it today with a new fresh install.

I go back to you soon.

beardedbob commented 8 years ago

thanks for your help so far, will try and reinstall again, it could be permissions but not sure, will let you know if i manage to resolve it if not I look forward to hearing back from you.

Noxalus commented 8 years ago

Oops, I made a mistake indeed. In the config file, for the Youtube section, redirect_uris field has been renamed into redirect_url. The config file given in the wiki is up to date, but I forgot to update the config.template.json file too :'(

Moreover, this shouldn't crash especially when you disabled Youtube API.

Anyway, I will fix that right now, thank you very much for your report! :+1:

I will close this issue when it will work for you too :)

Noxalus commented 8 years ago

I've pushed the fix, let me know if it works like expected for you! ;)

beardedbob commented 8 years ago

Hi,

thanks that's working great for twtich, now i'm having an issue for YT, I've created a Auth 2 but what should the redirect url be? should it be http://localhost:4242/youtube/callback or is this an example for the config.json?

Noxalus commented 8 years ago

I lost a lot of time on the OAuth 2.0 authentification process used by Youtube Data API. If you use the script in your local machine, the redirect URL should be http://localhost:4242/youtube/callback when you create your Google application like that:

If you use the script on a server, just put the hostname instead of localhost for the redirect URL.

Please note that you don't need to change the redirect URL in the config file (/youtube/callback), because the complete redirect URL will be build using host and port fields.

If you need more information about Youtube section of the config file, you can read the wiki. ;)