Modern Concurrency: Getting Started, Episode 3: Your First Asynchronous App | Kodeco, the new raywenderlich.com

Learn how to set up the course server, then use async/await and the task view modifier in the LittleJohn appā€™s SymbolListView.


This is a companion discussion topic for the original entry at https://www.kodeco.com/28434449-modern-concurrency-getting-started/lessons/3

Iā€™m currently running Xcode 14.3 and on an Apple Silicon computer running Mac OS Ventura 13.3.1 (22E261).

When I try to hit my server, after building I see the following:
Console

Web

Is there something else I need to do to fix this error?

Thanks!

Hi Ed! When you see this Server starting... message, check the connection by opening a browser window and loading localhost:8080/hello. There isnā€™t anything at just localhost:8080.

:see_no_evil: :hear_no_evil: :speak_no_evil:

That was it! Thank you!

1 Like

I get the error message below when running the swift run command.

error: terminated(1): /usr/bin/xcrun --sdk macosx --show-sdk-platform-path output:
xcrun: error: unable to lookup item ā€˜PlatformPathā€™ from command line tools installation
xcrun: error: unable to lookup item ā€˜PlatformPathā€™ in SDK ā€˜/Library/Developer/CommandLineTools/SDKs/MacOSX.sdkā€™

To solve the issue, I follow the steps from the following link. By using the command below, I can now run the server successfully.

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

thanks Suppasit! yes, Vapor is very sensitive to Xcode versions. I think there are other comments posted in the Modern Concurrency bookā€™s forum.

Hi. I am getting the following errors when I try to run this. I am running macOS Sonoma 14.2.1, Xcode 15.2, and Swift 5.9.2:

ā€¦/
video-mcon-materials/CourseServer/.build/checkouts/vapor/Sources/Vapor/HTTP/Server/HTTPServer.swift:380:54: error: reference to captured var ā€˜applicationā€™ in concurrently-executing code
application: application!,
^
ā€¦/video-mcon-materials/CourseServer/.build/checkouts/vapor/Sources/Vapor/HTTP/Server/HTTPServer.swift:388:46: error: reference to captured var ā€˜applicationā€™ in concurrently-executing code
application: application!,


I get this message whether I do ā€œswift runā€ from the command line, or use ā€œopen Package.swiftā€ and then try to run from within Xcode.

And just in case, the vapor versions:

vapor --version
framework: 4.66.1
toolbox: 18.7.4

hi Kevin, yes the vapor version is usually the culprit! this course is based on our Modern Concurrency book, where this issue was raised and fixed recently. Iā€™ll (soon) update this courseā€™s repo to match, but itā€™ll be quicker for you to download the bookā€™s updated materials.

Thanks for the heads up!

Ok, thanks for your quick response. I am about to head out for vacation for a week, but will give it a try when I get back.