PoE-TradeMacro / POE-TradeMacro

Price checking script for Path of Exile.
https://poe-trademacro.github.io/
GNU General Public License v3.0
935 stars 189 forks source link

Always Error Cookie Data #167

Closed ZeusTTV closed 7 years ago

ZeusTTV commented 7 years ago

Cant run this Version , pls fix it. Always Reset Data and same Error...

Eruyome commented 7 years ago

Not sure that I actually can fix it. Also you have to provide way more than just "can't run this version". I'm a bit tired of repeating myself. What error message did you get if any, what steps exactly did you take to resolve this issue, what windows version are you on, what IE version, are you using any proxy? Anything else network realted that's a bit unusual (like proxies)? What macro version did you try, does any of them work for you?

ZeusTTV commented 7 years ago

1.4.0-beta-2 was fine , the new Version cant run . After Starting it , bypass window pops up and i cant change the data or run it with that new autofill script maybe im to sutpid but yesterday was everything fine.

Eruyome commented 7 years ago

Are you sure you can't get it working by rebooting/deleting cookies etc? The new release is the same as 1.4.0-beta-2 except better error handling/feedback and a totally unrelated fix for some divination cards. You're not the only one where it suddenly didn't work anymore but could get it fixed https://github.com/PoE-TradeMacro/POE-TradeMacro/issues/165.

ZeusTTV commented 7 years ago

im done , i wait till next release.... thx for help

Eruyome commented 7 years ago

Not sure a next release will change anything though. The current master code has optimized error handling: http://imgur.com/YK2NVDg, In fact your lacking report (of information) made me rewrite this :p Maybe this can tell me something. I'm not very confident though. It's hard to find any patterns why this doesn't work for some people.

sicero316 commented 7 years ago

It seems to every time i run Run_Only_This it is getting wrong cookie, need manual set up option for: This what i get in cookie file /temp

useragent=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
cfduid=ded9af585595c7a20d1b2e4257b8578d51482776955
cf_clearance=f44ddef909aabe446f7131b41e6b14b05dce19b4-1482777004-604800

This i get from .ahk:

HttpObj.SetRequestHeader("Cookie","__cfduid=d7f43d2c175558f90722db927fc02b2861482304811; cf_clearance=831c768983c53fdd7eb0e06414f3fd6391bfb7a7-1482420070-604800")

I went to browser to see(ctr shift i):

d9230ad28270ceffee1291756ca4ac0391482779308
d82bc2ba54ea1caa2d4465d6a3c2bcae89503ee2-1482779312-604800

When i fix value in cookie file it changing it back on wrong numbers.... Sooo idk. Looks like getCookieData getting absolutely wrong numbers.

Also agent is wrong, this i made by following guide:

HttpObj.SetRequestHeader("User-Agent", "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0")

And this one macro gives me automaticly if it make any sense:

useragent=Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.2; Win64; x64; Trident/7.0; .NET4.0E; .NET4.0C; .NET CLR 3.5.30729; .NET CLR 2.0.50727; .NET CLR 3.0.30729)
sicero316 commented 7 years ago

In 1.3 version all was fine until i update to 1.4.1

Eruyome commented 7 years ago

I don't really get what you're trying to say.

First of, are you trying to compare your Chrome/Firefox user agent and cookies with the Internet Explorer cookies (from the script)? Of course this will fail and will be different.

Secondly, those cookies aren't generated by some algorithm, they are directly taken from Internet Explorer, they are correct.

This i get from .ahk:

