Skip to content

Unexpected AsyncFiberException error when using managed runtime #6077

@OliverJAsh

Description

@OliverJAsh

What version of Effect is running?

Latest

What steps can reproduce the bug?

https://effect.website/play#ab0825c0bc38

import { Effect, Layer, ManagedRuntime } from 'effect';

const runtime = ManagedRuntime.make(Layer.empty);

runtime.runFork(Effect.async(() => {}));

// AsyncFiberException: Fiber #3 cannot be resolved synchronously. This is caused by using runSync on an effect that performs async work
runtime.runSync(Effect.sync(() => {}));

What is the expected behavior?

No error, to match the behaviour of not using a managed runtime.

What do you see instead?

See above.

Additional information

Discord thread: https://discord.com/channels/795981131316985866/795983589644304396/1474438664045072558

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions