micaww / rage-rpc

A universal, asynchronous RPC implementation for RAGE Multiplayer
33 stars 20 forks source link

Cannot read property 'noRet' of undefined. [0.3.1] #13

Closed ynhhoJ closed 4 years ago

ynhhoJ commented 4 years ago

Full error:

(node:15900) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'noRet' of undefined
    at Object.B [as callBrowsers] (D:\Games\RAGE MP\server-files\node_modules\rage-rpc\dist\rage-rpc.min.js:1:10085)
    at bcrypt.compare.then (D:\Games\RAGE MP\server-files\packages\corso\index.js:426:32)
(node:15900) 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(). (rejection id: 1)
(node:15900) [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.

Code:

// serverside
rpc.callBrowsers(player, 'path', '/').then(() => {
    console.log('test');
}).catch((err: any) => {
    console.log(err);
});

On version 0.3.0, everything work's okay..

micaww commented 4 years ago

Hey Guy, thanks for the report.

I have unpublished 0.3.1 due to this and will release a patch with more testing after work today.

micaww commented 4 years ago

Fixed with 0.3.2