qqvm / Facebook-Events-iOS

This app allows you to discover events from Facebook platform.
GNU General Public License v3.0
4 stars 1 forks source link

Login error 405 #4

Open Kevinn5 opened 3 years ago

Kevinn5 commented 3 years ago

Each time i'm trying to login with my Facebook credentials I get error 405: User must verify their account on www.facebook.com Account Temporarily Unavailable

Do you know why? Thanks

qqvm commented 3 years ago

I did not have this error before. Seems like a problem with your account. Can you log in to the Facebook directly using the official Facebook mobile app?

Kevinn5 commented 3 years ago

I’ve tried it with two different accounts and got the same error. Only when I tried it with two factor authentication it worked. I can login to the account from a web browser.

qqvm commented 3 years ago

Hmm... Interesting. Because I don't have this error with account without second factor. Did you compile source code by yourself?

Kevinn5 commented 3 years ago

Yes, just built it in Xcode without changing the code.

qqvm commented 3 years ago

Okay, then you can modify loginFirstFactor function to call the postURL with logging and caching enabled

appState.networkManager?.postURL(urlComponents: components, withToken: false, logNetworkActivity: true)

Login request and response will be logged to console and Application log. That might help to investigate the issue. Please note that your login and password will appear in cleartext in logs.

Kevinn5 commented 3 years ago

Thanks. I’ll check it and update.

Kevinn5 commented 3 years ago

Thank you for your help. Console logs below:

default 11:54:39.661673+0300 FBEvents https://b-api.facebook.com/method/auth.login?adid=4F53A8A4-E234-4F37-8F63-9B5E2BF84CF6&format=json&device_id=5BAE6847-D3F5-4906-8D3F-5D0533292D7A&email=XXX@gmail.com&password=XXX&generate_analytics_claim=1&community_id=&cpl=true&try_num=1&family_device_id=5BAE6847-D3F5-4906-8D3F-5D0533292D7A&credentials_type=password&generate_session_cookies=1&error_detail_type=button_with_disabled&source=login&generate_machine_id=1&meta_inf_fbmeta=&advertiser_id=4F53A8A4-E234-4F37-8F63-9B5E2BF84CF6&encrypted_msisdn=&currently_logged_in_userid=0&locale=en-IL&client_country_code=en-IL&method=auth.login&fb_api_req_friendly_name=authenticate&fb_api_caller_class=com.facebook.account.login.protocol.Fb4aAuthHandler&api_key=882a8490361da98702bf97a021ddc14d&access_token=350685531728%7C62f8ce9f74b12f84c123cc23437a4a32 default 11:54:39.768347+0300 FBEvents Task

