NEW: My new book Pro SwiftUI is out now – level up your SwiftUI skills today! >>

SOLVED: Day 33: Project 7: getting "[boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics" error

Forums > 100 Days of Swift

I'm getting this error with both my code and Paul's codes. I think the parse method isn't working properly but i dont know how to solve. Im using m1 mac if it's important.

1      

I don't think it's the parse function but a problem with the SSL connection. Is there more output in terminal?

1      

No it just says "[78503:4540000] [boringssl] boringssl_metrics_log_metric_block_invoke(144) Failed to log metrics " app is not crashing and it loads the data now im still getting same notification in terminal

1      

If data is loaded as expected I don't think it's related to your code. F.e. if the parser didn't work you wouldn't get any output but a more descriptive error message or even a fatal error. SSL hints to the connection itself.

2      

Your error it is caused because you are using Data(contentsOf: url) to download your json data synchronously and the server probably doesn't support it. You should use URLSession dataTask(with: URL) method to download your data asynchronously and this error will go away.

3      

@Dzondzula I have zero instances of Data(contentsOf: URL) in my code, and I'm getting a metric buttload of these messages in my log. Any other suggestions? Like the others, all my data is loading as expected...

1      

Me too. Any ideas? Did you find a solution @meadowsr ?

1      

@erithacus No, not yet. But it's getting bad enough that I might start looking for similar API usage that might be possibly related to this suggestion.

1      

Same error although I'm already using (comparable) URLSession.shared.dataTaskPublisher(for: ).

1      

Hacking with Swift is sponsored by MadMachine

SPONSORED Want to try Swift on microcontrollers? MadMachine provides ways to interact with the physical world in a Swift way. Join us and have fun!

Get it now

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.