#alex.f-iOS-terminal

1 messages · Page 1 of 1 (latest)

sand badger
#

Hi there 👋 let me see what I can find on that.

sick shore
#

Hi @sand badger Thanks!

sand badger
#

Thank you for your patience while I consult with teammates on this. Could you provide us with your account ID, or if you're seeing a request that is failing then that request's ID (req_XXX) would be helpful?

sick shore
#

I don't know the account ID, it's the account of my customer. I have some logs:

2022-01-20 17:00:02.184704+0200 Scope[48231:17122602] [StripeTerminal] l api_endpoint=terminal.connection_tokens.generate_pos_rpc_session app_id=net.scopeapp.ios.companion event=api_request_post logpoint_level=info scope=SCPAPIRequest sdk_version=2.4.0 time=1642690802184
2022-01-20 17:00:02.190961+0200 Scope[48231:17122602] [StripeTerminal] l api_endpoint=terminal.connection_tokens.activate app_id=net.scopeapp.ios.companion event=api_request_post logpoint_level=info scope=SCPAPIRequest sdk_version=2.4.0 time=1642690802190
2022-01-20 17:00:02.374625+0200 Scope[48231:17122599] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2022-01-20 17:00:02.382232+0200 Scope[48231:17123277] [boringssl] boringssl_metrics_log_metric_block_invoke(151) Failed to log metrics
2022-01-20 17:00:02.439617+0200 Scope[48231:17122602] [StripeTerminal] l api_endpoint=terminal.connection_tokens.generate_pos_rpc_session app_id=net.scopeapp.ios.companion error=could_not_parse_json_from_body event=api_response_error http_method=POST http_status_code=401 logpoint_level=info scope=SCPAPIRequest sdk_version=2.4.0 time=1642690802438
2022-01-20 17:00:02.440715+0200 Scope[48231:17122602] [StripeTerminal] x domain=api_request event=post_terminal_connection_tokens_generate_pos_rpc_session outcome=http_status_code_401 scope=scpterminal time=1642690802441
2022-01-20 17:00:02.446202+0200 Scope[48231:17122600] [StripeTerminal] l api_endpoint=terminal.connection_tokens.activate app_id=net.scopeapp.ios.companion error=could_not_parse_json_from_body event=api_response_error http_method=POST http_status_code=401 logpoint_level=info scope=SCPAPIRequest sdk_version=2.4.0 time=1642690802445
#

According this logs next endpoint fails: api_endpoint=terminal.connection_tokens.generate_pos_rpc_session

sand badger
#

Hm, do you have a firewall or proxy that could be altering the messages from Stripe?

night timber
#

do you have a PaymentIntent ID pi_xxxx for example? just so we can look at logs on our side for the related account.

sick shore
#

Hey @night timber My backend returns the connection token (pst_test_YWNjdF8xOUptb2VJVWpub3hWN21HLDRaaVpNSmZpQ2JjUXZjUkFqaWxSZUF5d0hqdjFOZ2I_000vyzqGjT) and the app have implementation of the ConnectionTokenProvider protocol. Also I initialised SDK with the ConnectionTokenProvider. The app discovers simulated readers but I can't connect to any of them.

#

I've asked my customer for account ID. I will provide it when he answered me.

#

Hey @sand badger no, I don't have firewall and proxy.

night timber
#

yeah that's pretty weird, not sure we've ever seen this specific type of failure. Hmm.

#

nothing on our logs for that account(the key is enough to find it) that I can find.

#

I feel like what would help is seeing the exact actual response the SDK is trying to parse but I'm unsure how exactly how you'd see that.

#

we do have an internal issue open right now we're investigating and I wonder if it's related. Two questions : a) have you been able to use this same integration on other Stripe accounts? b) have you just started building this integration/seeing these errors today or how long has it been happening?

sick shore
#

have you been able to use this same integration on other Stripe accounts?
no, it's my first time when I implements Stripe Terminal SDK

have you just started building this integration/seeing these errors today or how long has it been happening?
this has been going on for at least 3 days

Thanks for your help!

night timber
#

hmm ok not related to what I was thinking then.

sick shore
night timber
#

oh nice, that's very helpful

frosty granite
#

Hello! Looking at those requests and responses the quotes around the key jump out at me. Are there actually quotes around the key itself? Meaning the value of the key is "pst_..." instead of pst_?

night timber
#

oh, good catch

sick shore
#

Hey @frosty granite I don't know, the code is hidden in the framework.

frosty granite
#

No, this would be code you control.

night timber
#

the code is, but the string for that key comes from what you pass to the completion block inside your fetchConnectionToken implementation, which you can log

frosty granite
#

Yep. My guess is the code on your server is adding the quotes.

#

If you log the response from your server when your app fetches the connection token the same way you logged the requests above it will probably show the issue there.

sick shore
#

oh I understand thanks

#

will try now

#

@frosty granite @night timber works without quotes! Thanks a lot! I can connect now.