Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A bad return value from a callback crashes the conductor #3803

Open
ThetaSinner opened this issue May 1, 2024 · 3 comments
Open

A bad return value from a callback crashes the conductor #3803

ThetaSinner opened this issue May 1, 2024 · 3 comments
Labels
good first issue Good for newcomers

Comments

@ThetaSinner
Copy link
Contributor

Define a bad init callback

#[hdk_extern]
fn init() -> ExternResult<()> {
    Ok(())
}

Install the app, watch Holochain unalive itself.

@ThetaSinner ThetaSinner added the good first issue Good for newcomers label May 1, 2024
@ThetaSinner
Copy link
Contributor Author

Note that for this to work, you are supposed to return InitCallbackResult::Pass

@ThetaSinner
Copy link
Contributor Author

Instead you get something like

FATAL PANIC PanicInfo {
    payload: Any { .. },
    message: Some(
        called `Result::unwrap()` on an `Err` value: CellError(WorkflowError(RibosomeError(WasmRuntimeError(RuntimeError { source: User(WasmError { file: "crates/holochain/src/core/ribosome/real_ribosome.rs", line: 1033, error: Serialize(Deserialize("invalid type: unit value, expected variant identifier")) }), wasm_trace: [] })))),
    ),
    location: Location {
        file: "/home/thetasinner/source/holo/holochain/crates/holochain/src/sweettest/sweet_conductor_handle.rs",
        line: 23,
        col: 58,
    },
    can_unwind: true,
    force_no_backtrace: false,
}

Copy link
Contributor

github-actions bot commented Jun 1, 2024

This item has been open for 30 days with no activity.

@github-actions github-actions bot added the stale This issue may be outdated, but we can revive it if it ever becomes relevant again label Jun 1, 2024
@abe-njama abe-njama removed the stale This issue may be outdated, but we can revive it if it ever becomes relevant again label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Backlog
Development

No branches or pull requests

2 participants