GithubHelp home page GithubHelp logo

joreilly / peopleinspace Goto Github PK

View Code? Open in Web Editor NEW
2.8K 43.0 248.0 71.18 MB

Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear, Compose for Desktop, Compose for Web and Kotlin/JS + React clients along with Ktor backend.

License: Apache License 2.0

Kotlin 91.26% Ruby 0.86% Swift 7.87%
kotlin kotlin-multiplatform jetpack-compose swiftui android ios koin android-architecture-components kotlin-coroutines kotlin-js

peopleinspace's Introduction

PeopleInSpace

kotlin-version

Kotlin Multiplatform project with SwiftUI, Jetpack Compose, Compose for Wear OS, Compose for Desktop, Compose for Web, and Kotlin/JS + React clients along with Ktor backend. Currently running on

  • Android (Jetpack Compose)
  • Android App Widget (Compose based Glance API - contributed by https://github.com/yschimke)
  • Wear OS (Compose for Wear OS - primarily developed by https://github.com/yschimke)
  • iOS (SwiftUI)
  • iOS (Compose for iOS - experimental support!)
  • iOS App Widget (SwiftUI)
  • watchOS (SwiftUI) (contributed by https://github.com/nealsanche)
  • macOS (SwiftUI)
  • Swift Executable Package
  • Desktop (Compose for Desktop)
  • Web (Compose for Web - Wasm based)
  • JVM (small Ktor back end service + Main.kt in common module)

It makes use of Open Notify PeopleInSpace API to show list of people currently in space and also the position of the International Space Station (inspired by https://kousenit.org/2019/12/19/a-few-astronomical-examples-in-kotlin/)!

The project is included as sample in the official Kotlin Multiplatform Mobile docs and also the Google Dev Library

Related posts:

Note that this repository very much errs on the side of minimalism to help more clearly illustrate key moving parts of a Kotlin Multiplatform project and also to hopefully help someone just starting to explore KMP to get up and running for first time (and is of course primarily focused on use of Jetpack Compose and SwiftUI). If you're at the stage of moving beyond this then I'd definitely recommend checking out KaMPKit from Touchlab. I also have the following samples that demonstrate the use of a variety of Kotlin Multiplatform libraries (and also use Jetpack Compose and SwiftUI).

Building

You need to use at least Android Studio Flamingo (note: Java 17 is now the minimum version required). Requires Xcode 13.2 or later (due to use of new Swift 5.5 concurrency APIs).

Open `PeopleInSpaceSwiftUI' for iOS/watchOS/macOS projects.

To exercise (React based) web client run ./gradlew :web:browserDevelopmentRun.

To run backend you can either run ./gradlew :backend:run or run Server.kt directly from Android Studio. After doing that you should then for example be able to open http://localhost:9090/astros_local.json in a browser.

Compose for Web client (Wasm)

Similarly for Kotlin/Wasm based version ./gradlew :compose-web:wasmBrowserDevelopmentRun

Compose for Desktop client

This client is available in compose-desktop module and can be run using ./gradlew :compose-desktop:run. Note that you need to use appropriate version of JVM when running (works for example with Java 11)

Compose for iOS client

Can be run using for example ./gradlew :compose-ios:iosDeployIPhone13ProDebug

Backend code

Have tested this out in Google App Engine deployment. Using shadowJar plugin to create an "uber" jar and then deploying it as shown below. Should be possible to deploy this jar to other services as well.

./gradlew :backend:shadowJar
gcloud app deploy backend/build/libs/backend-all.jar --appyaml=backend/src/jvmMain/appengine/app.yaml

GraphQL backend

There's a GraphQL module (graphql-server) which can be run locally using ./gradlew :graphql-server:bootRun with "playground" then available at http://localhost:8080/playground

Screenshots

iOS (SwiftUI)
Screenshot 2021-02-27 at 12 09 02

Android (Jetpack Compose)

Screenshot 2022-11-11 at 21 24 59

watchOS (SwiftUI)
watchOS Screenshot 1 watch0S Screenshot 2

Wear OS (Wear Compose)
Wear Compose Screenshot 1 Wear Compose Screenshot 2 Wear Compose Screenshot 3

macOS (SwiftUI)
Screenshot 2021-06-01 at 20 02 31

Compose for Desktop
Screenshot 2021-10-01 at 16 45 06

Compose for Web (Wasm based)
Screenshot 2024-03-02 at 21 03 23

Languages, libraries and tools used

peopleinspace's People

Contributors

chihsuanwu avatar chris-wickens avatar cicerohellmann avatar dazza5000 avatar ercan avatar ernestkamara avatar foso avatar giljulio avatar hikari-dev avatar itsandreramon avatar joreilly avatar martinbonnin avatar mreichelt avatar patilshreyas avatar percy-g2 avatar ptran-gpfw avatar rdewilde avatar renovate[bot] avatar rickclephas avatar saryongkang avatar sokarcreative avatar solidogen avatar sonique6784 avatar taehoonleee avatar thederputy avatar thelumiereguy avatar tomasjablonskis avatar yektadev avatar yschimke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

peopleinspace's Issues

Add Open-source License?

Hi,

cool little project! Kudos!
I was wondering whether you had considered open-sourcing this under a permissive Open-Source License, such as MIT or Apache?
I could see this being a nice starting point similar to KaMPKit for many projects.

Cheers,
Florian

The project is using an incompatible version (7.0.0-beta05) of the Android Gradle plugin.

I'm experiencing this error when using Android Studio Arctic Fox 2020.3.1 RC1.

It seems like the error is about the Android Gradle plugin.

The project is using an incompatible version (7.0.0-beta05) of the Android Gradle plugin.

It shows an option to start the upgrade assistant, but because the dependencies are as consts in the buildSrc, it isn't supported to do this automatically.

Schermafbeelding 2021-07-21 om 21 32 00

Schermafbeelding 2021-07-21 om 21 32 53

Any clue how to resolve this?

Add CLI example for macOS

Hey there @joreilly!

Thank you for this awesome project! 🌟

What do you think about minimal CLI examples (Kotlin native binaries) - for showing the ISS position and astronauts in space? Examples:

$ ./people_in_space astronauts
Loading astronauts from space...
Kate Rubins
Mike Hopkins
Sergey Kud-Sverchkov
Sergey Ryzhikov
Shannon Walker
Soichi Noguchi
Victor Glover

Similarly, the ISS position could be shown using ./people_in_space iss, and ./people_in_space would show a help with options.

Would you like an open source contribution in this direction, a CLI example for mac (and Linux/Windows later)? I think it could help people getting started with Kotlin Native for CLI applications.

Upgrading to Android Studio Arctic Fox Canary 3 breaks Gradle build

Android Studio Arctic Fox Canary 2 works fine - but upgrading to Canary 3 (and upgrading Gradle to 6.8-rc1 and android plugin to 7.0.0-alpha03 breaks the build:

PeopleInSpace git:(master) ✗ ./gradlew assemble                         

> Configure project :backend

The 'org.jetbrains.kotlin.platform.*' plugins are deprecated and will no longer be available in Kotlin 1.4.
Please migrate the project to the 'org.jetbrains.kotlin.multiplatform' plugin.
See: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html

> Configure project :common
To take advantage of the new functionality for Cocoapods Integration like synchronizing with the Xcode project 
and supporting dependencies on pods, please install the `cocoapods-generate` plugin for CocoaPods 
by calling `gem install cocoapods-generate` in terminal. 

More details are available by https://github.com/square/cocoapods-generate

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':common'.
> Configuration with name 'testApi' not found.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8-rc-1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 735ms

Unable to run web platforms due to webpack problem

I've checked out the latest main branch and am trying to run the web based platforms but am running into a build issue. Both :compose-web:jsBrowserDevelopmentRun and :web:browserDevelopmentRun are failing with the same issue.

According to this post, webpack should be updated to version 4.10.0.

This does indeed solve the problem.

> Task :web:browserDevelopmentRun FAILED
Execution optimizations have been disabled for task ':web:browserDevelopmentRun' to ensure correctness due to the following reasons:
  - Gradle detected a problem with the following location: '/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/packages/PeopleInSpace-web/kotlin/PeopleInSpace-web.js'. Reason: Task ':web:browserDevelopmentRun' uses this output of task ':web:developmentExecutableCompileSync' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. Please refer to https://docs.gradle.org/7.4/userguide/validation_problems.html#implicit_dependency for more details about this problem.
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
[webpack-cli] TypeError: cli.isMultipleCompiler is not a function
    at Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/@webpack-cli/serve/lib/index.js:146:35)
    at async Promise.all (index 1)
    at async Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1687:7)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':web:browserDevelopmentRun'.
> [webpack-cli] TypeError: cli.isMultipleCompiler is not a function
  [webpack-cli] TypeError: cli.isMultipleCompiler is not a function
      at Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/@webpack-cli/serve/lib/index.js:146:35)
      at async Promise.all (index 1)
      at async Command.<anonymous> (/Users/chris/Documents/Code/kmp/PeopleInSpace/build/js/node_modules/webpack-cli/lib/webpack-cli.js:1687:7)

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

See https://docs.gradle.org/7.4/userguide/command_line_interface.html#sec:command_line_warnings

Execution optimizations have been disabled for 1 invalid unit(s) of work during this build to ensure correctness.
Please consult deprecation warnings for more details.

BUILD FAILED in 14s
28 actionable tasks: 7 executed, 21 up-to-date

Usage of compose-ios

Hi, can you help me? where can I find documentation or tutorials for compose-ios?

I tried to run ./gradlew compose-ios:iosDeployIPhone8Debug

but it threw the following error:

Field 'dataPathSize' is required for type with serial name 'org.jetbrains.compose.experimental.uikit.internal.DeviceData', but it was missing

Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel

Can't open the project on my mac, tried following Android Studio versions:
Arctic Fox 2020.3.1 Beta 2
Android Studio 4.2
Android Studio 4.2.1
Bumblebee 2021.1.1 Canary 1

I'm running into following error as soon as I try to build the app from version controll:

java.lang.NoClassDefFoundError: Could not initialize class org.jetbrains.kotlin.com.intellij.pom.java.LanguageLevel
	at org.jetbrains.kotlin.com.intellij.core.CoreLanguageLevelProjectExtension.<init>(CoreLanguageLevelProjectExtension.java:26)
	at org.jetbrains.kotlin.com.intellij.core.JavaCoreProjectEnvironment.<init>(JavaCoreProjectEnvironment.java:42)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreProjectEnvironment.<init>(KotlinCoreProjectEnvironment.kt:26)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$ProjectEnvironment.<init>(KotlinCoreEnvironment.kt:118)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment$Companion.createForProduction(KotlinCoreEnvironment.kt:420)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.createCoreEnvironment(K2JVMCompiler.kt:226)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:152)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:371)
	at org.jetbrains.kotlin.incremental.IncrementalJvmCompilerRunner.runCompiler(IncrementalJvmCompilerRunner.kt:105)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compileIncrementally(IncrementalCompilerRunner.kt:249)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.access$compileIncrementally(IncrementalCompilerRunner.kt:38)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner$compile$2.invoke(IncrementalCompilerRunner.kt:80)
	at org.jetbrains.kotlin.incremental.IncrementalCompilerRunner.compile(IncrementalCompilerRunner.kt:92)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.execIncrementalCompiler(CompileServiceImpl.kt:602)
	at org.jetbrains.kotlin.daemon.CompileServiceImplBase.access$execIncrementalCompiler(CompileServiceImpl.kt:93)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:1644)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:567)
	at java.rmi/sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:357)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:200)
	at java.rmi/sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:691)
	at java.rmi/sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:587)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:705)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.rmi/sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:704)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:630)
	at java.base/java.lang.Thread.run(Thread.java:831)

An older version of PeopleInSpace works fine on Android but I also run into a problem on Xcode:
Cannot find 'KoinKt' in scope

Could not download kotlin-serialization-1.6.10.jar in Xcode

  • What went wrong:
    A problem occurred configuring root project 'PeopleInSpace'.

Could not resolve all artifacts for configuration ':classpath'.
Could not download kotlin-serialization-1.6.10.jar (org.jetbrains.kotlin:kotlin-serialization:1.6.10)
> Could not get resource 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization/1.6.10/kotlin-serialization-1.6.10.jar'.
> Could not GET 'https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/kotlin-serialization/1.6.10/kotlin-serialization-1.6.10.jar'.
> Unsupported or unrecognized SSL message

anyone can help me?

[macOS] TLS sessions are not supported on Native platform

Running the macOS build leads to an error crashing the app on startup:

[macOS] TLS sessions are not supported on Native platform

Here is the stack:

2021-07-28 22:47:25.195389+0200 PeopleInSpace[1933:24712] Debug: (Kermit) startObservingPeopleUpdates
2021-07-28 22:47:25.207475+0200 PeopleInSpace[1933:24712] Calling IOPPFGetProperty thermally_optimized_maps!
2021-07-28 22:47:25.269994+0200 PeopleInSpace[1933:24712] It's not legal to call -layoutSubtreeIfNeeded on a view which is already being laid out.  If you are implementing the view's -layout method, you can call -[super layout] instead. Break on void _NSDetectedLayoutRecursion(void) to debug.  This will be logged only once.  This may break in the future.
2021-07-28 22:47:25.310240+0200 PeopleInSpace[1933:24712] Debug: (Kermit) fetchAndStorePeople
Uncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for AwaitContinuation(Shareable[used]){Completed}@213f938. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
    at 0   PeopleInSpace                       0x00000001000e138e kfun:kotlin.Error#<init>(kotlin.String?;kotlin.Throwable?){} + 126
    at 1   PeopleInSpace                       0x00000001003d91de kfun:kotlinx.coroutines.CoroutinesInternalError#<init>(kotlin.String;kotlin.Throwable){} + 126
    at 2   PeopleInSpace                       0x0000000100434af7 kfun:kotlinx.coroutines.DispatchedTask#handleFatalException(kotlin.Throwable?;kotlin.Throwable?){} + 887
    at 3   PeopleInSpace                       0x0000000100434720 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3488
    at 4   PeopleInSpace                       0x000000010047158a kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 90
    at 5   PeopleInSpace                       0x00000001004718a0 kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$43.invoke#internal + 64
    at 6   PeopleInSpace                       0x00000001004719b0 kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$43.$<bridge-UNN>invoke(){}#internal + 64
    at 7   PeopleInSpace                       0x0000000100472ad9 _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge8 + 185
    at 8   libdispatch.dylib                   0x000000010149b844 _dispatch_call_block_and_release + 12
    at 9   libdispatch.dylib                   0x000000010149c826 _dispatch_client_callout + 8
    at 10  libdispatch.dylib                   0x00000001014ac446 _dispatch_main_queue_callback_4CF + 1100
    at 11  CoreFoundation                      0x00007fff37d73513 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    at 12  CoreFoundation                      0x00007fff37d3318a __CFRunLoopRun + 2042
    at 13  CoreFoundation                      0x00007fff37d32333 CFRunLoopRunSpecific + 466
    at 14  HIToolbox                           0x00007fff3694dabd RunCurrentEventLoopInMode + 292
    at 15  HIToolbox                           0x00007fff3694d7d5 ReceiveNextEventCommon + 584
    at 16  HIToolbox                           0x00007fff3694d579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
    at 17  AppKit                              0x00007fff34f94739 _DPSNextEvent + 883
    at 18  AppKit                              0x00007fff34f92f80 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
    at 19  AppKit                              0x00007fff34f84c8e -[NSApplication run] + 658
    at 20  AppKit                              0x00007fff34f56a76 NSApplicationMain + 777
    at 21  PeopleInSpace                       0x000000010000a14d main + 13
    at 22  libdyld.dylib                       0x00007fff71ef0cc9 start + 1
Caused by: kotlin.IllegalStateException: TLS sessions are not supported on Native platform.
    at 0   PeopleInSpace                       0x00000001000e8bbf kfun:kotlin.Throwable#<init>(kotlin.String?){} + 95
    at 1   PeopleInSpace                       0x00000001000e14bd kfun:kotlin.Exception#<init>(kotlin.String?){} + 93
    at 2   PeopleInSpace                       0x00000001000e172d kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93
    at 3   PeopleInSpace                       0x00000001000e1ddd kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 93
    at 4   PeopleInSpace                       0x0000000100764e7e kfun:io.ktor.network.tls#openTLSSession(io.ktor.network.sockets.Socket;io.ktor.utils.io.ByteReadChannel;io.ktor.utils.io.ByteWriteChannel;io.ktor.network.tls.TLSConfig;kotlin.coroutines.CoroutineContext){}io.ktor.network.sockets.Socket + 254
    at 5   PeopleInSpace                       0x000000010075f95c kfun:io.ktor.network.tls.$tlsCOROUTINE$0#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 844
    at 6   PeopleInSpace                       0x000000010075fe8c kfun:io.ktor.network.tls#tls__at__io.ktor.network.sockets.Connection(kotlin.coroutines.CoroutineContext;io.ktor.network.tls.TLSConfig){}io.ktor.network.sockets.Socket + 460
    at 7   PeopleInSpace                       0x0000000100760192 kfun:io.ktor.network.tls#tls__at__io.ktor.network.sockets.Connection(kotlin.coroutines.CoroutineContext;kotlin.Function1<io.ktor.network.tls.TLSConfigBuilder,kotlin.Unit>){}io.ktor.network.sockets.Socket + 626
    at 8   PeopleInSpace                       0x0000000100774e96 kfun:io.ktor.client.engine.cio.Endpoint.$connectCOROUTINE$9.invokeSuspend#internal + 5974
    at 9   PeopleInSpace                       0x000000010077613f kfun:io.ktor.client.engine.cio.Endpoint.connect#internal + 383
    at 10  PeopleInSpace                       0x000000010077995f kfun:io.ktor.client.engine.cio.Endpoint.$makeDedicatedRequest$lambda-3COROUTINE$12.invokeSuspend#internal + 2847
    at 11  PeopleInSpace                       0x000000010010c274 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 788
    at 12  PeopleInSpace                       0x00000001004344b7 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2871
    at 13  PeopleInSpace                       0x000000010047158a kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 90
    at 14  PeopleInSpace                       0x00000001004718a0 kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$43.invoke#internal + 64
    at 15  PeopleInSpace                       0x00000001004719b0 kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$43.$<bridge-UNN>invoke(){}#internal + 64
    at 16  PeopleInSpace                       0x0000000100472ad9 _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge8 + 185
    at 17  libdispatch.dylib                   0x000000010149b844 _dispatch_call_block_and_release + 12
    at 18  libdispatch.dylib                   0x000000010149c826 _dispatch_client_callout + 8
    at 19  libdispatch.dylib                   0x00000001014ac446 _dispatch_main_queue_callback_4CF + 1100
    at 20  CoreFoundation                      0x00007fff37d73513 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    at 21  CoreFoundation                      0x00007fff37d3318a __CFRunLoopRun + 2042
    at 22  CoreFoundation                      0x00007fff37d32333 CFRunLoopRunSpecific + 466
    at 23  HIToolbox                           0x00007fff3694dabd RunCurrentEventLoopInMode + 292
    at 24  HIToolbox                           0x00007fff3694d7d5 ReceiveNextEventCommon + 584
    at 25  HIToolbox                           0x00007fff3694d579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
    at 26  AppKit                              0x00007fff34f94739 _DPSNextEvent + 883
    at 27  AppKit                              0x00007fff34f92f80 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
    at 28  AppKit                              0x00007fff34f84c8e -[NSApplication run] + 658
    at 29  AppKit                              0x00007fff34f56a76 NSApplicationMain + 777
Printing description of exception:
(void *) exception = 0x00000001007ac6e0
(lldb) 

I could find this resource, but not sure if it is relevant: https://youtrack.jetbrains.com/issue/KTOR-1071

Can not run on simulator on Apple M1 MacBook

The XCode project seems to be hardcoded to be build for Intel architecture.
I need documentation what needs to be changed to get it running.
A branch with the changes might be useful.

iOS target archive fails

Following error occurs while archieving an iOS target:


> Task :common:generateCommonMainConsumerDeviceDatabaseInterface UP-TO-DATE
> Task :common:compileKotlinIosArm64 UP-TO-DATE
> Task :common:linkPodReleaseFrameworkIosArm64
e: Compilation failed: null

 * Source files: 
 * Compiler version info: Konan: 1.6.0 / Kotlin: 1.6.0
 * Output kind: FRAMEWORK

e: java.lang.NullPointerException
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable.mapClassReferenceType(DataFlowIR.kt:520)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable.mapType(DataFlowIR.kt:554)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable.mapTypeToFunctionParameter(DataFlowIR.kt:560)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable.mapFunction(DataFlowIR.kt:636)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable.access$mapFunction(DataFlowIR.kt:440)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitFunction(DataFlowIR.kt:471)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitConstructor(IrElementVisitorVoid.kt:55)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitConstructor(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitConstructor(IrElementVisitorVoid.kt:56)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitConstructor(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitConstructor(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.declarations.IrConstructor.accept(IrConstructor.kt:32)
	at org.jetbrains.kotlin.ir.declarations.IrClass.acceptChildren(IrClass.kt:60)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoidKt.acceptChildrenVoid(IrElementVisitorVoid.kt:275)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitClass(DataFlowIR.kt:482)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitClass(IrElementVisitorVoid.kt:44)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitClass(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitClass(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.declarations.IrClass.accept(IrClass.kt:55)
	at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.acceptChildren(IrFileImpl.kt:84)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoidKt.acceptChildrenVoid(IrElementVisitorVoid.kt:275)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitElement(DataFlowIR.kt:467)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitPackageFragment(IrElementVisitorVoid.kt:30)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitPackageFragment(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:37)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitFile(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitFile(IrElementVisitorVoid.kt:38)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitFile(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitFile(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.declarations.impl.IrFileImpl.accept(IrFileImpl.kt:81)
	at org.jetbrains.kotlin.backend.konan.serialization.KonanIrModuleFragmentImpl.acceptChildren(KonanIrlinker.kt:249)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoidKt.acceptChildrenVoid(IrElementVisitorVoid.kt:275)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitElement(DataFlowIR.kt:467)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:27)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitModuleFragment(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.ir.visitors.IrElementVisitorVoid$DefaultImpls.visitModuleFragment(IrElementVisitorVoid.kt:28)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitModuleFragment(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable$1.visitModuleFragment(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.backend.konan.serialization.KonanIrModuleFragmentImpl.accept(KonanIrlinker.kt:246)
	at org.jetbrains.kotlin.backend.konan.optimizations.DataFlowIR$SymbolTable.<init>(DataFlowIR.kt:465)
	at org.jetbrains.kotlin.backend.konan.optimizations.ModuleDFGBuilder.<init>(DFGBuilder.kt:184)
	at org.jetbrains.kotlin.backend.konan.llvm.BitcodePhasesKt$buildDFGPhase$1.invoke(BitcodePhases.kt:111)
	at org.jetbrains.kotlin.backend.konan.llvm.BitcodePhasesKt$buildDFGPhase$1.invoke(BitcodePhases.kt:107)
	at org.jetbrains.kotlin.backend.konan.KonanLoweringPhasesKt$makeKonanModuleOpPhase$1.invoke(KonanLoweringPhases.kt:65)
	at org.jetbrains.kotlin.backend.konan.KonanLoweringPhasesKt$makeKonanModuleOpPhase$1.invoke(KonanLoweringPhases.kt:63)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:22)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompositePhase.invoke(PhaseBuilders.kt:29)
	at org.jetbrains.kotlin.backend.common.phaser.NamedCompilerPhase.invoke(CompilerPhase.kt:96)
	at org.jetbrains.kotlin.backend.common.phaser.CompilerPhaseKt.invokeToplevel(CompilerPhase.kt:43)
	at org.jetbrains.kotlin.backend.konan.KonanDriverKt.runTopLevelPhases(KonanDriver.kt:34)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:81)
	at org.jetbrains.kotlin.cli.bc.K2Native.doExecute(K2Native.kt:37)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:92)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
	at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithGradleRenderer$1.invoke(K2Native.kt:393)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion$mainNoExitWithGradleRenderer$1.invoke(K2Native.kt:392)
	at org.jetbrains.kotlin.util.UtilKt.profileIf(Util.kt:22)
	at org.jetbrains.kotlin.util.UtilKt.profile(Util.kt:16)
	at org.jetbrains.kotlin.cli.bc.K2Native$Companion.mainNoExitWithGradleRenderer(K2Native.kt:392)
	at org.jetbrains.kotlin.cli.bc.K2NativeKt.mainNoExitWithGradleRenderer(K2Native.kt:634)
	at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:62)
	at org.jetbrains.kotlin.cli.utilities.MainKt$daemonMain$1.invoke(main.kt:62)
	at org.jetbrains.kotlin.cli.utilities.MainKt.mainImpl(main.kt:17)
	at org.jetbrains.kotlin.cli.utilities.MainKt.daemonMain(main.kt:62)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.runInProcess(KotlinToolRunner.kt:130)
	at org.jetbrains.kotlin.compilerRunner.KotlinToolRunner.run(KotlinToolRunner.kt:77)
	at org.jetbrains.kotlin.gradle.tasks.AbstractKotlinNativeCompile.compile(KotlinNativeTasks.kt:361)
	at org.jetbrains.kotlin.gradle.tasks.KotlinNativeLink.compile(KotlinNativeTasks.kt:710)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:104)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.doExecute(StandardTaskAction.java:58)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:51)
	at org.gradle.api.internal.project.taskfactory.StandardTaskAction.execute(StandardTaskAction.java:29)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$2.run(ExecuteActionsTaskExecuter.java:498)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.run(DefaultBuildOperationRunner.java:56)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$run$1(DefaultBuildOperationExecutor.java:71)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.runWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:45)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:71)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:483)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:466)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.access$300(ExecuteActionsTaskExecuter.java:105)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.executeWithPreviousOutputFiles(ExecuteActionsTaskExecuter.java:270)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution.execute(ExecuteActionsTaskExecuter.java:248)
	at org.gradle.internal.execution.steps.ExecuteStep.executeInternal(ExecuteStep.java:83)
	at org.gradle.internal.execution.steps.ExecuteStep.access$000(ExecuteStep.java:37)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:50)
	at org.gradle.internal.execution.steps.ExecuteStep$1.call(ExecuteStep.java:47)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:47)
	at org.gradle.internal.execution.steps.ExecuteStep.execute(ExecuteStep.java:37)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:68)
	at org.gradle.internal.execution.steps.RemovePreviousOutputsStep.execute(RemovePreviousOutputsStep.java:38)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:50)
	at org.gradle.internal.execution.steps.ResolveInputChangesStep.execute(ResolveInputChangesStep.java:36)
	at org.gradle.internal.execution.steps.CancelExecutionStep.execute(CancelExecutionStep.java:41)
	at org.gradle.internal.execution.steps.TimeoutStep.executeWithoutTimeout(TimeoutStep.java:74)
	at org.gradle.internal.execution.steps.TimeoutStep.execute(TimeoutStep.java:55)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:51)
	at org.gradle.internal.execution.steps.CreateOutputsStep.execute(CreateOutputsStep.java:29)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:54)
	at org.gradle.internal.execution.steps.CaptureStateAfterExecutionStep.execute(CaptureStateAfterExecutionStep.java:35)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:60)
	at org.gradle.internal.execution.steps.BroadcastChangingOutputsStep.execute(BroadcastChangingOutputsStep.java:27)
	at org.gradle.internal.execution.steps.BuildCacheStep.executeWithoutCache(BuildCacheStep.java:174)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:74)
	at org.gradle.internal.execution.steps.BuildCacheStep.execute(BuildCacheStep.java:45)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:40)
	at org.gradle.internal.execution.steps.StoreExecutionStateStep.execute(StoreExecutionStateStep.java:29)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:36)
	at org.gradle.internal.execution.steps.RecordOutputsStep.execute(RecordOutputsStep.java:22)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.executeBecause(SkipUpToDateStep.java:99)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.lambda$execute$0(SkipUpToDateStep.java:92)
	at java.base/java.util.Optional.map(Optional.java:265)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:52)
	at org.gradle.internal.execution.steps.SkipUpToDateStep.execute(SkipUpToDateStep.java:36)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:84)
	at org.gradle.internal.execution.steps.ResolveChangesStep.execute(ResolveChangesStep.java:41)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:37)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsFinishedStep.execute(MarkSnapshottingInputsFinishedStep.java:27)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:91)
	at org.gradle.internal.execution.steps.ResolveCachingStateStep.execute(ResolveCachingStateStep.java:49)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:78)
	at org.gradle.internal.execution.steps.CaptureStateBeforeExecutionStep.execute(CaptureStateBeforeExecutionStep.java:49)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:105)
	at org.gradle.internal.execution.steps.ValidateStep.execute(ValidateStep.java:50)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.lambda$execute$2(SkipEmptyWorkStep.java:86)
	at java.base/java.util.Optional.orElseGet(Optional.java:369)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:86)
	at org.gradle.internal.execution.steps.SkipEmptyWorkStep.execute(SkipEmptyWorkStep.java:32)
	at org.gradle.internal.execution.steps.legacy.MarkSnapshottingInputsStartedStep.execute(MarkSnapshottingInputsStartedStep.java:38)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:43)
	at org.gradle.internal.execution.steps.LoadExecutionStateStep.execute(LoadExecutionStateStep.java:31)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.lambda$execute$0(AssignWorkspaceStep.java:40)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$TaskExecution$2.withWorkspace(ExecuteActionsTaskExecuter.java:283)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:40)
	at org.gradle.internal.execution.steps.AssignWorkspaceStep.execute(AssignWorkspaceStep.java:30)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:37)
	at org.gradle.internal.execution.steps.IdentityCacheStep.execute(IdentityCacheStep.java:27)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:49)
	at org.gradle.internal.execution.steps.IdentifyStep.execute(IdentifyStep.java:35)
	at org.gradle.internal.execution.impl.DefaultExecutionEngine$1.execute(DefaultExecutionEngine.java:76)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:184)
	at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:173)
	at org.gradle.api.internal.tasks.execution.CleanupStaleOutputsExecuter.execute(CleanupStaleOutputsExecuter.java:109)
	at org.gradle.api.internal.tasks.execution.FinalizePropertiesTaskExecuter.execute(FinalizePropertiesTaskExecuter.java:46)
	at org.gradle.api.internal.tasks.execution.ResolveTaskExecutionModeExecuter.execute(ResolveTaskExecutionModeExecuter.java:51)
	at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:57)
	at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:56)
	at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:36)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.executeTask(EventFiringTaskExecuter.java:77)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:55)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter$1.call(EventFiringTaskExecuter.java:52)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:200)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$CallableBuildOperationWorker.execute(DefaultBuildOperationRunner.java:195)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:75)
	at org.gradle.internal.operations.DefaultBuildOperationRunner$3.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:153)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.execute(DefaultBuildOperationRunner.java:68)
	at org.gradle.internal.operations.DefaultBuildOperationRunner.call(DefaultBuildOperationRunner.java:62)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.lambda$call$2(DefaultBuildOperationExecutor.java:76)
	at org.gradle.internal.operations.UnmanagedBuildOperationWrapper.callWithUnmanagedSupport(UnmanagedBuildOperationWrapper.java:54)
	at org.gradle.internal.operations.DefaultBuildOperationExecutor.call(DefaultBuildOperationExecutor.java:76)
	at org.gradle.api.internal.tasks.execution.EventFiringTaskExecuter.execute(EventFiringTaskExecuter.java:52)
	at org.gradle.execution.plan.LocalTaskNodeExecutor.execute(LocalTaskNodeExecutor.java:74)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:408)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$InvokeNodeExecutorsAction.execute(DefaultTaskExecutionGraph.java:395)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:388)
	at org.gradle.execution.taskgraph.DefaultTaskExecutionGraph$BuildOperationAwareExecutionAction.execute(DefaultTaskExecutionGraph.java:374)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.lambda$run$0(DefaultPlanExecutor.java:127)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.execute(DefaultPlanExecutor.java:191)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.executeNextNode(DefaultPlanExecutor.java:182)
	at org.gradle.execution.plan.DefaultPlanExecutor$ExecutorWorker.run(DefaultPlanExecutor.java:124)
	at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
	at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:48)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:56)
	at java.base/java.lang.Thread.run(Thread.java:829)


> Task :common:linkPodReleaseFrameworkIosArm64 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':common:linkPodReleaseFrameworkIosArm64'.
> Compilation finished with errors

My assumptions suggest that there might be an issue with certain versions of certain libraries after Kotlin version update to 1.6.X

Cannot build web using npm

I am trying to build frontend (web module) via npm from inside build\js directory using:
npm install
but i get error:
Error: 404 Not Found: koin-core@^3.0.0-alpha-4

koin path in generated package.json looks fine.

Note: my goal is to dockerize frontend and backend using docker compose but i stuck on this error

Cannot build the project - An exception occurred applying plugin request [id: 'com.android.application']

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/safaiyeh/code/PeopleInSpace/app/build.gradle.kts' line: 1

* What went wrong:
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
     You can try some of the following options:
       - changing the IDE settings.
       - changing the JAVA_HOME environment variable.
       - changing `org.gradle.java.home` in `gradle.properties`.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8-rc-4/userguide/command_line_interface.html#sec:command_line_warnings

Error: "hello_world" is translated here but not found in default locale [ExtraTranslation] (klint issues)

Task :wearApp:lintDebug FAILED
Wrote HTML report to file:///Users/Robert/projects/core/wearApp/build/reports/lint-results-debug.html
Lint found 1 error and 2 warnings. First failure:
/Users/Robert/projects/core/wearApp/src/main/res/values-round/strings.xml:2: Error: "hello_world" is translated here but not found in default locale [ExtraTranslation]
Hello Round World!

When trying to compile the wearApp from Android studio, i get this lint error.

Schermafbeelding 2021-07-21 om 22 09 56

I'll try to look for a solution. Can't be hard to the sound of it.

Stated swift package manager support is an overstatement

I made a small experiment using the ./gradlew createSwiftPackage to generate a swift package of PeopleInSpace. This swift package I then tried to use as a local swift package. Only this does not work.

As I reference I have this project where I added a very basic setup https://github.com/doozMen/KMM-PeopleInSpace

If you agree may I suggest to not suggest that this project uses swift package manager as it is a good attempt but does not actually compile?

Compose in shared android code?

Hi
thanks for publishing this. It is good for picking up good practices in multiplatform project.

I am wondering if we can have compose code in shared part (/common/src/androidMain) or just in the platform code (app/src/main).
I have created a SO question with some project setup as an example but no luck as far :(
Am I missing something?

TestKoinGraph > checking koin modules FAILED java.lang.NoClassDefFoundError at Shadows.java

When compiling the app from Android Studio (AF 2020.3.1 RC1), I am facing this error.

> Task :app:testDebugUnitTest FAILED

com.surrus.peopleinspace.TestKoinGraph > checking koin modules FAILED
    java.lang.NoClassDefFoundError at Shadows.java:2317
        Caused by: java.lang.ClassNotFoundException at SandboxClassLoader.java:147
            Caused by: java.lang.IllegalArgumentException at ClassReader.java:195

Not sure what is causing this.

This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.3 or newer.

First of all, I appreciate the efforts to publish this project and all the articles around it, really awesome.

Secondly, when building the project, I get this error:

This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 4.3 or newer.

I use the 7.0.0-alpha4 plugin (Intellij IDEA CE), so it should work imho. Any clue how to resolve this?

Can not run the watchOS app on the emulator

Reproduction steps:

  1. clone the repository
  2. open .xcworkspace in Xcode
  3. change signing to local team
  4. attempt to run on the local emulator

This is the output I get:

ld: warning: ignoring file /Volumes/macApps/fhswf/S5/Projekt/PeopleInSpace/common/build/cocoapods/framework/common.framework/common, building for watchOS Simulator-x86_64 but attempting to link with file built for watchOS Simulator-i386
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_CommonKoinKt", referenced from:
      objc-class-ref in ExtensionDelegate.o
  "_OBJC_CLASS_$_CommonAssignment", referenced from:
      objc-class-ref in ViewModel.o
  "_OBJC_CLASS_$_CommonPeopleInSpaceRepository", referenced from:
      objc-class-ref in ContentView.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I guess the warning

watchOS Simulator-x86_64 but attempting to link with file built for watchOS Simulator-i386

already tells a lot but I am not sure how to change that

compose-desktop throws koin Exception (but starts anyway)

Stacktrace:

Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: A KoinContext is already started
	at org.koin.core.context.KoinContextHandler$register$1.invoke(KoinContextHandler.kt:58)
	at org.koin.core.context.KoinContextHandler$register$1.invoke(KoinContextHandler.kt:26)
	at org.koin.core.state.DefaultJvmThreading.mainOrSynchronized(MainIsolatedStateJVM.kt:41)
	at org.koin.mp.PlatformJvmKt.mpsynchronized(PlatformJvm.kt:27)
	at org.koin.core.context.KoinContextHandler.register(KoinContextHandler.kt:56)
	at org.koin.core.context.ContextFunctionsKt.startKoin(ContextFunctions.kt:36)
	at org.koin.core.context.ContextFunctionsKt.startKoin$default(ContextFunctions.kt:35)
	at com.surrus.common.di.KoinKt.initKoin(Koin.kt:17)
	at com.surrus.common.di.KoinKt.initKoin$default(Koin.kt:16)
	at MainKt$main$1.invoke(main.kt:36)
	at MainKt$main$1.invoke(main.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.desktop.AppWindowKt$Window$1$1.invoke(AppWindow.kt:83)
	at androidx.compose.desktop.AppWindowKt$Window$1$1.invoke(AppWindow.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.desktop.AppWindow$show$1.invoke(AppWindow.kt:347)
	at androidx.compose.desktop.AppWindow$show$1.invoke(AppWindow.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.runtime.AmbientKt.Providers(Ambient.kt:187)
	at androidx.compose.desktop.AppWindow$onCreate$1.invoke(AppWindow.kt:326)
	at androidx.compose.desktop.AppWindow$onCreate$1.invoke(AppWindow.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.ui.platform.DesktopSelectionKt$DesktopSelectionContainer$4$1.invoke(DesktopSelection.kt:123)
	at androidx.compose.ui.platform.DesktopSelectionKt$DesktopSelectionContainer$4$1.invoke(DesktopSelection.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.ui.layout.LayoutKt.Layout(Layout.kt:682)
	at androidx.compose.ui.platform.DesktopSelectionKt.Wrap(DesktopSelection.kt:38)
	at androidx.compose.ui.platform.DesktopSelectionKt.access$Wrap(DesktopSelection.kt)
	at androidx.compose.ui.platform.DesktopSelectionKt$DesktopSelectionContainer$4.invoke(DesktopSelection.kt:122)
	at androidx.compose.ui.platform.DesktopSelectionKt$DesktopSelectionContainer$4.invoke(DesktopSelection.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.runtime.AmbientKt.Providers(Ambient.kt:187)
	at androidx.compose.ui.platform.DesktopSelectionKt.DesktopSelectionContainer(DesktopSelection.kt:121)
	at androidx.compose.ui.platform.DesktopSelectionKt.DesktopSelectionContainer(DesktopSelection.kt:62)
	at androidx.compose.ui.platform.WrapperKt$setContent$1$1.invoke(Wrapper.kt:36)
	at androidx.compose.ui.platform.WrapperKt$setContent$1$1.invoke(Wrapper.kt)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt:146)
	at androidx.compose.runtime.internal.ComposableLambda.invoke(ComposableLambda.kt)
	at androidx.compose.runtime.AmbientKt.Providers(Ambient.kt:187)
	at androidx.compose.ui.platform.AmbientsKt.ProvideCommonAmbients(Ambients.kt:303)
	at androidx.compose.ui.platform.AmbientsKt$ProvideCommonAmbients$1.invoke(Ambients.kt)
	at androidx.compose.ui.platform.AmbientsKt$ProvideCommonAmbients$1.invoke(Ambients.kt)
	at androidx.compose.runtime.RecomposeScope.compose(Composer.kt:286)
	at androidx.compose.runtime.Composer.recomposeToGroupEnd(Composer.kt:1696)
	at androidx.compose.runtime.Composer.skipCurrentGroup(Composer.kt:1953)
	at androidx.compose.runtime.Composer.recompose(Composer.kt:2083)
	at androidx.compose.runtime.Recomposer.performRecompose(Recomposer.kt:375)
	at androidx.compose.runtime.Recomposer.access$performRecompose(Recomposer.kt)
	at androidx.compose.runtime.Recomposer$recomposeAndApplyChanges$2$4.invoke(Recomposer.kt:310)
	at androidx.compose.runtime.Recomposer$recomposeAndApplyChanges$2$4.invoke(Recomposer.kt)
	at androidx.compose.runtime.dispatch.ActualDesktopKt$DefaultMonotonicFrameClock$2$1.withFrameNanos(ActualDesktop.kt:38)
	at androidx.compose.runtime.dispatch.ActualDesktopKt$DefaultMonotonicFrameClock$2$1$withFrameNanos$1.invokeSuspend(ActualDesktop.kt)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:228)
	at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:167)
	at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:372)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:406)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:398)
	at kotlinx.coroutines.CancellableContinuationImpl.resumeUndispatched(CancellableContinuationImpl.kt:494)
	at kotlinx.coroutines.swing.SwingDispatcher$scheduleResumeAfterDelay$timer$1.actionPerformed(SwingDispatcher.kt:33)
	at java.desktop/javax.swing.Timer.fireActionPerformed(Timer.java:310)
	at java.desktop/javax.swing.Timer$DoPostEvent.run(Timer.java:242)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:316)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
	at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
	at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Web Build Broken

web:jsBrowserRun task fails with

[webpack-cli] Invalid configuration object. Object has been initialized using a configuration object that does not match the API schema.
   - configuration has an unknown property '_assetEmittingWrittenFiles'. These properties are valid:
     object { bonjour?, client?, compress?, dev?, firewall?, headers?, historyApiFallback?, host?, hot?, http2?, https?, liveReload?, onAfterSetupMiddleware?, onBeforeSetupMiddleware?, onListening?, open?, port?, proxy?, public?, setupExitSignals?, static?, transportMode?, watchFiles? }

KTOR Http logging not working when working with Koin

I've implemented koin in my kmm project and for network I'm using Ktor but I noticed that Ktor logging is not working when implemented using Koin DI however it is working if I directly place ktor http code inside file.

Here is my code snippet:

Versions:
ktorVersion = "2.0.2"
koinVersion = "3.2.0"

Koin class

   fun initKoin(appDeclaration: KoinAppDeclaration = {}) : KoinApplication = 
        startKoin {
            appDeclaration()
            modules(commonModule(enableNetworkLogs), platformModule())
        }.apply {
            initLogger()
        }
    fun commonModule() = module {
        single { createKoinClient(get()) }
        single { NetworkModule(get(), baseURL = "https://gitcdn.link/cdn/KaterinaPetrova/") }
    }

     fun createKoinClient(httpClientEngine: HttpClientEngine) =
        HttpClient(httpClientEngine) {
            install(Logging) {
                level = LogLevel.HEADERS
                logger = object : Logger {
                    override fun log(message: String) {
                        Napier.e(tag = "Http Request", message = message)
                    }
                }
            }
            install(ContentNegotiation) {
                json(Json { isLenient = true; ignoreUnknownKeys = true })
            }
        }

Add option to disable ktor logs

For the CLI in #16 there should be an option to disable the ktor client logs - otherwise the CLI is filled up with network logs :)

I'm already working on a fix.

SwiftUI project includes Android code

Hello, thank you for this demo sample. When I open the PeopleInSpaceSwiftUI project, it shows android code, as well as all other platforms under /SharedCode folder. Is that the natural iOS project setup? I guess, I'd like to know how to keep code for clients completely separate.

Screen Shot 2021-04-19 at 2 14 23 PM

TLS verification fails on macOS

I am having some issues with the macOS app and TLS connections to the API.
When trying to connect to the API over TLS I am seeing the following error:

io.ktor.client.engine.curl.CurlIllegalStateException: TLS verification failed for request: CurlRequestData(url='https://people-in-space-proxy.ew.r.appspot.com/astros.json', method='GET', content: 0 bytes). Reason: SSL peer certificate or SSH remote key was not OK
        at 0   PeopleInSpace                       0x00000001086c3261 kfun:kotlin.Throwable#<init>(kotlin.String?){} + 97
        at 1   PeopleInSpace                       0x00000001086bc78d kfun:kotlin.Exception#<init>(kotlin.String?){} + 93
        at 2   PeopleInSpace                       0x00000001086bc9ad kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 93
        at 3   PeopleInSpace                       0x00000001086bcf6d kfun:kotlin.IllegalStateException#<init>(kotlin.String?){} + 93
        at 4   PeopleInSpace                       0x0000000108cf50a7 kfun:io.ktor.client.engine.curl.CurlIllegalStateException#<init>(kotlin.String){} + 87

The macOS app is currently using the Ktor curl implementation (see #69).
Switching to the ios implementation fixes the issue for me.

FYI I am on macOS 11.6 with curl 7.64.1.

Refactor for project clone

This is one of the best examples of getting started with a KMM project and the only example Ive seen that uses SwiftUI and jetpack compose.

It would be great if there was a refactor guide on how to migrate to a new project/package names

Question about project template

Hello there. First of all, awesome project, very complete! I want to ask you if you were able to create the KMM project using the project wizard, because I don't see the option to choose KMM with the latest Canary 6. If not, which template did you chose?

Thanks!

java.lang.NoSuchMethodError: No virtual method elapsedNow-UwyO8pc()D in class Lkotlin/time/TimeMark; or its super classes (declaration of 'kotlin.time.TimeMark' appears in /data/app/com.surrus.peopleinspace-kswk9z_v3x_aBC69JDlTfg==/base.apk!classes3.dex)

Dear Sir

i get this crash

java.lang.NoSuchMethodError: No virtual method elapsedNow-UwyO8pc()D in class Lkotlin/time/TimeMark; or its super classes (declaration of 'kotlin.time.TimeMark' appears in /data/app/com.surrus.peopleinspace-kswk9z_v3x_aBC69JDlTfg==/base.apk!classes3.dex)

like this InsertKoinIO/koin#871

THX

Uncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError:

Using commit ae966b1efda8c0e1d18cf4b28eedc434656b9ac4, I get the exception below when trying to run the app on the iOS simulator.

Uncaught Kotlin exception: kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for DispatchedContinuation[MainDispatcher, Continuation @ $<init>$lambda-0COROUTINE$5]. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
    at 0   PeopleInSpaceSwiftUI                0x000000010e1e2b1c kfun:kotlin.Error#<init>(kotlin.String?;kotlin.Throwable?){} + 124
    at 1   PeopleInSpaceSwiftUI                0x000000010e38b83c kfun:kotlinx.coroutines.CoroutinesInternalError#<init>(kotlin.String;kotlin.Throwable){} + 124
    at 2   PeopleInSpaceSwiftUI                0x000000010e3d72e9 kfun:kotlinx.coroutines.DispatchedTask#handleFatalException(kotlin.Throwable?;kotlin.Throwable?){} + 953
    at 3   PeopleInSpaceSwiftUI                0x000000010e3d6ec7 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 3543
    at 4   PeopleInSpaceSwiftUI                0x000000010e40a0b8 kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 88
    at 5   PeopleInSpaceSwiftUI                0x000000010e40a48e kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$43.invoke#internal + 62
    at 6   PeopleInSpaceSwiftUI                0x000000010e40a4ee kfun:kotlinx.coroutines.DarwinMainDispatcher.$dispatch$lambda-0$FUNCTION_REFERENCE$43.$<bridge-UNN>invoke(){}#internal + 62
    at 7   PeopleInSpaceSwiftUI                0x000000010e40b5a7 _6f72672e6a6574627261696e732e6b6f746c696e783a6b6f746c696e782d636f726f7574696e65732d636f7265_knbridge8 + 183
    at 8   libdispatch.dylib                   0x000000010f1c28ac _dispatch_call_block_and_release + 12
    at 9   libdispatch.dylib                   0x000000010f1c3a88 _dispatch_client_callout + 8
    at 10  libdispatch.dylib                   0x000000010f1d1f23 _dispatch_main_queue_callback_4CF + 1152
    at 11  CoreFoundation                      0x00007fff203a8276 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
    at 12  CoreFoundation                      0x00007fff203a2b06 __CFRunLoopRun + 2685
    at 13  CoreFoundation                      0x00007fff203a1b9e CFRunLoopRunSpecific + 567
    at 14  GraphicsServices                    0x00007fff2b773db3 GSEventRunModal + 139
    at 15  UIKitCore                           0x00007fff24660af3 -[UIApplication _run] + 912
    at 16  UIKitCore                           0x00007fff24665a04 UIApplicationMain + 101
    at 17  PeopleInSpaceSwiftUI                0x000000010e1281cb main + 75 (/Users/mbonnin/git/PeopleInSpace/ios/PeopleInSpaceSwiftUI/PeopleInSpaceSwiftUI/AppDelegate.swift:5:7)
    at 18  libdyld.dylib                       0x00007fff20257415 start + 1
Caused by: kotlin.native.concurrent.InvalidMutabilityException: Frozen during lazy computation
    at 0   PeopleInSpaceSwiftUI                0x000000010e1ea07d kfun:kotlin.Throwable#<init>(kotlin.String?){} + 93
    at 1   PeopleInSpaceSwiftUI                0x000000010e1e2c2b kfun:kotlin.Exception#<init>(kotlin.String?){} + 91
    at 2   PeopleInSpaceSwiftUI                0x000000010e1e2e7b kfun:kotlin.RuntimeException#<init>(kotlin.String?){} + 91
    at 3   PeopleInSpaceSwiftUI                0x000000010e218d6b kfun:kotlin.native.concurrent.InvalidMutabilityException#<init>(kotlin.String){} + 91
    at 4   PeopleInSpaceSwiftUI                0x000000010e21b419 kfun:kotlin.native.concurrent.FreezeAwareLazyImpl.getOrInit#internal + 1641
    at 5   PeopleInSpaceSwiftUI                0x000000010e21b95e kfun:kotlin.native.concurrent.FreezeAwareLazyImpl#<get-value>(){}1:0 + 670
    at 6   PeopleInSpaceSwiftUI                0x000000010e13f183 kfun:com.surrus.common.remote.PeopleInSpaceApi.<get-client>#internal + 323
    at 7   PeopleInSpaceSwiftUI                0x000000010e13feb7 kfun:com.surrus.common.remote.PeopleInSpaceApi.$fetchPeopleCOROUTINE$0#invokeSuspend(kotlin.Result<kotlin.Any?>){}kotlin.Any? + 2983
    at 8   PeopleInSpaceSwiftUI                0x000000010e141a74 kfun:com.surrus.common.remote.PeopleInSpaceApi#fetchPeople(){}com.surrus.common.remote.AstroResult + 244
    at 9   PeopleInSpaceSwiftUI                0x000000010e146666 kfun:com.surrus.common.repository.PeopleInSpaceRepository.$fetchAndStorePeopleCOROUTINE$2.invokeSuspend#internal + 886
    at 10  PeopleInSpaceSwiftUI                0x000000010e146bb4 kfun:com.surrus.common.repository.PeopleInSpaceRepository.fetchAndStorePeople#internal + 244
    at 11  PeopleInSpaceSwiftUI                0x000000010e1487da kfun:com.surrus.common.repository.PeopleInSpaceRepository.$<init>$lambda-0COROUTINE$5.invokeSuspend#internal + 602
    at 12  PeopleInSpaceSwiftUI                0x000000010e20bba6 kfun:kotlin.coroutines.native.internal.BaseContinuationImpl#resumeWith(kotlin.Result<kotlin.Any?>){} + 758
    at 13  PeopleInSpaceSwiftUI                0x000000010e3d6be2 kfun:kotlinx.coroutines.DispatchedTask#run(){} + 2802
    at 14  PeopleInSpaceSwiftUI                0x000000010e40a0b8 kfun:kotlinx.coroutines.DarwinMainDispatcher.dispatch$lambda-0#internal + 88
    ... and 14 more common stack frames skipped
CoreSimulator 732.17 - Device: iPhone 11 (8BACA2EC-79DF-49D0-937D-AFA747B52692) - Runtime: iOS 14.0 (18A372) - DeviceType: iPhone 11
(lldb) 

makeFromEncoded import error

Dear Sir

compose-desktop

import org.jetbrains.skia.Image.Companion.makeFromEncoded

get error

change to

import org.jetbrains.skija.Image.makeFromEncoded

THX

Inject viewModel in Preview

In this function a preview is shown. I wonder how I could inject a viewModel in such a preview as I pass it to the screen from the activity. My code looks something like this:

@Preview(name = "Sign in preview")
@Composable
fun SignInPreview() {

   val myViewModel = ???

    MyTheme {
        SignIn(viewModel = myViewModel) {}
    }
}

How would I do that? In my activity I simply call private val appViewModel: AppViewModel by viewModel().

Webpack 5+ has no more polyfills

It'll produce an error about 'crypto' not being available, and that Webpack 5 no longer supplies polyfills out of the box, but you have explicit enable or disable it.

This is the example I used to add it, but I guesst here are more ways:
https://github.com/juggernaut0/multiplatform-utils/blob/cbacca8abf26a8ff946736c01510222090dcc74f/ktor/build.gradle.kts#L49

Background info https://stackoverflow.com/questions/54162297/module-not-found-error-cant-resolve-crypto/54162447

> Task :common:jsBrowserProductionWebpack
Module not found: Error: Can't resolve 'crypto' in '/Users/me/projects/some/build/js/packages/some-common/kotlin-dce'

BREAKING CHANGE: webpack < 5 used to include polyfills for node.js core modules by default.
This is no longer the case. Verify if you need this module and configure a polyfill for it.

If you want to include a polyfill, you need to:
	- add a fallback 'resolve.fallback: { "crypto": require.resolve("crypto-browserify") }'
	- install 'crypto-browserify'
If you don't want to include a polyfill, you can use an empty module like this:
	resolve.fallback: { "crypto": false }

But I don't know how to implement the resolve...?

Plugin class 'org.jetbrains.kotlin.gradle.targets.js.nodejs.NodeJsRootPlugin': read system property 'idea.version'

When my build succeeded, Android Studio gave me the option to 'optimize this' (from the 'Build analyzer'-tab), so I clicked it, which turned into an error:

Configuration cache problems found in this build.

1 problem was found storing the configuration cache.

See the complete report at file:///Users/Robert/projects/core/build/reports/configuration-cache/30jcug8vaoti1o1hwhkqheprb/configuration-cache-report.html

Read system property 'idea.version'

Not sure if this should be fixed from within this project, but at least I think it is good to login for reference.

I checked the documentation, but no clue how I could change it, as it seems to be about NodeJsRootPlugin.

Schermafbeelding 2021-07-21 om 21 57 55

A normal build succeeds fine.

Status of Android Release Target

I got some issues with @ Serializable missing from some data being persisted, I guessed probably the pro guard rules aren't quite right. But as I had some other changes it wasn't worth reporting as is.

I guess probably these

@Serializable
data class AstroResult(val message: String, val number: Int, val people: List<Assignment>)

Before spending any time on it I was wondering if it's known to generally work?

Specifically I wanted to test performance with an optimized release build, as compose in debug builds is known to be slower.

Failed to gradle sync in Android Studio

I cloned and opened the project in Android Studio Bumblebee 2021.1.1 Patch 2 with the KMM plugin 0.3.1(211-1.6.10-release-960-IJ)-89 and it gives this error after trying to perform the gradle sync:

org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration$ArtifactResolveException: Could not resolve all artifacts for configuration ':classpath' ....
Caused by: org.gradle.internal.resolve.ModuleVersionResolveException: Could not resolve com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.11.1-new-mm.
Required by:
    project :
Caused by: org.gradle.internal.component.NoMatchingConfigurationSelectionException: No matching variant of com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.11.1-new-mm was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.2' but:
  - Variant 'apiElements' capability com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.11.1-new-mm declares a library, packaged as a jar, and its dependencies declared externally:
      - Incompatible because this component declares an API of a component compatible with Java 11 and the consumer needed a runtime of a component compatible with Java 8
      - Other compatible attribute:
          - Doesn't say anything about org.gradle.plugin.api-version (required '7.2')
  - Variant 'runtimeElements' capability com.rickclephas.kmp:kmp-nativecoroutines-gradle-plugin:0.11.1-new-mm declares a runtime of a library, packaged as a jar, and its dependencies declared externally:
      - Incompatible because this component declares a component compatible with Java 11 and the consumer needed a component compatible with Java 8
      - Other compatible attribute:
          - Doesn't say anything about org.gradle.plugin.api-version (required '7.2')
....

How to run backend locally

Hi! Thanks for sharing this, I quite like the project and was trying to replicate it by adding a backend server in one of my projects. Unfortunately, I am struggling a bit because the jvm code is not able to use the sharedCommon files.

I started playing around with your project and as a suggestion, I think it would helpful if you added to the readme the instructions to run the backend server locally in case that's possible.

Thanks again.

project import failed in a newly installed AS 4.2 canary 8 (Ubuntu)

Project import fails with error Please initialize at least one Kotlin target in 'common (:common)'.

OS: Ubuntu Linux 20.04

Android Studio Version: 4.2 Canary 8. (No multiplatform project has been done before now)

Clicking Run with --debug option returns this error. Caused by: org.gradle.internal.component.AmbiguousConfigurationSelectionException: The consumer was configured to find a runtime of a library compatible with Java 14, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm'. However we cannot choose between the following variants of project :common:
Changing the default system jdk to java 8 prints the same message but now Java 8 instead of Java 14.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.