hqcheat icon indicating copy to clipboard operation
hqcheat copied to clipboard

UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined

Open asolimine opened this issue 7 years ago • 8 comments

Hey, I've been having some trouble getting the script to work. I have downloaded all the requirements but every time I take a screen shot of the question I get this error and I'm not sure what it means.

Processing... Got question: Got options:

(node:520) UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'name' of undefined at Promise.all.then (/Users/antoniosolimine/Desktop/hqcheat-master/index.js:84:81) at at process._tickCallback (internal/process/next_tick.js:160:7) (node:520) 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:520) [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.

asolimine avatar Jan 03 '18 23:01 asolimine

I am having the same problem. I think it is because the person who made it has a iphone x so the way the photo is cropped is going to be different for every different version phone. I just dont know how to change the way the picture is cropped.

apates5 avatar Jan 04 '18 04:01 apates5

At first I thought that was the problem too, but I have an iphone X too and im still getting that error

asolimine avatar Jan 04 '18 05:01 asolimine

Are you using a picture of a hq question or a prerecorded video of hq to test it?

apates5 avatar Jan 04 '18 05:01 apates5

Im using a prerecorded video

asolimine avatar Jan 04 '18 05:01 asolimine

Oh then I don’t know. I’m not sure but it might be because the quality on the video is low so it might not be clear. Or it might be that if the video has comments on it it might be interfering with it. Just some guesses I’m not sure.

apates5 avatar Jan 04 '18 05:01 apates5

Were you guys able to find a fix?

kaikuale avatar Jan 15 '18 15:01 kaikuale

Nothing yet. Sorry

asolimine avatar Jan 17 '18 14:01 asolimine

Ok for me I had to edit the code that crops the image. For me personally, I just used a bit of trial and error. The numbers I manipulated will be shown below and bolded. The ones in italics should be slightly larger than your phones screen resolution.

const processImage = path => { const top = 400; const bottom = 900; const left = 150; var config1 = { width: 1174 - left - left, height: 2278 - top - bottom, top, left };

kaikuale avatar Jan 17 '18 22:01 kaikuale