IBM / FoodTrackerBackend

This tutorial teaches how to create a Kitura Swift backend for the FoodTracker iOS app tutorial from Apple. This project contains a version of the tutorial code that has been updated to use Codable rather than NSCoder.
108 stars 38 forks source link

BoringSSL error: Error saving meal to Kitura: 502 : Bad Gateway #19

Open citoki opened 6 years ago

citoki commented 6 years ago

I followed the tutorial and also implemented the steps for PostgreSQL database connection. Locally everything works fine. I can save and read the entries from the database via the FoodTracker iOS app (Simulator). Unfortunately, it doesn't work when I deploy the server app to my cloudfoundry space (not on Bluemix, but this shouldn't be an issue right?).

[MC] Lazy loading NSBundle MobileCoreServices.framework
[MC] Loaded MobileCoreServices.framework
[BoringSSL] Function boringssl_session_errorlog: line 2868 [boringssl_session_write] SSL_ERROR_SYSCALL(5): operation failed externally to the library

# … (same error output again 6 times)

Meals successfully saved.
Error saving meal to Kitura: 502 : Bad Gateway

# … (same error output again 3 times - for every single post request)

It seems there is an issue with the BoringSSL implementation of the iOS device and the handshake in the CF instance.

I used buildpack version: https://github.com/IBM-Swift/swift-buildpack#2.0.10

Xcode 9.2 Build version 9C40b
kitura 0.0.9
node v8.9.4
cocoapods 1.4.0
cf version 6.34.1+bbdf81482.2018-01-17
seabaylea commented 6 years ago

When running CF in IBM Cloud, the SSL terminates at the gateway - so IIRC you have to register your certificate with the gateway