malte88 / rsg-socialclub-api

API for RockstarGames Socialclub

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Couldn't establish a connection "ws://ip:3000/ws/4D196AF40E36C8ECC980221E60AB291F". Is your browser running?

KONEV5 opened this issue · comments

commented

when i open http://ip:3000/?targetId=4D196AF40E36C8ECC980221E60AB291F,My Page is :Couldn't establish a connection "ws://ip:3000/ws/4D196AF40E36C8ECC980221E60AB291F". Is your browser running?。 How should I deal with it

commented

do you have a log

commented

looks like puppeteer had an update and it doesnt work with the new one. Try now with new package.json and make sure to reinstall modules before

commented

[8:07:58 AM] [INFO] => Starting...
[8:07:58 AM] [INFO] => Alive on Port: 4000`
Warning: Failure writing file /scapi/browser/data/Default/Preferences {
target: 'Profile',
file: 'Preferences',
contents: '{\n "intl": {\n "accept_languages": "en-US,en"\n }\n}'
} [Error: EACCES: permission denied, open '/scapi/browser/data/Default/Preferences'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/scapi/browser/data/Default/Preferences'
}
[8:07:59 AM] [DEBUG] => Navigating to https://socialclub.rockstargames.com/
[8:08:09 AM] [DEBUG] => Loaded Page
[8:08:09 AM] [ERROR] => Error getting bearer, starting login.
TypeError: Cannot read properties of undefined (reading 'value')
[8:08:09 AM] [DEBUG] => Started login process...
[8:08:09 AM] [DEBUG] => Trying to start browser...
Warning: Failure writing file /scapi/browser_data/Default/Preferences {
target: 'Profile',
file: 'Preferences',
contents: '{\n "intl": {\n "accept_languages": "en-US,en"\n }\n}'
} [Error: EACCES: permission denied, open '/scapi/browser_data/Default/Preferences'] {
errno: -13,
code: 'EACCES',
syscall: 'open',
path: '/scapi/browser_data/Default/Preferences'
}
[8:08:10 AM] [DEBUG] => Started browser...
[8:08:10 AM] [DEBUG] => Started new tab...
[8:08:10 AM] [DEBUG] => Navigating to https://signin.rockstargames.com/signin/user-form?cid=socialclub
[8:08:19 AM] [DEBUG] => Loaded Page
[8:08:19 AM] [INFO] => Started portal on: http://127.0.0.1:3000/?targetId=1EDBCCACD55A13BEF09CF29010643353
[8:08:19 AM] [INFO] => Login with your socialclub credentials and dont forget to tick remember me box
[8:08:19 AM] [INFO] => Restart the app when you're done.

I don't think there's a problem with your code, it should be a problem with the server

commented

it looks like the app dont has permission to save browser data. You can change the path to where to save data in line 47 and 82.
the path is so weird because i used it with docker before

commented

info: [12:41:38 PM] [INFO] => Starting...
info: [12:41:38 PM] [INFO] => Alive on Port: 4000
info: [12:41:39 PM] [DEBUG] => Navigating to https://socialclub.rockstargames.com/
info: [12:41:49 PM] [DEBUG] => Loaded Page
error: [12:41:49 PM] [ERROR] => Error getting bearer, starting login.
TypeError: Cannot read properties of undefined (reading 'value')
error: [12:41:49 PM] [ERROR] => Error getting bearer, starting login.
TypeError: Cannot read properties of undefined (reading 'value')
info: [12:41:49 PM] [DEBUG] => Started login process...
info: [12:41:49 PM] [DEBUG] => Trying to start browser...
info: [12:41:50 PM] [DEBUG] => Started browser...
info: [12:41:50 PM] [DEBUG] => Started new tab...
info: [12:41:50 PM] [DEBUG] => Navigating to https://signin.rockstargames.com/signin/user-form?cid=socialclub
info: [12:41:58 PM] [DEBUG] => Loaded Page
info: [12:41:58 PM] [INFO] => Started portal on: http://127.0.0.1:3000/?targetId=F04C24297BCF256F87C634FA2AD459B1
info: [12:41:58 PM] [INFO] => Login with your socialclub credentials and dont forget to tick remember me box
info: [12:41:58 PM] [INFO] => Restart the app when you're done.

Sorry, the page still won't open

commented

completely wont open or like before the error

commented

har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

I deleted package-lock.json, npm install