Zamiell / isaac-racing-client

The client software for Racing+, a Binding of Isaac racing platform.
https://isaacracing.net/
GNU General Public License v3.0
27 stars 16 forks source link

Unauthorized for all tests #25

Closed z0rzi closed 5 years ago

z0rzi commented 5 years ago

All the tests buttons take me to an error - Unauthorized page, and the Steam button launches a never ending loading..

Running on Arch Linux.

The menu: image

The Steam loading: image

The tests button: image

Zamiell commented 5 years ago

Hello,

1) The test buttons are not supposed to work - they are restricted to only work with a whitelist of IP addresses (for authorized testers). This is to prevent anonymous abuse. 2) The Steam button should work, assuming that you have Steam already opened and logged in (and you have already purchased The Binding of Isaac: Rebirth legitimately).

Did you already try looking in the logs for helpful error messages?

z0rzi commented 5 years ago

Thanks for your fast reply!

I do have steam opened, I'm logged it, and I purchased the game!

I just looked at the log, nothing really interesting i think, but i just noticed this error popping on my console when i click on Steam:

Thu Feb 21 21:34:13 GMT+0100 <info> main.js:343 - Started the "/home/zorzi/tmp/isaac-racing-client/src/steam" child process:
/home/zorzi/tmp/isaac-racing-client/node_modules/electron-is-dev/index.js:4
const app = electron.app || electron.remote.app;
                                            ^

TypeError: Cannot read property 'app' of undefined
    at Object.<anonymous> (/home/zorzi/tmp/isaac-racing-client/node_modules/electron-is-dev/index.js:4:45)
    at Object.<anonymous> (/home/zorzi/tmp/isaac-racing-client/node_modules/electron-is-dev/index.js:11:3)
    at Module._compile (internal/modules/cjs/loader.js:711:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:722:10)
    at Module.load (internal/modules/cjs/loader.js:620:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:559:12)
    at Function.Module._load (internal/modules/cjs/loader.js:551:3)
    at Module.require (internal/modules/cjs/loader.js:658:17)
    at require (internal/modules/cjs/helpers.js:20:18)
    at Object.<anonymous> (/home/zorzi/tmp/isaac-racing-client/src/steam.js:7:15)
Thu Feb 21 21:34:19 GMT+0100 <info> main.js:522 - Main process recieved message: close
Thu Feb 21 21:34:19 GMT+0100 <info> main.js:498 - Wrote default values to "save1.dat".
Thu Feb 21 21:34:19 GMT+0100 <info> main.js:498 - Wrote default values to "save2.dat".
Thu Feb 21 21:34:19 GMT+0100 <info> main.js:498 - Wrote default values to "save3.dat".

This is probably the problem

Zamiell commented 5 years ago

um looks like something might be broken in the "electron-is-dev" dependency WRT linux?

have you tried running this on windows?

z0rzi commented 5 years ago

I haven't tried to run it on windows, and i can't really do it, I don't have any windows machines right now..

I had a problem concerning the greenworks module, so i replaced it with the latest version, could it be related?

( WRT? )

Zamiell commented 5 years ago

https://www.urbandictionary.com/define.php?term=wrt

it doesn't look related, the error is that it can't find electron. you can see the code here:

https://github.com/sindresorhus/electron-is-dev/blob/master/index.js#L4

is electron installed properly? i dunno

Zamiell commented 5 years ago

you can always try running windows inside virtualbox

z0rzi commented 5 years ago

Oh my bad

Ok so I solved the problem, I directly modified the incriminated file (/home/zorzi/tmp/isaac-racing-client/node_modules/electron-is-dev/index.js):

I replaced

const app = electron.app || electron.remote.app;

with

const app = electron.app;

and

module.exports = isEnvSet ? getFromEnv : !app.isPackaged;

with

module.exports = true;

That's a dirty fix but it works!

Zamiell commented 5 years ago

interesting, i wonder why the exports was failing

basically, the "steam.js" is a child process of the main isaac-racing-client. it forks it off in order to check for steam related stuff, which seemed like it would be best done in a child process. the child process is supposed to inherit electron and all of the other stuff. but it looks like it isn't.

z0rzi commented 5 years ago

Hum.. That's surprising indeed..


From: James notifications@github.com Sent: Friday, February 22, 2019 12:22:58 AM To: Zamiell/isaac-racing-client Cc: z0rzi; Author Subject: Re: [Zamiell/isaac-racing-client] Unauthorized for all tests (#25)

interesting, i wonder why the exports was failing

basically, the "steam.js" is a child process of the main isaac-racing-client. it forks it off in order to check for steam related stuff, which seemed like it would be best done in a child process. the child process is supposed to inherit electron and all of the other stuff. but it looks like it isn't.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/Zamiell/isaac-racing-client/issues/25#issuecomment-466209962, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AVhW6SQimRWvaIgTebM68uaupU0F-wHNks5vPypSgaJpZM4bIOWX.

Zamiell commented 5 years ago

I reformatted my computer today and started with a fresh Windows 10 and the newest NodeJS. I ended up getting the same error, so it looks like it is a bug with the newest version of node + the electron-is-dev module. In the latest patch, I rewrote all the instances of electron-is-dev to use something else. Give the latest version a try and reopen if you see any other errors.