What are you trying to say here? Are you still editing the script files (which you shouldn't do)? If you want to manually test cookies, use version 1.3.0 and tell me if you have any success. If you do try your Chrome/Firefox cookies first, then the ones from Internet Explorer.

Eruyome commented 7 years ago

@ZeusTTV @sicero316 Please test the latest release and close this issue if your problems are resolved.

loadingx86 commented 7 years ago

Eruyome commented 7 years ago

@loadingx86 you know, there is advice on how to solve this, there's a link to the FAQ for a reason (more advice), I can't help much if you don't tell me what you did to resolve this. For all I know you started the .ahk file once and gave up because it said it failed.

Servion033 commented 7 years ago

@Eruyome I (and a few of my friends) have exactly the same issue as @loadingx86

After using the "Delete cookies" button in the bottom about 10 times and it still failing, I tried to executed the PoE-TradeMacro_(Fallback).exe, but got an error, that getCookieData.exe is not working properly and therefore was ended by Windows.

Then I used the manual steps to enter my cookie data in the settings and now everything is working fine. However, as this data is changing somewhat often, it would be great if you can look into this issue.

Eruyome commented 7 years ago

@Servion033 Did 1.4.1 work for you? Just had someone in discord, we tried everything we could to no avail, he knew 1.4.1 worked for him, so he started it (worked), then started 1.5.0 again and now it works, too...

What was the exact error message you get when using the .exe? And running getCookieData.exe only fails when using the .exe, not when using .ahk? Does it work when you execute it manually?

Servion033 commented 7 years ago

@Eruyome The getCookieData.exe error was caused by me not starting the program with administrative permissions, so you can ignore that. Sorry!

In 1.4.0 it worked fine by copying the cookie data from Chrome to the config file (which is working for 1.5 also). In 1.4.1 nothing worked.

When executing the .exe I now get the same message as when using the .ahk file: "Bypassing poe.trades CloudFlare protection failed!" and the following information:

Eruyome commented 7 years ago

Maybe I can find a solution to read Firefox/Chrome cookies, but I need help for this, not enough knowledge (c# for example). https://github.com/PoE-TradeMacro/POE-TradeMacro/issues/173

sicero316 commented 7 years ago

Sry about that, i'm bad at explaining things. First: I was editing TradeMacro.ahk by myself, injecting values from poe.trade cookie, those 3 values you can see in browser like in that guide(after ddos happen and cf implements their protection). 1.1: After update happen with macro, i remove old cookie and get new one, thing i was trying to say this automatic cookie parsing should be optional, coz it can ruin config in some way. I was trying to set macro like in guide, but numbers i was getting in that text file was incorrect. Second: I don't know how it can be correct if i have totally cut-out (os component) IE for security reason. I use Firefox. After some manipulations with TradeMacro.ahk it start working again. Changes default values of agent and other two.

Eruyome commented 7 years ago

Are you telling me that you have completely uninstalled/removed Internet Explorer from your system? I'm not sure that's even possible (complete removal of all components) since there should be some software that uses IE engine. Simply uninstalling should be possible. What you use doesn't matter. As long as the c# script can open a browser window (hidden, using IE engine) and open poe.trade to generate cookies and read them + useragent it doesn't matter if you haven't opened IE in the last 20 years.

Making the automatic retrieval optional makes no sense, since it simply works for the majority of people. It doesn't ruin any config, also. Use automatic cookies and do nothing else or use manual cookies and completely ignore the cookie_data.txt. If you don't want to (or can't) use automatic cookies you have to do extra work anyway (get cookies/useragent and paste them to settings), so opening the settings and checking overwrite automatic cookies isn't asking too much. Why should this method be the default?

Eruyome commented 7 years ago

I'm closing this issue since nobody seems to follow it anymore. If anyone still has problems and can give me more feedback just reopen it.

Servion033 commented 7 years ago

I am still following this. No one I know has a working macro right now. The only solution is to start it up, go to the options, change the cf_clearance (daily) and then restart the tool (is there a way to not have to restart after changing the settings?).

If you need any further information I'm glad to test stuff and provide more feedback.

e: not allowed to reopen this, hope you read it

Eruyome commented 7 years ago

Could you test the newest code on the master banch (automatic cookies)? Well, I probably could write something to trigger reading the cookies (manual ones) without restart. That's something I can do when I have the time.

EDIT: I simply see no reason why the automatic cookies aren't working. Have you tried those cookies as manual ones?

EDIT 2: Always check the FAQ again, I'm constantly working on it (although it might not have anything new regarding your problem).

Servion033 commented 7 years ago

Downloaded the Macro again and now it's working! Did you change anything?

Eruyome commented 7 years ago

I think I only changed how the cookies are deleted, it wasn't reliable at all, depending on some IE settings.