.<1> resuming, timeouts(60.0, 604800.0) QOS(0x21) Voucher (null) default 11:54:39.769265+0300 FBEvents [Telemetry]: Activity on Task .<1> was not selected for reporting default 11:54:39.770052+0300 FBEvents -[SOConfigurationClient init] on default 11:54:39.770695+0300 FBEvents : new XPC connection default 11:54:39.774981+0300 FBEvents Faulting in NSHTTPCookieStorage singleton default 11:54:39.775160+0300 FBEvents Faulting in CFHTTPCookieStorage singleton default 11:54:39.775284+0300 FBEvents Creating default cookie storage with default identifier default 11:54:39.776333+0300 FBEvents Task .<1> {strength 1, tls 8, ct 0, sub 0, sig 0, ciphers 1, bundle 0, builtin 0} default 11:54:39.877449+0300 FBEvents Connection 1: enabling TLS default 11:54:39.877557+0300 FBEvents Connection 1: starting, TC(0x0) default 11:54:39.877650+0300 FBEvents [C1 097141C5-7DB5-4E69-B554-CB16EDF1C167 b-api.facebook.com:443 tcp, url hash: a47ebb28, tls, context: com.apple.CFNetwork.NSURLSession.{4C0A4911-B6C9-4F60-ADFD-EA8FE6D79174}{(null)}{Y}{2}, proc: 7AEB0196-D8A1-3B28-AD8A-AED971A67B88] start default 11:54:39.877847+0300 FBEvents [C1 b-api.facebook.com:443 initial path ((null))] event: path:start @0.000s default 11:54:39.878269+0300 FBEvents [C1 b-api.facebook.com:443 waiting path (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: path:satisfied @0.000s, uuid: 4ADE82FF-2EF5-4CCD-BB04-5585446527E3 default 11:54:39.878635+0300 FBEvents [C1 b-api.facebook.com:443 in_progress resolver (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: resolver:start_dns @0.001s default 11:54:39.878762+0300 FBEvents nw_connection_report_state_with_handler_on_nw_queue [C1] reporting state preparing default 11:54:39.879199+0300 FBEvents Task .<1> setting up Connection 1 default 11:54:39.879425+0300 FBEvents Not observing PTDefaults on customer install. default 11:54:39.879726+0300 mDNSResponder [R607721] getaddrinfo start -- flags: 0xC000D000, ifindex: 0, protocols: 0, hostname: , options: {}, client pid: 66499 (FBEvents) default 11:54:40.027132+0300 FBEvents [C1 b-api.facebook.com:443 in_progress resolver (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: resolver:receive_dns @0.149s default 11:54:40.027621+0300 mDNSResponder [R607721] getaddrinfo stop -- hostname: , client pid: 66499 (FBEvents) default 11:54:40.027918+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 initial path ((null))] event: path:start @0.150s default 11:54:40.028712+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 waiting path (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: path:satisfied @0.151s, uuid: 28FFB08E-2999-431C-AC8E-8795B062A5F9 default 11:54:40.029262+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 in_progress channel-flow (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:start_nexus @0.151s default 11:54:40.030715+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:receive_nexus @0.153s default 11:54:40.121913+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:start_connect @0.244s default 11:54:40.122524+0300 FBEvents tcp_output [C1.1:3] flags=[S] seq=2613818867, ack=0, win=65535 state=SYN_SENT rcv_nxt=0, snd_una=2613818867 default 11:54:40.123542+0300 FBEvents [C1 b-api.facebook.com:443 in_progress resolver (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: resolver:receive_dns @0.245s default 11:54:40.240283+0300 FBEvents tcp_input [C1.1:3] flags=[S.] seq=1864802590, ack=2613818868, win=65535 state=SYN_SENT rcv_nxt=0, snd_una=2613818867 default 11:54:40.240504+0300 FBEvents nw_flow_connected [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] Transport protocol connected default 11:54:40.240709+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:finish_transport @0.363s default 11:54:40.240899+0300 FBEvents [C1 b-api.facebook.com:443 in_progress resolver (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:finish_transport @0.363s default 11:54:40.241678+0300 FBEvents boringssl_session_apply_protocol_options_for_transport_block_invoke(1685) [C1.1:2][0x105208500] TLS configured [min_version(0x0303) max_version(0x0304) name(b-api.facebook.com) tickets(false) false_start(false) enforce_ev(false) enforce_ats(false)] default 11:54:40.241975+0300 FBEvents boringssl_context_info_handler(1858) [C1.1:2][0x105208500] Client handshake started default 11:54:40.242243+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS client enter_early_data default 11:54:40.242681+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS client read_server_hello default 11:54:40.365600+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_hello_retry_request default 11:54:40.365818+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_server_hello default 11:54:40.366133+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_encrypted_extensions default 11:54:40.367058+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_certificate_request default 11:54:40.368141+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_server_certificate default 11:54:40.368257+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_server_certificate_verify default 11:54:40.369937+0300 FBEvents boringssl_context_evaluate_trust_async(1547) [C1.1:2][0x105208500] Performing external trust evaluation default 11:54:40.370095+0300 FBEvents boringssl_context_evaluate_trust_async_external(1532) [C1.1:2][0x105208500] Asyncing for external verify block default 11:54:40.370518+0300 FBEvents Connection 1: asked to evaluate TLS Trust default 11:54:40.372504+0300 FBEvents Task .<1> auth completion disp=1 cred=0x0 default 11:54:40.381947+0300 FBEvents System Trust Evaluation yielded status(0) default 11:54:40.389530+0300 FBEvents Connection 1: TLS Trust result 0 default 11:54:40.389652+0300 FBEvents boringssl_context_evaluate_trust_async_external_block_invoke_3(1488) [C1.1:2][0x105208500] Returning from external verify block with result: true default 11:54:40.389868+0300 FBEvents boringssl_context_certificate_verify_callback(1646) [C1.1:2][0x105208500] Certificate verification result: OK default 11:54:40.390376+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client read_server_finished default 11:54:40.390552+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client send_end_of_early_data default 11:54:40.390656+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client send_client_encrypted_extensions default 11:54:40.390789+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client send_client_certificate default 11:54:40.390894+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client complete_second_flight default 11:54:40.391078+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS 1.3 client done default 11:54:40.391374+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS client finish_client_handshake default 11:54:40.391464+0300 FBEvents boringssl_context_info_handler(1873) [C1.1:2][0x105208500] Client handshake state: TLS client done default 11:54:40.391566+0300 FBEvents boringssl_context_info_handler(1863) [C1.1:2][0x105208500] Client handshake done default 11:54:40.392437+0300 FBEvents nw_protocol_boringssl_signal_connected(734) [C1.1:2][0x105208500] TLS connected [version(0x0304) ciphersuite(TLS_AES_128_GCM_SHA256) group(0x001d) signature_alg(0x0403) alpn(h2) resumed(0) offered_ticket(0) false_started(0) ocsp_received(0) sct_received(0) connect_time(150ms) flight_time(124ms) rtt(62ms) write_stalls(0) read_stalls(6)] default 11:54:40.392699+0300 FBEvents nw_flow_connected [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 in_progress channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] Output protocol connected default 11:54:40.392995+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 ready channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:finish_connect @0.515s error 11:54:40.393966+0300 FBEvents nw_endpoint_handler_set_adaptive_read_handler [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 ready channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] unregister notification for read_timeout failed error 11:54:40.394139+0300 FBEvents nw_endpoint_handler_set_adaptive_write_handler [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 ready channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] unregister notification for write_timeout failed default 11:54:40.394427+0300 FBEvents nw_connection_report_state_with_handler_on_nw_queue [C1] reporting state ready default 11:54:40.394515+0300 FBEvents [C1 b-api.facebook.com:443 ready resolver (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:finish_connect @0.515s default 11:54:40.394704+0300 FBEvents [C1.1 2a03:2880:f11c:8183:face:b00c:0:25de.443 ready channel-flow (satisfied (Path is satisfied), viable, interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:changed_viability @0.516s default 11:54:40.394793+0300 FBEvents [C1 b-api.facebook.com:443 ready resolver (satisfied (Path is satisfied), interface: pdp_ip0, ipv4, ipv6, dns, expensive)] event: flow:changed_viability @0.516s default 11:54:40.394891+0300 FBEvents Connection 1: connected successfully default 11:54:40.394970+0300 FBEvents Connection 1: TLS handshake complete default 11:54:40.395375+0300 FBEvents Connection 1: ready C(Y) E(Y) default 11:54:40.401154+0300 FBEvents Task .<1> now using Connection 1 default 11:54:40.401532+0300 FBEvents Connection 1: received viability advisory(Y) default 11:54:40.403594+0300 FBEvents Task .<1> sent request, body S 771 default 11:54:43.772898+0300 FBEvents [C1] event: client:data_stall @3.895s default 11:54:43.783942+0300 symptomsd Stall symptom detail: (symName/procName/ePid/ifIndex/interfaceType/stallType/endpoint/isFgOrBg): SYMPTOM_LIBNETCORE_DATA_STALL/FBEvents/66499/4/2/1//1 default 11:54:43.784048+0300 symptomsd Stall symptom: FBEvents has stale endpoint for stall type (1) on interface type (2), removing it: default 11:54:43.784121+0300 symptomsd Stall symptom: FBEvents has 1 stale endpoints total for stall type (2) on interface type (1), removed them default 11:54:43.784198+0300 symptomsd Stall symptom SYMPTOM_LIBNETCORE_DATA_STALL: added unique stall type (1) on interface type (2) for existing process FBEvents default 11:54:43.840945+0300 FBEvents Task .<1> received response, status 200 content K default 11:54:43.841057+0300 FBEvents Task .<1> done using Connection 1 default 11:54:43.843683+0300 FBEvents Task .<1> response ended default 11:54:43.843951+0300 FBEvents Task .<1> summary for task success {transaction_duration_ms=4069, response_status=200, connection=1, protocol="h2", domain_lookup_duration_ms=148, connect_duration_ms=271, secure_connection_duration_ms=150, request_start_ms=628, request_duration_ms=2, response_start_ms=4067, response_duration_ms=1, request_bytes=1475, response_bytes=1153, cache_hit=0} default 11:54:43.844686+0300 FBEvents Task .<1> finished successfully default 11:54:43.850092+0300 FBEvents [Optional(200), Optional("{\"error_code\":405,\"error_msg\":\"User must verify their account on www.facebook.com (405)\",\"error_data\":\"{\\\"machine_id\\\":\\\"0ILdYOQqHKkfXqK5mKboqTYp\\\",\\\"error_title\\\":\\\"Account Temporarily Unavailable\\\",\\\"error_message\\\":\\\"Your account is temporarily unavailable. Regain access by updating the app or logging in from a mobile or web browser.\\\"}\",\"request_args\":[{\"key\":\"adid\",\"value\":\"4F53A8A4-E234-4F37-8F63-9B5E2BF84CF6\"},{\"key\":\"format\",\"value\":\"json\"},{\"key\":\"device_id\",\"value\":\"5BAE6847-D3F5-4906-8D3F-5D0533292D7A\"},{\"key\":\"email\",\"value\":\"XXX\\u0040gmail.com\"},{\"key\":\"password\",\"value\":\"--sanitized--\"},{\"key\":\"generate_analytics_claim\",\"value\":\"1\"},{\"key\":\"community_id\",\"value\":\"\"},{\"key\":\"cpl\",\"value\":\"true\"},{\"key\":\"try_num\",\"value\":\"1\"},{\"key\":\"family_device_id\",\"value\":\"5BAE6847-D3F5-4906-8D3F-5D0533292D7A\"},{\"key\":\"credentials_type\",\"value\":\"password\"},{\"key\":\"generate_session_cookies\",\"value\":\"1\"},{\"key\":\"error_detail_type\",\"value\":\"button_with_disabled\"},{\"key\":\"source\",\"value\":\"login\"},{\"key\":\"generate_machine_id\",\"value\":\"1\"},{\"key\":\"meta_inf_fbmeta\",\"value\":\"\"},{\"key\":\"advertiser_id\",\"value\":\"4F53A8A4-E234-4F37-8F63-9B5E2BF84CF6\"},{\"key\":\"encrypted_msisdn\",\"value\":\"\"},{\"key\":\"currently_logged_in_userid\",\"value\":\"0\"},{\"key\":\"locale\",\"value\":\"en-IL\"},{\"key\":\"client_country_code\",\"value\":\"en-IL\"},{\"key\":\"method\",\"value\":\"auth.login\"},{\"key\":\"fb_api_req_friendly_name\",\"value\":\"authenticate\"},{\"key\":\"fb_api_caller_class\",\"value\":\"com.facebook.account.login.protocol.Fb4aAuthHandler\"},{\"key\":\"api_key\",\"value\":\"882a8490361da98702bf97a021ddc14d\"},{\"key\":\"access_token\",\"value\":\"--sanitized--\"}]}")] default 11:54:43.856273+0300 FBEvents Your account is temporarily unavailable. Regain access by updating the app or logging in from a mobile or web browser. default 11:54:43.903723+0300 FBEvents deactivate generator with style: TurnOn; activationCount: 1 -> 0; styleActivationCount: 1 -> 0; <_UIKeyboardFeedbackGenerator: 0x2836b46e0> default 11:54:43.903908+0300 FBEvents deactivate engine <_UIFeedbackSystemSoundEngine: 0x282c93250>, clientCount: 1 -> 0 default 11:54:43.903999+0300 FBEvents _internal_deactivateEngineIfPossible <_UIFeedbackSystemSoundEngine: 0x282c93250>, clientCount: 0, suspended: 0 default 11:54:43.904077+0300 FBEvents _internal_deactivateEngineIfPossible <_UIFeedbackSystemSoundEngine: 0x282c93250> tearedDown: 1 default 11:54:43.904262+0300 FBEvents engine <_UIFeedbackSystemSoundEngine: 0x282c93250: state=0, numberOfClients=0, prewarmCount=0, _internal_isSuspended=0> state changed: Running -> Inactive default 11:54:43.907087+0300 mediaserverd SSServerImp.cpp:1505:SetServerActive: clientPID 66499(FBEvents), flag 0, ssid 1104
qqvm commented 3 years ago

I have tried to resend this request with my test account and it works without errors. After a bit of googling I found that this might be the problem with the network you use to access Facebook. Try to switch the network provider, or turn on/off a VPN. Also as the error suggests, you can log in to the Facebook directly and verify your account.

Kevinn5 commented 3 years ago

The account is verified, each time i use your app to login, my account gets locked and i need to change password and re-activate it. Also, tried it with VPN (from US) and got the same error. Tried it with another facebook account and got the same error.

qqvm commented 3 years ago

This app uses the same API that is used in the official mobile and web clients. Some of the requests are simplified with removed trackers and unnecessary fields. That might cause Facebook to think that this is not a real Facebook application, or may be they already know about this app and added some kind of detection. What you can try to do is to enable second factor, then you probably will not receive so much alerts and will not be forced to change your password.