rconroy293 / mtga-log-client

GNU General Public License v3.0
61 stars 26 forks source link

Logging not working "400 Bad request" (Mac) #90

Closed stu-blair closed 3 years ago

stu-blair commented 3 years ago

Hi, I just installed for the first time, and when I start it up (tried both via brew and running the script directly with python), it outputs a lot like this:

20210417 153921,INFO,Saving logs to /Users/sblair/.seventeenlands/seventeenlands.log
20210417 153921,INFO,Got minimum client version response: {"min_version": "0.1.19"}
20210417 153921,INFO,Minimum supported version: [0, 1, 19]; this version: [0, 1, 23]
20210417 153921,INFO,Using token 0ce2...3fac
20210417 153921,INFO,Parsing the previous log /Users/sblair/Library/Logs/Wizards Of The Coast/MTGA/Player-prev.log once
20210417 153927,INFO,User logged out from MTGA
20210417 153927,INFO,User logged out from MTGA
20210417 153927,INFO,Reconnected - restoring prior user info
20210417 153927,INFO,User logged out from MTGA
20210417 153927,INFO,User logged out from MTGA
20210417 153927,INFO,User logged out from MTGA
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,Reconnected - restoring prior user info
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,Reconnected - restoring prior user info
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,User logged out from MTGA
20210417 153932,INFO,Human draft pack: {'player_id': None, 'time': '2021-04-16T16:33:53', 'draft_id': '5c93fead-4a40-4171-91cf-ba7336953d4f', 'event_name': None, 'pack_number': 1, 'pick_number': 2, 'card_ids': [76416, 76647, 76538, 76470, 76448, 76415, 76612, 76649, 76593, 76400, 76419, 76434, 76458, 77526]}
20210417 153932,INFO,400 Response: {
  "detail": "None is not of type 'string' - 'player_id'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}

20210417 153932,INFO,Human draft pack: {'player_id': None, 'time': '2021-04-16T16:33:53', 'draft_id': '5c93fead-4a40-4171-91cf-ba7336953d4f', 'event_name': None, 'pack_number': 1, 'pick_number': 3, 'card_ids': [76647, 76641, 76614, 76593, 76453, 76514, 76483, 76509, 76393, 76594, 76608, 76424, 76420]}
20210417 153933,INFO,400 Response: {
  "detail": "None is not of type 'string' - 'player_id'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}

20210417 153933,INFO,Human draft pack: {'player_id': None, 'time': '2021-04-16T16:33:53', 'draft_id': '5c93fead-4a40-4171-91cf-ba7336953d4f', 'event_name': None, 'pack_number': 1, 'pick_number': 4, 'card_ids': [76676, 76427, 76472, 76662, 76486, 76404, 76538, 76591, 76418, 76630, 76650, 77482]}
20210417 153933,INFO,400 Response: {
  "detail": "None is not of type 'string' - 'player_id'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}

And a lot more of those "None is not of type 'string'" errors. Nothing logs in 17lands.com .

It did ask me for my token, and I can see in the output it is using the correct token.

On MacOS 10.15.5

Thank you!

rfein-hearst commented 3 years ago

also getting this on Big Sur 11.2.3 (M1 macbook)

rconroy293 commented 3 years ago

This should be resolved in version 0.1.24 (https://github.com/rconroy293/mtga-log-client/pull/89/files) - if you continue to see it after updating, please reopen this!

stu-blair commented 3 years ago

I am still observing the same errors on v0.1.24 --


20210502 103957,INFO,Saving logs to /Users/sblair/.seventeenlands/seventeenlands.log
20210502 103957,INFO,Got minimum client version response: {"min_version": "0.1.19"}
20210502 103957,INFO,Minimum supported version: [0, 1, 19]; this version: [0, 1, 24]
20210502 103957,INFO,Using token 0ce2...3fac
20210502 103957,INFO,Parsing the previous log /Users/sblair/Library/Logs/Wizards Of The Coast/MTGA/Player-prev.log once
20210502 103957,INFO,Human draft pack: {'player_id': None, 'time': '2021-04-30T18:35:58', 'draft_id': '6f8af52d-7b43-4d2c-ad85-bbbcb12c80d5', 'event_name': None, 'pack_number': 1, 'pick_number': 2, 'card_ids': [76423, 76643, 76515, 76602, 76647, 76454, 76535, 76442, 76614, 76644, 76606, 76620, 76465, 77530]}
20210502 103957,INFO,400 Response: {
  "detail": "None is not of type 'string' - 'player_id'",
  "status": 400,
  "title": "Bad Request",
  "type": "about:blank"
}
rconroy293 commented 3 years ago

Oh interesting. Could you email your /Users/sblair/Library/Logs/Wizards Of The Coast/MTGA/Player-prev.log file to seventeenlands@gmail.com?

stu-blair commented 3 years ago

I noticed the log file is very large, ~40 MB, with this error repeated ~120,000 times

Please note that using Camera viewport may result in visual artefacts or some things not working.
UnityEngine.Rendering.PostProcessing.PostProcessLayer:OnPreCull()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

I'll cut that part out and email you the rest

rconroy293 commented 3 years ago

Thanks for your patience on this - it's been a busy month! Finally had a chance to look at your log file. It turns out you have detailed logs disabled, which are needed for the tracker to work. Emphasizes the importance of https://github.com/rconroy293/mtga-log-client/issues/87

stu-blair commented 3 years ago

Oh wow, I totally missed that in the instructions. Thanks @rconroy293 !