DirectToSwift / DVDRental

Demo app using Direct to SwiftUI on top of a Sakila Database
http://www.alwaysrightinstitute.com/directtoswiftui/
5 stars 0 forks source link

Authentication loop during database connection #1

Open PerplexedFox opened 4 years ago

PerplexedFox commented 4 years ago

I've loaded the finished DVDRental demo app with

  git clone -b branches/10-customized \
                  https://github.com/DirectToSwift/DVDRental.git 

as well as tried it with

git clone -b branches/01-default-rulemodel \
          https://github.com/DirectToSwift/DVDRental.git

(see http://www.alwaysrightinstitute.com/directtoswiftui/) and restored the demo database. Currently, I am trying to execute the app, following the instructions on http://www.alwaysrightinstitute.com/directtoswiftui/ and ReadMe from https://github.com/DirectToSwift/DVDRental. Which means I have named the database accordingly and built the app. In fact, you should only install the database, download the project and it should be running without any change. However, the app remains on the launch screen, showing a "connecting database" message.

Through an exhaustive debugging process, I came to the conclusion that there is something wrong with the authentication. However, I could not determine what exactly goes wrong.

Is there anybody who tried it and it worked?

Using:

Xcode 11.3.1; Swift 5; iOS 13; Postgres.app Version 2.3.3e; PostgreSQL 12

Any idea how to solve the problem?

Update: there is no problem with the database. I can connect via psql, clients such as postico or navicat, or with my own apps using PostgresClientKit. The problem has been tracked down to the authentication process. Therefore I'm pretty sure that the problem lies somewhere there

Edit: while we're at it, is there a way to set the logger? I couldn't find a way (where and how) to get the messages

helje5 commented 4 years ago

Right, it is quite possible that I didn't have auth on. I'll see whether I can give it a try on the weekend.